diff --git a/std/assembly/rt/index.d.ts b/std/assembly/rt/index.d.ts
index fbe1a778e1..7828f2c64a 100644
--- a/std/assembly/rt/index.d.ts
+++ b/std/assembly/rt/index.d.ts
@@ -29,6 +29,9 @@ declare function __finalize(ptr: usize): void;
 declare const ASC_RTRACE: bool;
 declare const ASC_PROFILE: bool;
 
+// Memory growth handling
+declare function ASC_RT_GROW_HANDLER(): void;
+
 // Incremental GC constants
 declare const ASC_GC_GRANULARITY: i32;
 declare const ASC_GC_SWEEPFACTOR: i32;
diff --git a/std/assembly/rt/stub.ts b/std/assembly/rt/stub.ts
index a80c6d33c6..c900ce2cad 100644
--- a/std/assembly/rt/stub.ts
+++ b/std/assembly/rt/stub.ts
@@ -18,6 +18,7 @@ function maybeGrowMemory(newOffset: usize): void {
     if (memory.grow(pagesWanted) < 0) {
       if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory
     }
+    if (isDefined(ASC_RT_GROW_HANDLER)) ASC_RT_GROW_HANDLER();
   }
   offset = newOffset;
 }
diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts
index 3d135a3bee..b469cefbca 100644
--- a/std/assembly/rt/tlsf.ts
+++ b/std/assembly/rt/tlsf.ts
@@ -444,6 +444,7 @@ function growMemory(root: Root, size: usize): void {
   if (memory.grow(pagesWanted) < 0) {
     if (memory.grow(pagesNeeded) < 0) unreachable();
   }
+  if (isDefined(ASC_RT_GROW_HANDLER)) ASC_RT_GROW_HANDLER();
   let pagesAfter = memory.size();
   addMemory(root, <usize>pagesBefore << 16, <u64>pagesAfter << 16);
 }
@@ -468,7 +469,10 @@ function initialize(): void {
   let rootOffset = (__heap_base + AL_MASK) & ~AL_MASK;
   let pagesBefore = memory.size();
   let pagesNeeded = <i32>((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16);
-  if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();
+  if (pagesNeeded > pagesBefore) {
+    if (memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();
+    if (isDefined(ASC_RT_GROW_HANDLER)) ASC_RT_GROW_HANDLER();
+  }
   let root = changetype<Root>(rootOffset);
   root.flMap = 0;
   SETTAIL(root, changetype<Block>(0));
diff --git a/tests/compiler.js b/tests/compiler.js
index 863787a533..8e3764912b 100644
--- a/tests/compiler.js
+++ b/tests/compiler.js
@@ -321,6 +321,10 @@ async function runTest(basename) {
       }
       compareStderr.end(SUCCESS);
       return prepareResult(SUCCESS);
+    } else if (error) {
+      // Don't bother comparing fixtures or doing anything else if the
+      // compilation failed.
+      return prepareResult(FAILURE, "compile failed");
     }
 
     const afterCompileResult = afterCompile("debug");
diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat
index 230933f1b4..519251ee90 100644
--- a/tests/compiler/bindings/esm.debug.wat
+++ b/tests/compiler/bindings/esm.debug.wat
@@ -1338,18 +1338,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1470,7 +1470,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1799,7 +1799,7 @@
   if
    i32.const 336
    i32.const 672
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2095,6 +2095,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2244,7 +2246,7 @@
    if
     i32.const 0
     i32.const 672
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2264,7 +2266,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat
index 672115c456..efbc4334b6 100644
--- a/tests/compiler/bindings/esm.release.wat
+++ b/tests/compiler/bindings/esm.release.wat
@@ -852,18 +852,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 35056
   i32.const 0
@@ -1161,7 +1159,7 @@
       if
        i32.const 0
        i32.const 1696
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1396,7 +1394,7 @@
   if
    i32.const 1360
    i32.const 1696
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1494,7 +1492,7 @@
    if
     i32.const 0
     i32.const 1696
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1509,7 +1507,7 @@
   if
    i32.const 0
    i32.const 1696
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/bindings/noExportRuntime.debug.wat b/tests/compiler/bindings/noExportRuntime.debug.wat
index d6621948a3..247251ac80 100644
--- a/tests/compiler/bindings/noExportRuntime.debug.wat
+++ b/tests/compiler/bindings/noExportRuntime.debug.wat
@@ -1253,18 +1253,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1385,7 +1385,7 @@
   if
    i32.const 0
    i32.const 512
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1714,7 +1714,7 @@
   if
    i32.const 176
    i32.const 512
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2010,6 +2010,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2159,7 +2161,7 @@
    if
     i32.const 0
     i32.const 512
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2179,7 +2181,7 @@
   if
    i32.const 0
    i32.const 512
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/bindings/noExportRuntime.release.wat b/tests/compiler/bindings/noExportRuntime.release.wat
index 759421547c..b8177a0330 100644
--- a/tests/compiler/bindings/noExportRuntime.release.wat
+++ b/tests/compiler/bindings/noExportRuntime.release.wat
@@ -785,18 +785,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34560
   i32.const 0
@@ -1094,7 +1092,7 @@
       if
        i32.const 0
        i32.const 1536
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1329,7 +1327,7 @@
   if
    i32.const 1200
    i32.const 1536
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1427,7 +1425,7 @@
    if
     i32.const 0
     i32.const 1536
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1442,7 +1440,7 @@
   if
    i32.const 0
    i32.const 1536
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat
index 2b6256a0a1..ef70c50131 100644
--- a/tests/compiler/bindings/raw.debug.wat
+++ b/tests/compiler/bindings/raw.debug.wat
@@ -1341,18 +1341,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1473,7 +1473,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1802,7 +1802,7 @@
   if
    i32.const 336
    i32.const 672
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2098,6 +2098,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2247,7 +2249,7 @@
    if
     i32.const 0
     i32.const 672
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2267,7 +2269,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat
index da0352b4a1..ece51dddd9 100644
--- a/tests/compiler/bindings/raw.release.wat
+++ b/tests/compiler/bindings/raw.release.wat
@@ -852,18 +852,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 35056
   i32.const 0
@@ -1161,7 +1159,7 @@
       if
        i32.const 0
        i32.const 1696
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1396,7 +1394,7 @@
   if
    i32.const 1360
    i32.const 1696
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1494,7 +1492,7 @@
    if
     i32.const 0
     i32.const 1696
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1509,7 +1507,7 @@
   if
    i32.const 0
    i32.const 1696
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/call-super.debug.wat b/tests/compiler/call-super.debug.wat
index fb91ea7874..52866af837 100644
--- a/tests/compiler/call-super.debug.wat
+++ b/tests/compiler/call-super.debug.wat
@@ -1228,18 +1228,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1360,7 +1360,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1689,7 +1689,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1985,6 +1985,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2134,7 +2136,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2154,7 +2156,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/call-super.release.wat b/tests/compiler/call-super.release.wat
index bdcc3e03e7..2b5e82467d 100644
--- a/tests/compiler/call-super.release.wat
+++ b/tests/compiler/call-super.release.wat
@@ -732,18 +732,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34320
   i32.const 0
@@ -1041,7 +1039,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1276,7 +1274,7 @@
   if
    i32.const 1104
    i32.const 1440
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1374,7 +1372,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1389,7 +1387,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-implements.debug.wat b/tests/compiler/class-implements.debug.wat
index bfeec249ca..14eb62da5f 100644
--- a/tests/compiler/class-implements.debug.wat
+++ b/tests/compiler/class-implements.debug.wat
@@ -1231,18 +1231,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1363,7 +1363,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1692,7 +1692,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1988,6 +1988,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2137,7 +2139,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2157,7 +2159,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-implements.release.wat b/tests/compiler/class-implements.release.wat
index d9ef9d7e18..1906d20db6 100644
--- a/tests/compiler/class-implements.release.wat
+++ b/tests/compiler/class-implements.release.wat
@@ -781,18 +781,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34352
   i32.const 0
@@ -1090,7 +1088,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1325,7 +1323,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1423,7 +1421,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1438,7 +1436,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-overloading-cast.debug.wat b/tests/compiler/class-overloading-cast.debug.wat
index c4342ebc91..0617b96181 100644
--- a/tests/compiler/class-overloading-cast.debug.wat
+++ b/tests/compiler/class-overloading-cast.debug.wat
@@ -1237,18 +1237,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1369,7 +1369,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1698,7 +1698,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1994,6 +1994,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2143,7 +2145,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2163,7 +2165,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-overloading-cast.release.wat b/tests/compiler/class-overloading-cast.release.wat
index 14a24afc68..76a8682b41 100644
--- a/tests/compiler/class-overloading-cast.release.wat
+++ b/tests/compiler/class-overloading-cast.release.wat
@@ -769,18 +769,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34480
   i32.const 0
@@ -1078,7 +1076,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1278,7 +1276,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1293,7 +1291,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-overloading.debug.wat b/tests/compiler/class-overloading.debug.wat
index dc394bbf8e..d645bc4dbb 100644
--- a/tests/compiler/class-overloading.debug.wat
+++ b/tests/compiler/class-overloading.debug.wat
@@ -1241,18 +1241,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1373,7 +1373,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1702,7 +1702,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1998,6 +1998,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2147,7 +2149,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2167,7 +2169,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class-overloading.release.wat b/tests/compiler/class-overloading.release.wat
index 8b358295ca..47c04ab88c 100644
--- a/tests/compiler/class-overloading.release.wat
+++ b/tests/compiler/class-overloading.release.wat
@@ -791,18 +791,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34640
   i32.const 0
@@ -1100,7 +1098,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1300,7 +1298,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1315,7 +1313,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class.debug.wat b/tests/compiler/class.debug.wat
index afda7eb500..d1746d9d77 100644
--- a/tests/compiler/class.debug.wat
+++ b/tests/compiler/class.debug.wat
@@ -1309,18 +1309,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1441,7 +1441,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1770,7 +1770,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2066,6 +2066,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2215,7 +2217,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2235,7 +2237,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/class.release.wat b/tests/compiler/class.release.wat
index c3107e7912..9b6494432d 100644
--- a/tests/compiler/class.release.wat
+++ b/tests/compiler/class.release.wat
@@ -738,18 +738,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1047,7 +1045,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1282,7 +1280,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1380,7 +1378,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1395,7 +1393,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/constructor.debug.wat b/tests/compiler/constructor.debug.wat
index 4a1a9a65b2..1c978398ab 100644
--- a/tests/compiler/constructor.debug.wat
+++ b/tests/compiler/constructor.debug.wat
@@ -1237,18 +1237,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1369,7 +1369,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1698,7 +1698,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1994,6 +1994,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2143,7 +2145,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2163,7 +2165,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/constructor.release.wat b/tests/compiler/constructor.release.wat
index 60eea444fc..d35b8ded3f 100644
--- a/tests/compiler/constructor.release.wat
+++ b/tests/compiler/constructor.release.wat
@@ -795,18 +795,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1104,7 +1102,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1339,7 +1337,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1437,7 +1435,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1452,7 +1450,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/do.debug.wat b/tests/compiler/do.debug.wat
index 91f52ccdb5..03dcce2f1d 100644
--- a/tests/compiler/do.debug.wat
+++ b/tests/compiler/do.debug.wat
@@ -1632,18 +1632,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1764,7 +1764,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2093,7 +2093,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2389,6 +2389,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2538,7 +2540,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2558,7 +2560,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/do.release.wat b/tests/compiler/do.release.wat
index 0bcfedbba6..fd7b301d09 100644
--- a/tests/compiler/do.release.wat
+++ b/tests/compiler/do.release.wat
@@ -731,18 +731,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34272
   i32.const 0
@@ -1040,7 +1038,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1240,7 +1238,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1255,7 +1253,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/duplicate-fields.debug.wat b/tests/compiler/duplicate-fields.debug.wat
index 7f96433a13..8740a6570d 100644
--- a/tests/compiler/duplicate-fields.debug.wat
+++ b/tests/compiler/duplicate-fields.debug.wat
@@ -1231,18 +1231,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1363,7 +1363,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1692,7 +1692,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1988,6 +1988,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2137,7 +2139,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2157,7 +2159,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/duplicate-fields.release.wat b/tests/compiler/duplicate-fields.release.wat
index a2b9b1a72d..68a244ccf1 100644
--- a/tests/compiler/duplicate-fields.release.wat
+++ b/tests/compiler/duplicate-fields.release.wat
@@ -745,18 +745,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34320
   i32.const 0
@@ -1054,7 +1052,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1289,7 +1287,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1387,7 +1385,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1402,7 +1400,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/empty-exportruntime.debug.wat b/tests/compiler/empty-exportruntime.debug.wat
index 1c5c21375c..a2b0ab3bb0 100644
--- a/tests/compiler/empty-exportruntime.debug.wat
+++ b/tests/compiler/empty-exportruntime.debug.wat
@@ -1230,18 +1230,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1362,7 +1362,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1691,7 +1691,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1987,6 +1987,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2136,7 +2138,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2156,7 +2158,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/empty-exportruntime.release.wat b/tests/compiler/empty-exportruntime.release.wat
index 8ac160e12a..473f971e6d 100644
--- a/tests/compiler/empty-exportruntime.release.wat
+++ b/tests/compiler/empty-exportruntime.release.wat
@@ -746,18 +746,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34368
   i32.const 0
@@ -1055,7 +1053,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1290,7 +1288,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1388,7 +1386,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1403,7 +1401,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/empty-new.debug.wat b/tests/compiler/empty-new.debug.wat
index 9d3c257697..f42bc49801 100644
--- a/tests/compiler/empty-new.debug.wat
+++ b/tests/compiler/empty-new.debug.wat
@@ -1223,18 +1223,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1355,7 +1355,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1684,7 +1684,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1980,6 +1980,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2129,7 +2131,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2149,7 +2151,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/empty-new.release.wat b/tests/compiler/empty-new.release.wat
index af3b8bd9f4..339d8b6d8b 100644
--- a/tests/compiler/empty-new.release.wat
+++ b/tests/compiler/empty-new.release.wat
@@ -728,18 +728,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1037,7 +1035,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1237,7 +1235,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1252,7 +1250,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/exportstar-rereexport.debug.wat b/tests/compiler/exportstar-rereexport.debug.wat
index 663ea26eea..eb3602ce74 100644
--- a/tests/compiler/exportstar-rereexport.debug.wat
+++ b/tests/compiler/exportstar-rereexport.debug.wat
@@ -1263,18 +1263,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1395,7 +1395,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1724,7 +1724,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2020,6 +2020,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2169,7 +2171,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2189,7 +2191,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/exportstar-rereexport.release.wat b/tests/compiler/exportstar-rereexport.release.wat
index 622828f662..ab673a8f6d 100644
--- a/tests/compiler/exportstar-rereexport.release.wat
+++ b/tests/compiler/exportstar-rereexport.release.wat
@@ -762,18 +762,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1071,7 +1069,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1271,7 +1269,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1286,7 +1284,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/extends-baseaggregate.debug.wat b/tests/compiler/extends-baseaggregate.debug.wat
index 264ed92d68..10991a8327 100644
--- a/tests/compiler/extends-baseaggregate.debug.wat
+++ b/tests/compiler/extends-baseaggregate.debug.wat
@@ -1233,18 +1233,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1365,7 +1365,7 @@
   if
    i32.const 0
    i32.const 528
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1694,7 +1694,7 @@
   if
    i32.const 192
    i32.const 528
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1990,6 +1990,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2139,7 +2141,7 @@
    if
     i32.const 0
     i32.const 528
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2159,7 +2161,7 @@
   if
    i32.const 0
    i32.const 528
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/extends-baseaggregate.release.wat b/tests/compiler/extends-baseaggregate.release.wat
index 402d658397..52cd3245e6 100644
--- a/tests/compiler/extends-baseaggregate.release.wat
+++ b/tests/compiler/extends-baseaggregate.release.wat
@@ -748,18 +748,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34512
   i32.const 0
@@ -1057,7 +1055,7 @@
       if
        i32.const 0
        i32.const 1552
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1292,7 +1290,7 @@
   if
    i32.const 1216
    i32.const 1552
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1390,7 +1388,7 @@
    if
     i32.const 0
     i32.const 1552
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1405,7 +1403,7 @@
   if
    i32.const 0
    i32.const 1552
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/extends-recursive.debug.wat b/tests/compiler/extends-recursive.debug.wat
index b83754c683..38a20cc061 100644
--- a/tests/compiler/extends-recursive.debug.wat
+++ b/tests/compiler/extends-recursive.debug.wat
@@ -1223,18 +1223,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1355,7 +1355,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1684,7 +1684,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1980,6 +1980,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2129,7 +2131,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2149,7 +2151,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/extends-recursive.release.wat b/tests/compiler/extends-recursive.release.wat
index ee63b3d673..c08cc129ee 100644
--- a/tests/compiler/extends-recursive.release.wat
+++ b/tests/compiler/extends-recursive.release.wat
@@ -729,18 +729,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1038,7 +1036,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1273,7 +1271,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1371,7 +1369,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1386,7 +1384,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/field-initialization.debug.wat b/tests/compiler/field-initialization.debug.wat
index c6d03b2b7d..921b53e595 100644
--- a/tests/compiler/field-initialization.debug.wat
+++ b/tests/compiler/field-initialization.debug.wat
@@ -1234,18 +1234,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1366,7 +1366,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1695,7 +1695,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1991,6 +1991,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2140,7 +2142,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2160,7 +2162,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/field-initialization.release.wat b/tests/compiler/field-initialization.release.wat
index 581a1ac36b..f734513997 100644
--- a/tests/compiler/field-initialization.release.wat
+++ b/tests/compiler/field-initialization.release.wat
@@ -749,18 +749,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34672
   i32.const 0
@@ -1058,7 +1056,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1293,7 +1291,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1391,7 +1389,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1406,7 +1404,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/field.debug.wat b/tests/compiler/field.debug.wat
index e20ed15673..0c05f49533 100644
--- a/tests/compiler/field.debug.wat
+++ b/tests/compiler/field.debug.wat
@@ -1226,18 +1226,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1358,7 +1358,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1687,7 +1687,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1983,6 +1983,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2132,7 +2134,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2152,7 +2154,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/field.release.wat b/tests/compiler/field.release.wat
index dc9afffca7..a9f0948a97 100644
--- a/tests/compiler/field.release.wat
+++ b/tests/compiler/field.release.wat
@@ -732,18 +732,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34272
   i32.const 0
@@ -1041,7 +1039,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1276,7 +1274,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1374,7 +1372,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1389,7 +1387,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/for.debug.wat b/tests/compiler/for.debug.wat
index aa94a43a4f..3964014e71 100644
--- a/tests/compiler/for.debug.wat
+++ b/tests/compiler/for.debug.wat
@@ -1613,18 +1613,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1745,7 +1745,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2074,7 +2074,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2370,6 +2370,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2519,7 +2521,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2539,7 +2541,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/for.release.wat b/tests/compiler/for.release.wat
index da3cbbfa5b..f1b4ec6338 100644
--- a/tests/compiler/for.release.wat
+++ b/tests/compiler/for.release.wat
@@ -731,18 +731,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34272
   i32.const 0
@@ -1040,7 +1038,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1240,7 +1238,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1255,7 +1253,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/function-call.debug.wat b/tests/compiler/function-call.debug.wat
index 5f87d1289e..379e650723 100644
--- a/tests/compiler/function-call.debug.wat
+++ b/tests/compiler/function-call.debug.wat
@@ -1262,18 +1262,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1394,7 +1394,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1723,7 +1723,7 @@
   if
    i32.const 256
    i32.const 592
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2019,6 +2019,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2168,7 +2170,7 @@
    if
     i32.const 0
     i32.const 592
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2188,7 +2190,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/function-call.release.wat b/tests/compiler/function-call.release.wat
index 29e7b4f8cc..5166f1e512 100644
--- a/tests/compiler/function-call.release.wat
+++ b/tests/compiler/function-call.release.wat
@@ -770,18 +770,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34576
   i32.const 0
@@ -1079,7 +1077,7 @@
       if
        i32.const 0
        i32.const 1616
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1279,7 +1277,7 @@
    if
     i32.const 0
     i32.const 1616
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1294,7 +1292,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/function-expression.debug.wat b/tests/compiler/function-expression.debug.wat
index d519160857..dc78b7f03a 100644
--- a/tests/compiler/function-expression.debug.wat
+++ b/tests/compiler/function-expression.debug.wat
@@ -1419,18 +1419,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1551,7 +1551,7 @@
   if
    i32.const 0
    i32.const 912
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1880,7 +1880,7 @@
   if
    i32.const 576
    i32.const 912
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2176,6 +2176,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2325,7 +2327,7 @@
    if
     i32.const 0
     i32.const 912
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2345,7 +2347,7 @@
   if
    i32.const 0
    i32.const 912
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/function-expression.release.wat b/tests/compiler/function-expression.release.wat
index 236d54c1ed..a9fbd002be 100644
--- a/tests/compiler/function-expression.release.wat
+++ b/tests/compiler/function-expression.release.wat
@@ -796,18 +796,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34928
   i32.const 0
@@ -1105,7 +1103,7 @@
       if
        i32.const 0
        i32.const 1936
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1305,7 +1303,7 @@
    if
     i32.const 0
     i32.const 1936
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1320,7 +1318,7 @@
   if
    i32.const 0
    i32.const 1936
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/getter-call.debug.wat b/tests/compiler/getter-call.debug.wat
index c0548a9af5..f3939371ae 100644
--- a/tests/compiler/getter-call.debug.wat
+++ b/tests/compiler/getter-call.debug.wat
@@ -1226,18 +1226,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1358,7 +1358,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1687,7 +1687,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1983,6 +1983,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2132,7 +2134,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2152,7 +2154,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/getter-call.release.wat b/tests/compiler/getter-call.release.wat
index 485f0d940a..2b99fd258f 100644
--- a/tests/compiler/getter-call.release.wat
+++ b/tests/compiler/getter-call.release.wat
@@ -734,18 +734,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34272
   i32.const 0
@@ -1043,7 +1041,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1243,7 +1241,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1258,7 +1256,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/heap.debug.wat b/tests/compiler/heap.debug.wat
index bf6e6caca9..5bdaaf00ad 100644
--- a/tests/compiler/heap.debug.wat
+++ b/tests/compiler/heap.debug.wat
@@ -872,18 +872,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1002,7 +1002,7 @@
   if
    i32.const 96
    i32.const 32
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1298,6 +1298,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -1447,7 +1449,7 @@
    if
     i32.const 0
     i32.const 32
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1467,7 +1469,7 @@
   if
    i32.const 0
    i32.const 32
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
@@ -1532,7 +1534,7 @@
   if
    i32.const 0
    i32.const 32
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/heap.release.wat b/tests/compiler/heap.release.wat
index 417f51de5b..d0a204021b 100644
--- a/tests/compiler/heap.release.wat
+++ b/tests/compiler/heap.release.wat
@@ -536,18 +536,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 33936
   i32.const 0
@@ -616,7 +614,7 @@
   if
    i32.const 1120
    i32.const 1056
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -918,7 +916,7 @@
    if
     i32.const 0
     i32.const 1056
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -933,7 +931,7 @@
   if
    i32.const 0
    i32.const 1056
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
@@ -970,7 +968,7 @@
   if
    i32.const 0
    i32.const 1056
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/infer-array.debug.wat b/tests/compiler/infer-array.debug.wat
index 2ee919b26d..118bb0b8d1 100644
--- a/tests/compiler/infer-array.debug.wat
+++ b/tests/compiler/infer-array.debug.wat
@@ -1245,18 +1245,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1377,7 +1377,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1706,7 +1706,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2002,6 +2002,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2151,7 +2153,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2171,7 +2173,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/infer-array.release.wat b/tests/compiler/infer-array.release.wat
index b2492c4fa9..2957a87312 100644
--- a/tests/compiler/infer-array.release.wat
+++ b/tests/compiler/infer-array.release.wat
@@ -771,18 +771,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34992
   i32.const 0
@@ -1080,7 +1078,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1315,7 +1313,7 @@
   if
    i32.const 1088
    i32.const 1424
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1413,7 +1411,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1428,7 +1426,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/infer-generic.debug.wat b/tests/compiler/infer-generic.debug.wat
index f617123eb8..503b7a19ea 100644
--- a/tests/compiler/infer-generic.debug.wat
+++ b/tests/compiler/infer-generic.debug.wat
@@ -1272,18 +1272,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1404,7 +1404,7 @@
   if
    i32.const 0
    i32.const 544
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1733,7 +1733,7 @@
   if
    i32.const 208
    i32.const 544
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2029,6 +2029,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2178,7 +2180,7 @@
    if
     i32.const 0
     i32.const 544
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2198,7 +2200,7 @@
   if
    i32.const 0
    i32.const 544
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/infer-generic.release.wat b/tests/compiler/infer-generic.release.wat
index acfed03605..d2587b06ba 100644
--- a/tests/compiler/infer-generic.release.wat
+++ b/tests/compiler/infer-generic.release.wat
@@ -758,18 +758,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34432
   i32.const 0
@@ -1067,7 +1065,7 @@
       if
        i32.const 0
        i32.const 1568
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1302,7 +1300,7 @@
   if
    i32.const 1232
    i32.const 1568
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1400,7 +1398,7 @@
    if
     i32.const 0
     i32.const 1568
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1415,7 +1413,7 @@
   if
    i32.const 0
    i32.const 1568
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/inlining.debug.wat b/tests/compiler/inlining.debug.wat
index 3740c9af7c..d8b54a8b2c 100644
--- a/tests/compiler/inlining.debug.wat
+++ b/tests/compiler/inlining.debug.wat
@@ -1491,18 +1491,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1623,7 +1623,7 @@
   if
    i32.const 0
    i32.const 448
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1952,7 +1952,7 @@
   if
    i32.const 112
    i32.const 448
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2248,6 +2248,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2397,7 +2399,7 @@
    if
     i32.const 0
     i32.const 448
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2417,7 +2419,7 @@
   if
    i32.const 0
    i32.const 448
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/inlining.release.wat b/tests/compiler/inlining.release.wat
index 77804a8363..1f9cf6f2d9 100644
--- a/tests/compiler/inlining.release.wat
+++ b/tests/compiler/inlining.release.wat
@@ -744,18 +744,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1053,7 +1051,7 @@
       if
        i32.const 0
        i32.const 1472
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1288,7 +1286,7 @@
   if
    i32.const 1136
    i32.const 1472
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1386,7 +1384,7 @@
    if
     i32.const 0
     i32.const 1472
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1401,7 +1399,7 @@
   if
    i32.const 0
    i32.const 1472
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/instanceof.debug.wat b/tests/compiler/instanceof.debug.wat
index a0d0a1b0aa..389758b96f 100644
--- a/tests/compiler/instanceof.debug.wat
+++ b/tests/compiler/instanceof.debug.wat
@@ -1247,18 +1247,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1379,7 +1379,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1708,7 +1708,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2004,6 +2004,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2153,7 +2155,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2173,7 +2175,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/instanceof.release.wat b/tests/compiler/instanceof.release.wat
index e5507b780a..fa15ee1eb4 100644
--- a/tests/compiler/instanceof.release.wat
+++ b/tests/compiler/instanceof.release.wat
@@ -836,18 +836,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34368
   i32.const 0
@@ -1145,7 +1143,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1345,7 +1343,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1360,7 +1358,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1095.debug.wat b/tests/compiler/issues/1095.debug.wat
index 3885debe7a..1a55d5197c 100644
--- a/tests/compiler/issues/1095.debug.wat
+++ b/tests/compiler/issues/1095.debug.wat
@@ -1226,18 +1226,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1358,7 +1358,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1687,7 +1687,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1983,6 +1983,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2132,7 +2134,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2152,7 +2154,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1095.release.wat b/tests/compiler/issues/1095.release.wat
index 4ac8523a24..6d7cd7d42b 100644
--- a/tests/compiler/issues/1095.release.wat
+++ b/tests/compiler/issues/1095.release.wat
@@ -735,18 +735,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34448
   i32.const 0
@@ -1044,7 +1042,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1279,7 +1277,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1377,7 +1375,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1392,7 +1390,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1225.debug.wat b/tests/compiler/issues/1225.debug.wat
index 9514862a47..c45a2db20f 100644
--- a/tests/compiler/issues/1225.debug.wat
+++ b/tests/compiler/issues/1225.debug.wat
@@ -1241,18 +1241,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1373,7 +1373,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1702,7 +1702,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1998,6 +1998,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2147,7 +2149,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2167,7 +2169,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1225.release.wat b/tests/compiler/issues/1225.release.wat
index 40774e3a59..ee92fc2f3b 100644
--- a/tests/compiler/issues/1225.release.wat
+++ b/tests/compiler/issues/1225.release.wat
@@ -740,18 +740,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34288
   i32.const 0
@@ -1049,7 +1047,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1249,7 +1247,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1264,7 +1262,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1699.debug.wat b/tests/compiler/issues/1699.debug.wat
index 7c5c76c48b..6e90fe9d4b 100644
--- a/tests/compiler/issues/1699.debug.wat
+++ b/tests/compiler/issues/1699.debug.wat
@@ -1228,18 +1228,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1360,7 +1360,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1689,7 +1689,7 @@
   if
    i32.const 128
    i32.const 464
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1985,6 +1985,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2134,7 +2136,7 @@
    if
     i32.const 0
     i32.const 464
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2154,7 +2156,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/1699.release.wat b/tests/compiler/issues/1699.release.wat
index 12d1ca18b1..d0a0a5a8b2 100644
--- a/tests/compiler/issues/1699.release.wat
+++ b/tests/compiler/issues/1699.release.wat
@@ -742,18 +742,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34512
   i32.const 0
@@ -1051,7 +1049,7 @@
       if
        i32.const 0
        i32.const 1488
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1286,7 +1284,7 @@
   if
    i32.const 1152
    i32.const 1488
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1384,7 +1382,7 @@
    if
     i32.const 0
     i32.const 1488
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1399,7 +1397,7 @@
   if
    i32.const 0
    i32.const 1488
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2166.debug.wat b/tests/compiler/issues/2166.debug.wat
index 39c49cc006..d083a0ed28 100644
--- a/tests/compiler/issues/2166.debug.wat
+++ b/tests/compiler/issues/2166.debug.wat
@@ -1230,18 +1230,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1362,7 +1362,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1691,7 +1691,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1987,6 +1987,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2136,7 +2138,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2156,7 +2158,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2166.release.wat b/tests/compiler/issues/2166.release.wat
index addb2abaee..0f5ce5a795 100644
--- a/tests/compiler/issues/2166.release.wat
+++ b/tests/compiler/issues/2166.release.wat
@@ -740,18 +740,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34432
   i32.const 0
@@ -1049,7 +1047,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1249,7 +1247,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1264,7 +1262,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2322/index.debug.wat b/tests/compiler/issues/2322/index.debug.wat
index 7ff1a4a09b..e36c57dc30 100644
--- a/tests/compiler/issues/2322/index.debug.wat
+++ b/tests/compiler/issues/2322/index.debug.wat
@@ -1224,18 +1224,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1356,7 +1356,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1685,7 +1685,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1981,6 +1981,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2130,7 +2132,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2150,7 +2152,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2322/index.release.wat b/tests/compiler/issues/2322/index.release.wat
index f1d42124ee..2b0b2d52ba 100644
--- a/tests/compiler/issues/2322/index.release.wat
+++ b/tests/compiler/issues/2322/index.release.wat
@@ -730,18 +730,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1039,7 +1037,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1274,7 +1272,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1372,7 +1370,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1387,7 +1385,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2622.debug.wat b/tests/compiler/issues/2622.debug.wat
index 860a0a0b91..ec3e5910f3 100644
--- a/tests/compiler/issues/2622.debug.wat
+++ b/tests/compiler/issues/2622.debug.wat
@@ -1227,18 +1227,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1359,7 +1359,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1688,7 +1688,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1984,6 +1984,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2133,7 +2135,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2153,7 +2155,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/issues/2622.release.wat b/tests/compiler/issues/2622.release.wat
index 2b438537a0..2c5ef428b5 100644
--- a/tests/compiler/issues/2622.release.wat
+++ b/tests/compiler/issues/2622.release.wat
@@ -769,18 +769,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1078,7 +1076,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1278,7 +1276,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1293,7 +1291,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/logical.debug.wat b/tests/compiler/logical.debug.wat
index fad4d4ffc2..d6b2174533 100644
--- a/tests/compiler/logical.debug.wat
+++ b/tests/compiler/logical.debug.wat
@@ -1253,18 +1253,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1385,7 +1385,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1714,7 +1714,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2010,6 +2010,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2159,7 +2161,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2179,7 +2181,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/logical.release.wat b/tests/compiler/logical.release.wat
index abc2afedfa..91db893bd8 100644
--- a/tests/compiler/logical.release.wat
+++ b/tests/compiler/logical.release.wat
@@ -745,18 +745,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34304
   i32.const 0
@@ -1054,7 +1052,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1254,7 +1252,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1269,7 +1267,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/managed-cast.debug.wat b/tests/compiler/managed-cast.debug.wat
index 4fb7b175d9..2d4960fbfc 100644
--- a/tests/compiler/managed-cast.debug.wat
+++ b/tests/compiler/managed-cast.debug.wat
@@ -1226,18 +1226,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1358,7 +1358,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1687,7 +1687,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1983,6 +1983,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2132,7 +2134,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2152,7 +2154,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/managed-cast.release.wat b/tests/compiler/managed-cast.release.wat
index 5e26cf390f..ae418a7def 100644
--- a/tests/compiler/managed-cast.release.wat
+++ b/tests/compiler/managed-cast.release.wat
@@ -735,18 +735,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34496
   i32.const 0
@@ -1044,7 +1042,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1244,7 +1242,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1259,7 +1257,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/new.debug.wat b/tests/compiler/new.debug.wat
index b0a882fcdb..788ce6daca 100644
--- a/tests/compiler/new.debug.wat
+++ b/tests/compiler/new.debug.wat
@@ -1229,18 +1229,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1361,7 +1361,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1690,7 +1690,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1986,6 +1986,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2135,7 +2137,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2155,7 +2157,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/new.release.wat b/tests/compiler/new.release.wat
index 438eba16e8..abbeb8fd64 100644
--- a/tests/compiler/new.release.wat
+++ b/tests/compiler/new.release.wat
@@ -771,18 +771,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34256
   i32.const 0
@@ -1080,7 +1078,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1280,7 +1278,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1295,7 +1293,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/object-literal.debug.wat b/tests/compiler/object-literal.debug.wat
index 570fbc57d4..476aa5a084 100644
--- a/tests/compiler/object-literal.debug.wat
+++ b/tests/compiler/object-literal.debug.wat
@@ -1321,18 +1321,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1453,7 +1453,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1782,7 +1782,7 @@
   if
    i32.const 288
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2078,6 +2078,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2227,7 +2229,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2247,7 +2249,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/object-literal.release.wat b/tests/compiler/object-literal.release.wat
index 79bce27f83..fbeac219aa 100644
--- a/tests/compiler/object-literal.release.wat
+++ b/tests/compiler/object-literal.release.wat
@@ -745,18 +745,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34528
   i32.const 0
@@ -855,7 +853,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1227,7 +1225,7 @@
   if
    i32.const 1312
    i32.const 1440
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1325,7 +1323,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1340,7 +1338,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/optional-typeparameters.debug.wat b/tests/compiler/optional-typeparameters.debug.wat
index ea99c2b3f8..229758a302 100644
--- a/tests/compiler/optional-typeparameters.debug.wat
+++ b/tests/compiler/optional-typeparameters.debug.wat
@@ -1237,18 +1237,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1369,7 +1369,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1698,7 +1698,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1994,6 +1994,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2143,7 +2145,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2163,7 +2165,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/optional-typeparameters.release.wat b/tests/compiler/optional-typeparameters.release.wat
index 338470aae5..28e65e9e86 100644
--- a/tests/compiler/optional-typeparameters.release.wat
+++ b/tests/compiler/optional-typeparameters.release.wat
@@ -757,18 +757,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34256
   i32.const 0
@@ -1066,7 +1064,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1266,7 +1264,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1281,7 +1279,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/reexport.debug.wat b/tests/compiler/reexport.debug.wat
index b19004b09e..c112bbafce 100644
--- a/tests/compiler/reexport.debug.wat
+++ b/tests/compiler/reexport.debug.wat
@@ -1270,18 +1270,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1402,7 +1402,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1731,7 +1731,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2027,6 +2027,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2176,7 +2178,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2196,7 +2198,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/reexport.release.wat b/tests/compiler/reexport.release.wat
index aa6cf67823..7bac80c212 100644
--- a/tests/compiler/reexport.release.wat
+++ b/tests/compiler/reexport.release.wat
@@ -764,18 +764,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34288
   i32.const 0
@@ -1073,7 +1071,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1273,7 +1271,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1288,7 +1286,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rereexport.debug.wat b/tests/compiler/rereexport.debug.wat
index b409499e1b..2fdb4b7f20 100644
--- a/tests/compiler/rereexport.debug.wat
+++ b/tests/compiler/rereexport.debug.wat
@@ -1263,18 +1263,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1395,7 +1395,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1724,7 +1724,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2020,6 +2020,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2169,7 +2171,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2189,7 +2191,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rereexport.release.wat b/tests/compiler/rereexport.release.wat
index 4ca358b3ef..a049534ceb 100644
--- a/tests/compiler/rereexport.release.wat
+++ b/tests/compiler/rereexport.release.wat
@@ -762,18 +762,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1071,7 +1069,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1271,7 +1269,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1286,7 +1284,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-access.debug.wat b/tests/compiler/resolve-access.debug.wat
index daff744a0a..e234a85411 100644
--- a/tests/compiler/resolve-access.debug.wat
+++ b/tests/compiler/resolve-access.debug.wat
@@ -1245,18 +1245,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1377,7 +1377,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1706,7 +1706,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2002,6 +2002,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2151,7 +2153,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2171,7 +2173,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-access.release.wat b/tests/compiler/resolve-access.release.wat
index 81f11c300d..f9956d38b3 100644
--- a/tests/compiler/resolve-access.release.wat
+++ b/tests/compiler/resolve-access.release.wat
@@ -753,18 +753,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 36096
   i32.const 0
@@ -1062,7 +1060,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1297,7 +1295,7 @@
   if
    i32.const 1088
    i32.const 1424
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1395,7 +1393,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1410,7 +1408,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-binary.debug.wat b/tests/compiler/resolve-binary.debug.wat
index 8e4d5246fe..9611d6c90d 100644
--- a/tests/compiler/resolve-binary.debug.wat
+++ b/tests/compiler/resolve-binary.debug.wat
@@ -1465,18 +1465,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1597,7 +1597,7 @@
   if
    i32.const 0
    i32.const 720
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1926,7 +1926,7 @@
   if
    i32.const 384
    i32.const 720
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2222,6 +2222,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2371,7 +2373,7 @@
    if
     i32.const 0
     i32.const 720
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2391,7 +2393,7 @@
   if
    i32.const 0
    i32.const 720
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-binary.release.wat b/tests/compiler/resolve-binary.release.wat
index 361d585398..2e08884cc2 100644
--- a/tests/compiler/resolve-binary.release.wat
+++ b/tests/compiler/resolve-binary.release.wat
@@ -962,18 +962,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 44016
   i32.const 0
@@ -1271,7 +1269,7 @@
       if
        i32.const 0
        i32.const 1744
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1506,7 +1504,7 @@
   if
    i32.const 1408
    i32.const 1744
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1604,7 +1602,7 @@
    if
     i32.const 0
     i32.const 1744
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1619,7 +1617,7 @@
   if
    i32.const 0
    i32.const 1744
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat
index 4f7f102983..202306bea5 100644
--- a/tests/compiler/resolve-elementaccess.debug.wat
+++ b/tests/compiler/resolve-elementaccess.debug.wat
@@ -1268,18 +1268,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1400,7 +1400,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1729,7 +1729,7 @@
   if
    i32.const 144
    i32.const 480
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2025,6 +2025,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2174,7 +2176,7 @@
    if
     i32.const 0
     i32.const 480
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2194,7 +2196,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-elementaccess.release.wat b/tests/compiler/resolve-elementaccess.release.wat
index b08ff52596..36d96c9e97 100644
--- a/tests/compiler/resolve-elementaccess.release.wat
+++ b/tests/compiler/resolve-elementaccess.release.wat
@@ -805,18 +805,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 37600
   i32.const 0
@@ -1114,7 +1112,7 @@
       if
        i32.const 0
        i32.const 1504
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1349,7 +1347,7 @@
   if
    i32.const 1168
    i32.const 1504
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1447,7 +1445,7 @@
    if
     i32.const 0
     i32.const 1504
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1462,7 +1460,7 @@
   if
    i32.const 0
    i32.const 1504
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-function-expression.debug.wat b/tests/compiler/resolve-function-expression.debug.wat
index a9cdc844bf..639798b662 100644
--- a/tests/compiler/resolve-function-expression.debug.wat
+++ b/tests/compiler/resolve-function-expression.debug.wat
@@ -1311,18 +1311,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1443,7 +1443,7 @@
   if
    i32.const 0
    i32.const 768
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1772,7 +1772,7 @@
   if
    i32.const 432
    i32.const 768
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2068,6 +2068,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2217,7 +2219,7 @@
    if
     i32.const 0
     i32.const 768
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2237,7 +2239,7 @@
   if
    i32.const 0
    i32.const 768
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-function-expression.release.wat b/tests/compiler/resolve-function-expression.release.wat
index 27215c7055..8561fec9f2 100644
--- a/tests/compiler/resolve-function-expression.release.wat
+++ b/tests/compiler/resolve-function-expression.release.wat
@@ -772,18 +772,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 36224
   i32.const 0
@@ -1081,7 +1079,7 @@
       if
        i32.const 0
        i32.const 1792
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1414,7 +1412,7 @@
    if
     i32.const 1456
     i32.const 1792
-    i32.const 461
+    i32.const 462
     i32.const 29
     call $~lib/builtins/abort
     unreachable
@@ -1512,7 +1510,7 @@
     if
      i32.const 0
      i32.const 1792
-     i32.const 499
+     i32.const 503
      i32.const 16
      call $~lib/builtins/abort
      unreachable
@@ -1527,7 +1525,7 @@
    if
     i32.const 0
     i32.const 1792
-    i32.const 501
+    i32.const 505
     i32.const 14
     call $~lib/builtins/abort
     unreachable
diff --git a/tests/compiler/resolve-new.debug.wat b/tests/compiler/resolve-new.debug.wat
index 3b02a74784..41bc50be74 100644
--- a/tests/compiler/resolve-new.debug.wat
+++ b/tests/compiler/resolve-new.debug.wat
@@ -1224,18 +1224,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1356,7 +1356,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1685,7 +1685,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1981,6 +1981,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2130,7 +2132,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2150,7 +2152,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-new.release.wat b/tests/compiler/resolve-new.release.wat
index 78f4407d8e..2bd2dbe5eb 100644
--- a/tests/compiler/resolve-new.release.wat
+++ b/tests/compiler/resolve-new.release.wat
@@ -736,18 +736,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1045,7 +1043,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1245,7 +1243,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1260,7 +1258,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-propertyaccess.debug.wat b/tests/compiler/resolve-propertyaccess.debug.wat
index c40972e4f0..6d548b1b7c 100644
--- a/tests/compiler/resolve-propertyaccess.debug.wat
+++ b/tests/compiler/resolve-propertyaccess.debug.wat
@@ -1311,18 +1311,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1443,7 +1443,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1772,7 +1772,7 @@
   if
    i32.const 256
    i32.const 592
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2068,6 +2068,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2217,7 +2219,7 @@
    if
     i32.const 0
     i32.const 592
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2237,7 +2239,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-propertyaccess.release.wat b/tests/compiler/resolve-propertyaccess.release.wat
index 05ca990b33..e2ecd311cd 100644
--- a/tests/compiler/resolve-propertyaccess.release.wat
+++ b/tests/compiler/resolve-propertyaccess.release.wat
@@ -771,18 +771,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 36480
   i32.const 0
@@ -1080,7 +1078,7 @@
       if
        i32.const 0
        i32.const 1616
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1315,7 +1313,7 @@
   if
    i32.const 1280
    i32.const 1616
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1413,7 +1411,7 @@
    if
     i32.const 0
     i32.const 1616
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1428,7 +1426,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-ternary.debug.wat b/tests/compiler/resolve-ternary.debug.wat
index 88fe3f8e4c..430e609f22 100644
--- a/tests/compiler/resolve-ternary.debug.wat
+++ b/tests/compiler/resolve-ternary.debug.wat
@@ -1319,18 +1319,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1451,7 +1451,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1780,7 +1780,7 @@
   if
    i32.const 256
    i32.const 592
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2076,6 +2076,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2225,7 +2227,7 @@
    if
     i32.const 0
     i32.const 592
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2245,7 +2247,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-ternary.release.wat b/tests/compiler/resolve-ternary.release.wat
index fd5bc84dca..eb3490c64c 100644
--- a/tests/compiler/resolve-ternary.release.wat
+++ b/tests/compiler/resolve-ternary.release.wat
@@ -777,18 +777,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 37408
   i32.const 0
@@ -1086,7 +1084,7 @@
       if
        i32.const 0
        i32.const 1616
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1321,7 +1319,7 @@
   if
    i32.const 1280
    i32.const 1616
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1419,7 +1417,7 @@
    if
     i32.const 0
     i32.const 1616
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1434,7 +1432,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-unary.debug.wat b/tests/compiler/resolve-unary.debug.wat
index 862a3d4188..328cb7982c 100644
--- a/tests/compiler/resolve-unary.debug.wat
+++ b/tests/compiler/resolve-unary.debug.wat
@@ -1311,18 +1311,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1443,7 +1443,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1772,7 +1772,7 @@
   if
    i32.const 256
    i32.const 592
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2068,6 +2068,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2217,7 +2219,7 @@
    if
     i32.const 0
     i32.const 592
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2237,7 +2239,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/resolve-unary.release.wat b/tests/compiler/resolve-unary.release.wat
index 446dbe2298..1b8dce0321 100644
--- a/tests/compiler/resolve-unary.release.wat
+++ b/tests/compiler/resolve-unary.release.wat
@@ -797,18 +797,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 36640
   i32.const 0
@@ -1106,7 +1104,7 @@
       if
        i32.const 0
        i32.const 1616
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1341,7 +1339,7 @@
   if
    i32.const 1280
    i32.const 1616
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1439,7 +1437,7 @@
    if
     i32.const 0
     i32.const 1616
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1454,7 +1452,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/return-unreachable.debug.wat b/tests/compiler/return-unreachable.debug.wat
index ce61a8bc37..5a33de96e6 100644
--- a/tests/compiler/return-unreachable.debug.wat
+++ b/tests/compiler/return-unreachable.debug.wat
@@ -1227,18 +1227,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1359,7 +1359,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1688,7 +1688,7 @@
   if
    i32.const 128
    i32.const 464
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1984,6 +1984,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2133,7 +2135,7 @@
    if
     i32.const 0
     i32.const 464
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2153,7 +2155,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/return-unreachable.release.wat b/tests/compiler/return-unreachable.release.wat
index a30d733294..e47b5c046a 100644
--- a/tests/compiler/return-unreachable.release.wat
+++ b/tests/compiler/return-unreachable.release.wat
@@ -737,18 +737,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34336
   i32.const 0
@@ -1046,7 +1044,7 @@
       if
        i32.const 0
        i32.const 1488
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1281,7 +1279,7 @@
   if
    i32.const 1152
    i32.const 1488
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1379,7 +1377,7 @@
    if
     i32.const 0
     i32.const 1488
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1394,7 +1392,7 @@
   if
    i32.const 0
    i32.const 1488
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/alloc-large-memory.debug.wat b/tests/compiler/rt/alloc-large-memory.debug.wat
index e2aa202376..38ee2aceee 100644
--- a/tests/compiler/rt/alloc-large-memory.debug.wat
+++ b/tests/compiler/rt/alloc-large-memory.debug.wat
@@ -869,18 +869,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -999,7 +999,7 @@
   if
    i32.const 96
    i32.const 32
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1295,6 +1295,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -1444,7 +1446,7 @@
    if
     i32.const 0
     i32.const 32
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1464,7 +1466,7 @@
   if
    i32.const 0
    i32.const 32
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/alloc-large-memory.release.wat b/tests/compiler/rt/alloc-large-memory.release.wat
index dcdd6257a6..b557586b62 100644
--- a/tests/compiler/rt/alloc-large-memory.release.wat
+++ b/tests/compiler/rt/alloc-large-memory.release.wat
@@ -665,18 +665,16 @@
    local.tee $2
    i32.const 0
    i32.le_s
-   if (result i32)
+   if
     i32.const 1
     local.get $2
     i32.sub
     memory.grow $0
     i32.const 0
     i32.lt_s
-   else
-    i32.const 0
-   end
-   if
-    unreachable
+    if
+     unreachable
+    end
    end
    i32.const 33936
    i32.const 0
@@ -746,7 +744,7 @@
   if
    i32.const 1120
    i32.const 1056
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -844,7 +842,7 @@
    if
     i32.const 0
     i32.const 1056
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -859,7 +857,7 @@
   if
    i32.const 0
    i32.const 1056
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/finalize.debug.wat b/tests/compiler/rt/finalize.debug.wat
index 95ff6cc8a3..49cf76a2bc 100644
--- a/tests/compiler/rt/finalize.debug.wat
+++ b/tests/compiler/rt/finalize.debug.wat
@@ -1243,18 +1243,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1375,7 +1375,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1708,7 +1708,7 @@
   if
    i32.const 32
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2004,6 +2004,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2153,7 +2155,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2173,7 +2175,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/finalize.release.wat b/tests/compiler/rt/finalize.release.wat
index c72c96d7a2..625ba53a48 100644
--- a/tests/compiler/rt/finalize.release.wat
+++ b/tests/compiler/rt/finalize.release.wat
@@ -734,18 +734,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34288
   i32.const 0
@@ -1058,7 +1056,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1258,7 +1256,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1273,7 +1271,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/grow-handler.debug.wat b/tests/compiler/rt/grow-handler.debug.wat
new file mode 100644
index 0000000000..493affbf3c
--- /dev/null
+++ b/tests/compiler/rt/grow-handler.debug.wat
@@ -0,0 +1,2752 @@
+(module
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_=>_none (func (param i32)))
+ (type $none_=>_none (func))
+ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
+ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
+ (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32)))
+ (type $none_=>_i32 (func (result i32)))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
+ (import "grow" "handler" (func $rt/grow-handler/handler))
+ (global $rt/grow-handler/leak (mut i32) (i32.const 64))
+ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0))
+ (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1))
+ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2))
+ (global $~lib/rt/itcms/total (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/state (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/iter (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/white (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
+ (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0))
+ (global $~lib/native/ASC_RUNTIME i32 (i32.const 2))
+ (global $~lib/rt/__rtti_base i32 (i32.const 592))
+ (global $~lib/memory/__data_end i32 (i32.const 616))
+ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33384))
+ (global $~lib/memory/__heap_base i32 (i32.const 33384))
+ (memory $0 1)
+ (data $0 (i32.const 12) "\1c\00\00\00\00\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")
+ (data $1 (i32.const 44) ",\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\10\00\00\00 \00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $2 (i32.const 92) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00")
+ (data $3 (i32.const 140) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00")
+ (data $4 (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00")
+ (data $5 (i32.const 252) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $6 (i32.const 320) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $7 (i32.const 352) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $8 (i32.const 380) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00")
+ (data $9 (i32.const 444) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00")
+ (data $10 (i32.const 496) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $11 (i32.const 524) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $12 (i32.const 592) "\05\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00\02\t\00\00")
+ (table $0 1 1 funcref)
+ (elem $0 (i32.const 1))
+ (export "stress" (func $rt/grow-handler/stress))
+ (export "memory" (memory $0))
+ (start $~start)
+ (func $~lib/array/Array<i32>#get:length_ (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=12
+ )
+ (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=8
+ )
+ (func $~lib/arraybuffer/ArrayBufferView#get:buffer (param $this i32) (result i32)
+  local.get $this
+  i32.load $0
+ )
+ (func $~lib/rt/common/BLOCK#get:mmInfo (param $this i32) (result i32)
+  local.get $this
+  i32.load $0
+ )
+ (func $~lib/rt/itcms/Object#set:rtSize (param $this i32) (param $rtSize i32)
+  local.get $this
+  local.get $rtSize
+  i32.store $0 offset=16
+ )
+ (func $~lib/rt/itcms/Object#get:rtId (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=12
+ )
+ (func $~lib/rt/itcms/Object#set:nextWithColor (param $this i32) (param $nextWithColor i32)
+  local.get $this
+  local.get $nextWithColor
+  i32.store $0 offset=4
+ )
+ (func $~lib/rt/itcms/Object#set:prev (param $this i32) (param $prev i32)
+  local.get $this
+  local.get $prev
+  i32.store $0 offset=8
+ )
+ (func $~lib/rt/itcms/initLazy (param $space i32) (result i32)
+  local.get $space
+  local.get $space
+  call $~lib/rt/itcms/Object#set:nextWithColor
+  local.get $space
+  local.get $space
+  call $~lib/rt/itcms/Object#set:prev
+  local.get $space
+  return
+ )
+ (func $~lib/rt/itcms/Object#get:nextWithColor (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=4
+ )
+ (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32)
+  local.get $this
+  call $~lib/rt/itcms/Object#get:nextWithColor
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  return
+ )
+ (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32)
+  local.get $this
+  call $~lib/rt/itcms/Object#get:nextWithColor
+  i32.const 3
+  i32.and
+  return
+ )
+ (func $~lib/rt/itcms/visitRoots (param $cookie i32)
+  (local $pn i32)
+  (local $iter i32)
+  local.get $cookie
+  call $~lib/rt/__visit_globals
+  global.get $~lib/rt/itcms/pinSpace
+  local.set $pn
+  local.get $pn
+  call $~lib/rt/itcms/Object#get:next
+  local.set $iter
+  loop $while-continue|0
+   local.get $iter
+   local.get $pn
+   i32.ne
+   if
+    i32.const 1
+    drop
+    local.get $iter
+    call $~lib/rt/itcms/Object#get:color
+    i32.const 3
+    i32.eq
+    i32.eqz
+    if
+     i32.const 0
+     i32.const 272
+     i32.const 160
+     i32.const 16
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $iter
+    i32.const 20
+    i32.add
+    local.get $cookie
+    call $~lib/rt/__visit_members
+    local.get $iter
+    call $~lib/rt/itcms/Object#get:next
+    local.set $iter
+    br $while-continue|0
+   end
+  end
+ )
+ (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32)
+  local.get $this
+  local.get $this
+  call $~lib/rt/itcms/Object#get:nextWithColor
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  local.get $color
+  i32.or
+  call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#get:prev (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=8
+ )
+ (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32)
+  local.get $this
+  local.get $obj
+  local.get $this
+  call $~lib/rt/itcms/Object#get:nextWithColor
+  i32.const 3
+  i32.and
+  i32.or
+  call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#unlink (param $this i32)
+  (local $next i32)
+  (local $prev i32)
+  local.get $this
+  call $~lib/rt/itcms/Object#get:next
+  local.set $next
+  local.get $next
+  i32.const 0
+  i32.eq
+  if
+   i32.const 1
+   drop
+   local.get $this
+   call $~lib/rt/itcms/Object#get:prev
+   i32.const 0
+   i32.eq
+   if (result i32)
+    local.get $this
+    global.get $~lib/memory/__heap_base
+    i32.lt_u
+   else
+    i32.const 0
+   end
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 272
+    i32.const 128
+    i32.const 18
+    call $~lib/builtins/abort
+    unreachable
+   end
+   return
+  end
+  local.get $this
+  call $~lib/rt/itcms/Object#get:prev
+  local.set $prev
+  i32.const 1
+  drop
+  local.get $prev
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 272
+   i32.const 132
+   i32.const 16
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $next
+  local.get $prev
+  call $~lib/rt/itcms/Object#set:prev
+  local.get $prev
+  local.get $next
+  call $~lib/rt/itcms/Object#set:next
+ )
+ (func $~lib/shared/typeinfo/Typeinfo#get:flags (param $this i32) (result i32)
+  local.get $this
+  i32.load $0
+ )
+ (func $~lib/rt/__typeinfo (param $id i32) (result i32)
+  (local $ptr i32)
+  global.get $~lib/rt/__rtti_base
+  local.set $ptr
+  local.get $id
+  local.get $ptr
+  i32.load $0
+  i32.gt_u
+  if
+   i32.const 400
+   i32.const 464
+   i32.const 21
+   i32.const 28
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $ptr
+  i32.const 4
+  i32.add
+  local.get $id
+  i32.const 4
+  i32.mul
+  i32.add
+  call $~lib/shared/typeinfo/Typeinfo#get:flags
+  return
+ )
+ (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32)
+  (local $rtId i32)
+  local.get $this
+  call $~lib/rt/itcms/Object#get:rtId
+  local.set $rtId
+  local.get $rtId
+  i32.const 2
+  i32.le_u
+  if (result i32)
+   i32.const 1
+  else
+   local.get $rtId
+   call $~lib/rt/__typeinfo
+   i32.const 32
+   i32.and
+   i32.const 0
+   i32.ne
+  end
+  return
+ )
+ (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32)
+  (local $prev i32)
+  local.get $list
+  call $~lib/rt/itcms/Object#get:prev
+  local.set $prev
+  local.get $this
+  local.get $list
+  local.get $withColor
+  i32.or
+  call $~lib/rt/itcms/Object#set:nextWithColor
+  local.get $this
+  local.get $prev
+  call $~lib/rt/itcms/Object#set:prev
+  local.get $prev
+  local.get $this
+  call $~lib/rt/itcms/Object#set:next
+  local.get $list
+  local.get $this
+  call $~lib/rt/itcms/Object#set:prev
+ )
+ (func $~lib/rt/itcms/Object#makeGray (param $this i32)
+  (local $1 i32)
+  local.get $this
+  global.get $~lib/rt/itcms/iter
+  i32.eq
+  if
+   local.get $this
+   call $~lib/rt/itcms/Object#get:prev
+   local.tee $1
+   i32.eqz
+   if (result i32)
+    i32.const 0
+    i32.const 272
+    i32.const 148
+    i32.const 30
+    call $~lib/builtins/abort
+    unreachable
+   else
+    local.get $1
+   end
+   global.set $~lib/rt/itcms/iter
+  end
+  local.get $this
+  call $~lib/rt/itcms/Object#unlink
+  local.get $this
+  global.get $~lib/rt/itcms/toSpace
+  local.get $this
+  call $~lib/rt/itcms/Object#get:isPointerfree
+  if (result i32)
+   global.get $~lib/rt/itcms/white
+   i32.eqz
+  else
+   i32.const 2
+  end
+  call $~lib/rt/itcms/Object#linkTo
+ )
+ (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32)
+  (local $obj i32)
+  local.get $ptr
+  i32.eqz
+  if
+   return
+  end
+  local.get $ptr
+  i32.const 20
+  i32.sub
+  local.set $obj
+  i32.const 0
+  drop
+  local.get $obj
+  call $~lib/rt/itcms/Object#get:color
+  global.get $~lib/rt/itcms/white
+  i32.eq
+  if
+   local.get $obj
+   call $~lib/rt/itcms/Object#makeGray
+   global.get $~lib/rt/itcms/visitCount
+   i32.const 1
+   i32.add
+   global.set $~lib/rt/itcms/visitCount
+  end
+ )
+ (func $~lib/rt/itcms/visitStack (param $cookie i32)
+  (local $ptr i32)
+  global.get $~lib/memory/__stack_pointer
+  local.set $ptr
+  loop $while-continue|0
+   local.get $ptr
+   global.get $~lib/memory/__heap_base
+   i32.lt_u
+   if
+    local.get $ptr
+    i32.load $0
+    local.get $cookie
+    call $~lib/rt/itcms/__visit
+    local.get $ptr
+    i32.const 4
+    i32.add
+    local.set $ptr
+    br $while-continue|0
+   end
+  end
+ )
+ (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32)
+  i32.const 4
+  local.get $this
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  i32.add
+  return
+ )
+ (func $~lib/rt/tlsf/Root#set:flMap (param $this i32) (param $flMap i32)
+  local.get $this
+  local.get $flMap
+  i32.store $0
+ )
+ (func $~lib/rt/common/BLOCK#set:mmInfo (param $this i32) (param $mmInfo i32)
+  local.get $this
+  local.get $mmInfo
+  i32.store $0
+ )
+ (func $~lib/rt/tlsf/Block#set:prev (param $this i32) (param $prev i32)
+  local.get $this
+  local.get $prev
+  i32.store $0 offset=4
+ )
+ (func $~lib/rt/tlsf/Block#set:next (param $this i32) (param $next i32)
+  local.get $this
+  local.get $next
+  i32.store $0 offset=8
+ )
+ (func $~lib/rt/tlsf/Block#get:prev (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=4
+ )
+ (func $~lib/rt/tlsf/Block#get:next (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=8
+ )
+ (func $~lib/rt/tlsf/Root#get:flMap (param $this i32) (result i32)
+  local.get $this
+  i32.load $0
+ )
+ (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32)
+  (local $blockInfo i32)
+  (local $size i32)
+  (local $fl i32)
+  (local $sl i32)
+  (local $6 i32)
+  (local $7 i32)
+  (local $boundedSize i32)
+  (local $prev i32)
+  (local $next i32)
+  (local $root|11 i32)
+  (local $fl|12 i32)
+  (local $sl|13 i32)
+  (local $root|14 i32)
+  (local $fl|15 i32)
+  (local $sl|16 i32)
+  (local $head i32)
+  (local $root|18 i32)
+  (local $fl|19 i32)
+  (local $slMap i32)
+  (local $root|21 i32)
+  (local $fl|22 i32)
+  (local $slMap|23 i32)
+  local.get $block
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  local.set $blockInfo
+  i32.const 1
+  drop
+  local.get $blockInfo
+  i32.const 1
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 268
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $blockInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  local.set $size
+  i32.const 1
+  drop
+  local.get $size
+  i32.const 12
+  i32.ge_u
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 270
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $size
+  i32.const 256
+  i32.lt_u
+  if
+   i32.const 0
+   local.set $fl
+   local.get $size
+   i32.const 4
+   i32.shr_u
+   local.set $sl
+  else
+   local.get $size
+   local.tee $6
+   i32.const 1073741820
+   local.tee $7
+   local.get $6
+   local.get $7
+   i32.lt_u
+   select
+   local.set $boundedSize
+   i32.const 31
+   local.get $boundedSize
+   i32.clz
+   i32.sub
+   local.set $fl
+   local.get $boundedSize
+   local.get $fl
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 1
+   i32.const 4
+   i32.shl
+   i32.xor
+   local.set $sl
+   local.get $fl
+   i32.const 8
+   i32.const 1
+   i32.sub
+   i32.sub
+   local.set $fl
+  end
+  i32.const 1
+  drop
+  local.get $fl
+  i32.const 23
+  i32.lt_u
+  if (result i32)
+   local.get $sl
+   i32.const 16
+   i32.lt_u
+  else
+   i32.const 0
+  end
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 284
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $block
+  call $~lib/rt/tlsf/Block#get:prev
+  local.set $prev
+  local.get $block
+  call $~lib/rt/tlsf/Block#get:next
+  local.set $next
+  local.get $prev
+  if
+   local.get $prev
+   local.get $next
+   call $~lib/rt/tlsf/Block#set:next
+  end
+  local.get $next
+  if
+   local.get $next
+   local.get $prev
+   call $~lib/rt/tlsf/Block#set:prev
+  end
+  local.get $block
+  block $~lib/rt/tlsf/GETHEAD|inlined.0 (result i32)
+   local.get $root
+   local.set $root|11
+   local.get $fl
+   local.set $fl|12
+   local.get $sl
+   local.set $sl|13
+   local.get $root|11
+   local.get $fl|12
+   i32.const 4
+   i32.shl
+   local.get $sl|13
+   i32.add
+   i32.const 2
+   i32.shl
+   i32.add
+   i32.load $0 offset=96
+   br $~lib/rt/tlsf/GETHEAD|inlined.0
+  end
+  i32.eq
+  if
+   local.get $root
+   local.set $root|14
+   local.get $fl
+   local.set $fl|15
+   local.get $sl
+   local.set $sl|16
+   local.get $next
+   local.set $head
+   local.get $root|14
+   local.get $fl|15
+   i32.const 4
+   i32.shl
+   local.get $sl|16
+   i32.add
+   i32.const 2
+   i32.shl
+   i32.add
+   local.get $head
+   i32.store $0 offset=96
+   local.get $next
+   i32.eqz
+   if
+    block $~lib/rt/tlsf/GETSL|inlined.0 (result i32)
+     local.get $root
+     local.set $root|18
+     local.get $fl
+     local.set $fl|19
+     local.get $root|18
+     local.get $fl|19
+     i32.const 2
+     i32.shl
+     i32.add
+     i32.load $0 offset=4
+     br $~lib/rt/tlsf/GETSL|inlined.0
+    end
+    local.set $slMap
+    local.get $root
+    local.set $root|21
+    local.get $fl
+    local.set $fl|22
+    local.get $slMap
+    i32.const 1
+    local.get $sl
+    i32.shl
+    i32.const -1
+    i32.xor
+    i32.and
+    local.tee $slMap
+    local.set $slMap|23
+    local.get $root|21
+    local.get $fl|22
+    i32.const 2
+    i32.shl
+    i32.add
+    local.get $slMap|23
+    i32.store $0 offset=4
+    local.get $slMap
+    i32.eqz
+    if
+     local.get $root
+     local.get $root
+     call $~lib/rt/tlsf/Root#get:flMap
+     i32.const 1
+     local.get $fl
+     i32.shl
+     i32.const -1
+     i32.xor
+     i32.and
+     call $~lib/rt/tlsf/Root#set:flMap
+    end
+   end
+  end
+ )
+ (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32)
+  (local $blockInfo i32)
+  (local $block|3 i32)
+  (local $right i32)
+  (local $rightInfo i32)
+  (local $block|6 i32)
+  (local $block|7 i32)
+  (local $left i32)
+  (local $leftInfo i32)
+  (local $size i32)
+  (local $fl i32)
+  (local $sl i32)
+  (local $13 i32)
+  (local $14 i32)
+  (local $boundedSize i32)
+  (local $root|16 i32)
+  (local $fl|17 i32)
+  (local $sl|18 i32)
+  (local $head i32)
+  (local $root|20 i32)
+  (local $fl|21 i32)
+  (local $sl|22 i32)
+  (local $head|23 i32)
+  (local $root|24 i32)
+  (local $fl|25 i32)
+  (local $root|26 i32)
+  (local $fl|27 i32)
+  (local $slMap i32)
+  i32.const 1
+  drop
+  local.get $block
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 201
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $block
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  local.set $blockInfo
+  i32.const 1
+  drop
+  local.get $blockInfo
+  i32.const 1
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 203
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32)
+   local.get $block
+   local.set $block|3
+   local.get $block|3
+   i32.const 4
+   i32.add
+   local.get $block|3
+   call $~lib/rt/common/BLOCK#get:mmInfo
+   i32.const 3
+   i32.const -1
+   i32.xor
+   i32.and
+   i32.add
+   br $~lib/rt/tlsf/GETRIGHT|inlined.0
+  end
+  local.set $right
+  local.get $right
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  local.set $rightInfo
+  local.get $rightInfo
+  i32.const 1
+  i32.and
+  if
+   local.get $root
+   local.get $right
+   call $~lib/rt/tlsf/removeBlock
+   local.get $block
+   local.get $blockInfo
+   i32.const 4
+   i32.add
+   local.get $rightInfo
+   i32.const 3
+   i32.const -1
+   i32.xor
+   i32.and
+   i32.add
+   local.tee $blockInfo
+   call $~lib/rt/common/BLOCK#set:mmInfo
+   block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32)
+    local.get $block
+    local.set $block|6
+    local.get $block|6
+    i32.const 4
+    i32.add
+    local.get $block|6
+    call $~lib/rt/common/BLOCK#get:mmInfo
+    i32.const 3
+    i32.const -1
+    i32.xor
+    i32.and
+    i32.add
+    br $~lib/rt/tlsf/GETRIGHT|inlined.1
+   end
+   local.set $right
+   local.get $right
+   call $~lib/rt/common/BLOCK#get:mmInfo
+   local.set $rightInfo
+  end
+  local.get $blockInfo
+  i32.const 2
+  i32.and
+  if
+   block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32)
+    local.get $block
+    local.set $block|7
+    local.get $block|7
+    i32.const 4
+    i32.sub
+    i32.load $0
+    br $~lib/rt/tlsf/GETFREELEFT|inlined.0
+   end
+   local.set $left
+   local.get $left
+   call $~lib/rt/common/BLOCK#get:mmInfo
+   local.set $leftInfo
+   i32.const 1
+   drop
+   local.get $leftInfo
+   i32.const 1
+   i32.and
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 544
+    i32.const 221
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $root
+   local.get $left
+   call $~lib/rt/tlsf/removeBlock
+   local.get $left
+   local.set $block
+   local.get $block
+   local.get $leftInfo
+   i32.const 4
+   i32.add
+   local.get $blockInfo
+   i32.const 3
+   i32.const -1
+   i32.xor
+   i32.and
+   i32.add
+   local.tee $blockInfo
+   call $~lib/rt/common/BLOCK#set:mmInfo
+  end
+  local.get $right
+  local.get $rightInfo
+  i32.const 2
+  i32.or
+  call $~lib/rt/common/BLOCK#set:mmInfo
+  local.get $blockInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  local.set $size
+  i32.const 1
+  drop
+  local.get $size
+  i32.const 12
+  i32.ge_u
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 233
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  i32.const 1
+  drop
+  local.get $block
+  i32.const 4
+  i32.add
+  local.get $size
+  i32.add
+  local.get $right
+  i32.eq
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 234
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $right
+  i32.const 4
+  i32.sub
+  local.get $block
+  i32.store $0
+  local.get $size
+  i32.const 256
+  i32.lt_u
+  if
+   i32.const 0
+   local.set $fl
+   local.get $size
+   i32.const 4
+   i32.shr_u
+   local.set $sl
+  else
+   local.get $size
+   local.tee $13
+   i32.const 1073741820
+   local.tee $14
+   local.get $13
+   local.get $14
+   i32.lt_u
+   select
+   local.set $boundedSize
+   i32.const 31
+   local.get $boundedSize
+   i32.clz
+   i32.sub
+   local.set $fl
+   local.get $boundedSize
+   local.get $fl
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 1
+   i32.const 4
+   i32.shl
+   i32.xor
+   local.set $sl
+   local.get $fl
+   i32.const 8
+   i32.const 1
+   i32.sub
+   i32.sub
+   local.set $fl
+  end
+  i32.const 1
+  drop
+  local.get $fl
+  i32.const 23
+  i32.lt_u
+  if (result i32)
+   local.get $sl
+   i32.const 16
+   i32.lt_u
+  else
+   i32.const 0
+  end
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 251
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32)
+   local.get $root
+   local.set $root|16
+   local.get $fl
+   local.set $fl|17
+   local.get $sl
+   local.set $sl|18
+   local.get $root|16
+   local.get $fl|17
+   i32.const 4
+   i32.shl
+   local.get $sl|18
+   i32.add
+   i32.const 2
+   i32.shl
+   i32.add
+   i32.load $0 offset=96
+   br $~lib/rt/tlsf/GETHEAD|inlined.1
+  end
+  local.set $head
+  local.get $block
+  i32.const 0
+  call $~lib/rt/tlsf/Block#set:prev
+  local.get $block
+  local.get $head
+  call $~lib/rt/tlsf/Block#set:next
+  local.get $head
+  if
+   local.get $head
+   local.get $block
+   call $~lib/rt/tlsf/Block#set:prev
+  end
+  local.get $root
+  local.set $root|20
+  local.get $fl
+  local.set $fl|21
+  local.get $sl
+  local.set $sl|22
+  local.get $block
+  local.set $head|23
+  local.get $root|20
+  local.get $fl|21
+  i32.const 4
+  i32.shl
+  local.get $sl|22
+  i32.add
+  i32.const 2
+  i32.shl
+  i32.add
+  local.get $head|23
+  i32.store $0 offset=96
+  local.get $root
+  local.get $root
+  call $~lib/rt/tlsf/Root#get:flMap
+  i32.const 1
+  local.get $fl
+  i32.shl
+  i32.or
+  call $~lib/rt/tlsf/Root#set:flMap
+  local.get $root
+  local.set $root|26
+  local.get $fl
+  local.set $fl|27
+  block $~lib/rt/tlsf/GETSL|inlined.1 (result i32)
+   local.get $root
+   local.set $root|24
+   local.get $fl
+   local.set $fl|25
+   local.get $root|24
+   local.get $fl|25
+   i32.const 2
+   i32.shl
+   i32.add
+   i32.load $0 offset=4
+   br $~lib/rt/tlsf/GETSL|inlined.1
+  end
+  i32.const 1
+  local.get $sl
+  i32.shl
+  i32.or
+  local.set $slMap
+  local.get $root|26
+  local.get $fl|27
+  i32.const 2
+  i32.shl
+  i32.add
+  local.get $slMap
+  i32.store $0 offset=4
+ )
+ (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $endU64 i64) (result i32)
+  (local $end i32)
+  (local $root|4 i32)
+  (local $tail i32)
+  (local $tailInfo i32)
+  (local $size i32)
+  (local $leftSize i32)
+  (local $left i32)
+  (local $root|10 i32)
+  (local $tail|11 i32)
+  local.get $endU64
+  i32.wrap_i64
+  local.set $end
+  i32.const 1
+  drop
+  local.get $start
+  i64.extend_i32_u
+  local.get $endU64
+  i64.le_u
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 382
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $start
+  i32.const 4
+  i32.add
+  i32.const 15
+  i32.add
+  i32.const 15
+  i32.const -1
+  i32.xor
+  i32.and
+  i32.const 4
+  i32.sub
+  local.set $start
+  local.get $end
+  i32.const 15
+  i32.const -1
+  i32.xor
+  i32.and
+  local.set $end
+  block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32)
+   local.get $root
+   local.set $root|4
+   local.get $root|4
+   i32.load $0 offset=1568
+   br $~lib/rt/tlsf/GETTAIL|inlined.0
+  end
+  local.set $tail
+  i32.const 0
+  local.set $tailInfo
+  local.get $tail
+  if
+   i32.const 1
+   drop
+   local.get $start
+   local.get $tail
+   i32.const 4
+   i32.add
+   i32.ge_u
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 544
+    i32.const 389
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $start
+   i32.const 16
+   i32.sub
+   local.get $tail
+   i32.eq
+   if
+    local.get $start
+    i32.const 16
+    i32.sub
+    local.set $start
+    local.get $tail
+    call $~lib/rt/common/BLOCK#get:mmInfo
+    local.set $tailInfo
+   else
+    nop
+   end
+  else
+   i32.const 1
+   drop
+   local.get $start
+   local.get $root
+   i32.const 1572
+   i32.add
+   i32.ge_u
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 544
+    i32.const 402
+    i32.const 5
+    call $~lib/builtins/abort
+    unreachable
+   end
+  end
+  local.get $end
+  local.get $start
+  i32.sub
+  local.set $size
+  local.get $size
+  i32.const 4
+  i32.const 12
+  i32.add
+  i32.const 4
+  i32.add
+  i32.lt_u
+  if
+   i32.const 0
+   return
+  end
+  local.get $size
+  i32.const 2
+  i32.const 4
+  i32.mul
+  i32.sub
+  local.set $leftSize
+  local.get $start
+  local.set $left
+  local.get $left
+  local.get $leftSize
+  i32.const 1
+  i32.or
+  local.get $tailInfo
+  i32.const 2
+  i32.and
+  i32.or
+  call $~lib/rt/common/BLOCK#set:mmInfo
+  local.get $left
+  i32.const 0
+  call $~lib/rt/tlsf/Block#set:prev
+  local.get $left
+  i32.const 0
+  call $~lib/rt/tlsf/Block#set:next
+  local.get $start
+  i32.const 4
+  i32.add
+  local.get $leftSize
+  i32.add
+  local.set $tail
+  local.get $tail
+  i32.const 0
+  i32.const 2
+  i32.or
+  call $~lib/rt/common/BLOCK#set:mmInfo
+  local.get $root
+  local.set $root|10
+  local.get $tail
+  local.set $tail|11
+  local.get $root|10
+  local.get $tail|11
+  i32.store $0 offset=1568
+  local.get $root
+  local.get $left
+  call $~lib/rt/tlsf/insertBlock
+  i32.const 1
+  return
+ )
+ (func $~lib/rt/tlsf/initialize
+  (local $rootOffset i32)
+  (local $pagesBefore i32)
+  (local $pagesNeeded i32)
+  (local $root i32)
+  (local $root|4 i32)
+  (local $tail i32)
+  (local $fl i32)
+  (local $root|7 i32)
+  (local $fl|8 i32)
+  (local $slMap i32)
+  (local $sl i32)
+  (local $root|11 i32)
+  (local $fl|12 i32)
+  (local $sl|13 i32)
+  (local $head i32)
+  (local $memStart i32)
+  i32.const 0
+  drop
+  global.get $~lib/memory/__heap_base
+  i32.const 15
+  i32.add
+  i32.const 15
+  i32.const -1
+  i32.xor
+  i32.and
+  local.set $rootOffset
+  memory.size $0
+  local.set $pagesBefore
+  local.get $rootOffset
+  i32.const 1572
+  i32.add
+  i32.const 65535
+  i32.add
+  i32.const 65535
+  i32.const -1
+  i32.xor
+  i32.and
+  i32.const 16
+  i32.shr_u
+  local.set $pagesNeeded
+  local.get $pagesNeeded
+  local.get $pagesBefore
+  i32.gt_s
+  if
+   local.get $pagesNeeded
+   local.get $pagesBefore
+   i32.sub
+   memory.grow $0
+   i32.const 0
+   i32.lt_s
+   if
+    unreachable
+   end
+   i32.const 1
+   drop
+   call $rt/grow-handler/handler
+  end
+  local.get $rootOffset
+  local.set $root
+  local.get $root
+  i32.const 0
+  call $~lib/rt/tlsf/Root#set:flMap
+  local.get $root
+  local.set $root|4
+  i32.const 0
+  local.set $tail
+  local.get $root|4
+  local.get $tail
+  i32.store $0 offset=1568
+  i32.const 0
+  local.set $fl
+  loop $for-loop|0
+   local.get $fl
+   i32.const 23
+   i32.lt_u
+   if
+    local.get $root
+    local.set $root|7
+    local.get $fl
+    local.set $fl|8
+    i32.const 0
+    local.set $slMap
+    local.get $root|7
+    local.get $fl|8
+    i32.const 2
+    i32.shl
+    i32.add
+    local.get $slMap
+    i32.store $0 offset=4
+    i32.const 0
+    local.set $sl
+    loop $for-loop|1
+     local.get $sl
+     i32.const 16
+     i32.lt_u
+     if
+      local.get $root
+      local.set $root|11
+      local.get $fl
+      local.set $fl|12
+      local.get $sl
+      local.set $sl|13
+      i32.const 0
+      local.set $head
+      local.get $root|11
+      local.get $fl|12
+      i32.const 4
+      i32.shl
+      local.get $sl|13
+      i32.add
+      i32.const 2
+      i32.shl
+      i32.add
+      local.get $head
+      i32.store $0 offset=96
+      local.get $sl
+      i32.const 1
+      i32.add
+      local.set $sl
+      br $for-loop|1
+     end
+    end
+    local.get $fl
+    i32.const 1
+    i32.add
+    local.set $fl
+    br $for-loop|0
+   end
+  end
+  local.get $rootOffset
+  i32.const 1572
+  i32.add
+  local.set $memStart
+  i32.const 0
+  drop
+  local.get $root
+  local.get $memStart
+  memory.size $0
+  i64.extend_i32_s
+  i64.const 16
+  i64.shl
+  call $~lib/rt/tlsf/addMemory
+  drop
+  local.get $root
+  global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32)
+  (local $block i32)
+  local.get $ptr
+  i32.const 4
+  i32.sub
+  local.set $block
+  local.get $ptr
+  i32.const 0
+  i32.ne
+  if (result i32)
+   local.get $ptr
+   i32.const 15
+   i32.and
+   i32.eqz
+  else
+   i32.const 0
+  end
+  if (result i32)
+   local.get $block
+   call $~lib/rt/common/BLOCK#get:mmInfo
+   i32.const 1
+   i32.and
+   i32.eqz
+  else
+   i32.const 0
+  end
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 566
+   i32.const 3
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $block
+  return
+ )
+ (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32)
+  i32.const 0
+  drop
+  local.get $block
+  local.get $block
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  i32.const 1
+  i32.or
+  call $~lib/rt/common/BLOCK#set:mmInfo
+  local.get $root
+  local.get $block
+  call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/tlsf/__free (param $ptr i32)
+  local.get $ptr
+  global.get $~lib/memory/__heap_base
+  i32.lt_u
+  if
+   return
+  end
+  global.get $~lib/rt/tlsf/ROOT
+  i32.eqz
+  if
+   call $~lib/rt/tlsf/initialize
+  end
+  global.get $~lib/rt/tlsf/ROOT
+  local.get $ptr
+  call $~lib/rt/tlsf/checkUsedBlock
+  call $~lib/rt/tlsf/freeBlock
+ )
+ (func $~lib/rt/itcms/free (param $obj i32)
+  local.get $obj
+  global.get $~lib/memory/__heap_base
+  i32.lt_u
+  if
+   local.get $obj
+   i32.const 0
+   call $~lib/rt/itcms/Object#set:nextWithColor
+   local.get $obj
+   i32.const 0
+   call $~lib/rt/itcms/Object#set:prev
+  else
+   global.get $~lib/rt/itcms/total
+   local.get $obj
+   call $~lib/rt/itcms/Object#get:size
+   i32.sub
+   global.set $~lib/rt/itcms/total
+   i32.const 0
+   drop
+   local.get $obj
+   i32.const 4
+   i32.add
+   call $~lib/rt/tlsf/__free
+  end
+ )
+ (func $~lib/rt/itcms/step (result i32)
+  (local $obj i32)
+  (local $1 i32)
+  (local $black i32)
+  (local $from i32)
+  block $break|0
+   block $case2|0
+    block $case1|0
+     block $case0|0
+      global.get $~lib/rt/itcms/state
+      local.set $1
+      local.get $1
+      i32.const 0
+      i32.eq
+      br_if $case0|0
+      local.get $1
+      i32.const 1
+      i32.eq
+      br_if $case1|0
+      local.get $1
+      i32.const 2
+      i32.eq
+      br_if $case2|0
+      br $break|0
+     end
+     i32.const 1
+     global.set $~lib/rt/itcms/state
+     i32.const 0
+     global.set $~lib/rt/itcms/visitCount
+     i32.const 0
+     call $~lib/rt/itcms/visitRoots
+     global.get $~lib/rt/itcms/toSpace
+     global.set $~lib/rt/itcms/iter
+     global.get $~lib/rt/itcms/visitCount
+     i32.const 1
+     i32.mul
+     return
+    end
+    global.get $~lib/rt/itcms/white
+    i32.eqz
+    local.set $black
+    global.get $~lib/rt/itcms/iter
+    call $~lib/rt/itcms/Object#get:next
+    local.set $obj
+    loop $while-continue|1
+     local.get $obj
+     global.get $~lib/rt/itcms/toSpace
+     i32.ne
+     if
+      local.get $obj
+      global.set $~lib/rt/itcms/iter
+      local.get $obj
+      call $~lib/rt/itcms/Object#get:color
+      local.get $black
+      i32.ne
+      if
+       local.get $obj
+       local.get $black
+       call $~lib/rt/itcms/Object#set:color
+       i32.const 0
+       global.set $~lib/rt/itcms/visitCount
+       local.get $obj
+       i32.const 20
+       i32.add
+       i32.const 0
+       call $~lib/rt/__visit_members
+       global.get $~lib/rt/itcms/visitCount
+       i32.const 1
+       i32.mul
+       return
+      end
+      local.get $obj
+      call $~lib/rt/itcms/Object#get:next
+      local.set $obj
+      br $while-continue|1
+     end
+    end
+    i32.const 0
+    global.set $~lib/rt/itcms/visitCount
+    i32.const 0
+    call $~lib/rt/itcms/visitRoots
+    global.get $~lib/rt/itcms/iter
+    call $~lib/rt/itcms/Object#get:next
+    local.set $obj
+    local.get $obj
+    global.get $~lib/rt/itcms/toSpace
+    i32.eq
+    if
+     i32.const 0
+     call $~lib/rt/itcms/visitStack
+     global.get $~lib/rt/itcms/iter
+     call $~lib/rt/itcms/Object#get:next
+     local.set $obj
+     loop $while-continue|2
+      local.get $obj
+      global.get $~lib/rt/itcms/toSpace
+      i32.ne
+      if
+       local.get $obj
+       call $~lib/rt/itcms/Object#get:color
+       local.get $black
+       i32.ne
+       if
+        local.get $obj
+        local.get $black
+        call $~lib/rt/itcms/Object#set:color
+        local.get $obj
+        i32.const 20
+        i32.add
+        i32.const 0
+        call $~lib/rt/__visit_members
+       end
+       local.get $obj
+       call $~lib/rt/itcms/Object#get:next
+       local.set $obj
+       br $while-continue|2
+      end
+     end
+     global.get $~lib/rt/itcms/fromSpace
+     local.set $from
+     global.get $~lib/rt/itcms/toSpace
+     global.set $~lib/rt/itcms/fromSpace
+     local.get $from
+     global.set $~lib/rt/itcms/toSpace
+     local.get $black
+     global.set $~lib/rt/itcms/white
+     local.get $from
+     call $~lib/rt/itcms/Object#get:next
+     global.set $~lib/rt/itcms/iter
+     i32.const 2
+     global.set $~lib/rt/itcms/state
+    end
+    global.get $~lib/rt/itcms/visitCount
+    i32.const 1
+    i32.mul
+    return
+   end
+   global.get $~lib/rt/itcms/iter
+   local.set $obj
+   local.get $obj
+   global.get $~lib/rt/itcms/toSpace
+   i32.ne
+   if
+    local.get $obj
+    call $~lib/rt/itcms/Object#get:next
+    global.set $~lib/rt/itcms/iter
+    i32.const 1
+    drop
+    local.get $obj
+    call $~lib/rt/itcms/Object#get:color
+    global.get $~lib/rt/itcms/white
+    i32.eqz
+    i32.eq
+    i32.eqz
+    if
+     i32.const 0
+     i32.const 272
+     i32.const 229
+     i32.const 20
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $obj
+    call $~lib/rt/itcms/free
+    i32.const 10
+    return
+   end
+   global.get $~lib/rt/itcms/toSpace
+   global.get $~lib/rt/itcms/toSpace
+   call $~lib/rt/itcms/Object#set:nextWithColor
+   global.get $~lib/rt/itcms/toSpace
+   global.get $~lib/rt/itcms/toSpace
+   call $~lib/rt/itcms/Object#set:prev
+   i32.const 0
+   global.set $~lib/rt/itcms/state
+   br $break|0
+  end
+  i32.const 0
+  return
+ )
+ (func $~lib/rt/itcms/interrupt
+  (local $budget i32)
+  i32.const 0
+  drop
+  i32.const 0
+  drop
+  i32.const 1024
+  i32.const 200
+  i32.mul
+  i32.const 100
+  i32.div_u
+  local.set $budget
+  loop $do-loop|0
+   local.get $budget
+   call $~lib/rt/itcms/step
+   i32.sub
+   local.set $budget
+   global.get $~lib/rt/itcms/state
+   i32.const 0
+   i32.eq
+   if
+    i32.const 0
+    drop
+    global.get $~lib/rt/itcms/total
+    i64.extend_i32_u
+    i32.const 200
+    i64.extend_i32_u
+    i64.mul
+    i64.const 100
+    i64.div_u
+    i32.wrap_i64
+    i32.const 1024
+    i32.add
+    global.set $~lib/rt/itcms/threshold
+    i32.const 0
+    drop
+    return
+   end
+   local.get $budget
+   i32.const 0
+   i32.gt_s
+   br_if $do-loop|0
+  end
+  i32.const 0
+  drop
+  global.get $~lib/rt/itcms/total
+  i32.const 1024
+  global.get $~lib/rt/itcms/total
+  global.get $~lib/rt/itcms/threshold
+  i32.sub
+  i32.const 1024
+  i32.lt_u
+  i32.mul
+  i32.add
+  global.set $~lib/rt/itcms/threshold
+  i32.const 0
+  drop
+ )
+ (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32)
+  local.get $size
+  i32.const 12
+  i32.le_u
+  if (result i32)
+   i32.const 12
+  else
+   local.get $size
+   i32.const 4
+   i32.add
+   i32.const 15
+   i32.add
+   i32.const 15
+   i32.const -1
+   i32.xor
+   i32.and
+   i32.const 4
+   i32.sub
+  end
+  return
+ )
+ (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32)
+  local.get $size
+  i32.const 1073741820
+  i32.gt_u
+  if
+   i32.const 208
+   i32.const 544
+   i32.const 462
+   i32.const 29
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $size
+  call $~lib/rt/tlsf/computeSize
+  return
+ )
+ (func $~lib/rt/tlsf/roundSize (param $size i32) (result i32)
+  local.get $size
+  i32.const 536870910
+  i32.lt_u
+  if (result i32)
+   local.get $size
+   i32.const 1
+   i32.const 27
+   local.get $size
+   i32.clz
+   i32.sub
+   i32.shl
+   i32.add
+   i32.const 1
+   i32.sub
+  else
+   local.get $size
+  end
+  return
+ )
+ (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32)
+  (local $fl i32)
+  (local $sl i32)
+  (local $requestSize i32)
+  (local $root|5 i32)
+  (local $fl|6 i32)
+  (local $slMap i32)
+  (local $head i32)
+  (local $flMap i32)
+  (local $root|10 i32)
+  (local $fl|11 i32)
+  (local $root|12 i32)
+  (local $fl|13 i32)
+  (local $sl|14 i32)
+  (local $root|15 i32)
+  (local $fl|16 i32)
+  (local $sl|17 i32)
+  local.get $size
+  i32.const 256
+  i32.lt_u
+  if
+   i32.const 0
+   local.set $fl
+   local.get $size
+   i32.const 4
+   i32.shr_u
+   local.set $sl
+  else
+   local.get $size
+   call $~lib/rt/tlsf/roundSize
+   local.set $requestSize
+   i32.const 4
+   i32.const 8
+   i32.mul
+   i32.const 1
+   i32.sub
+   local.get $requestSize
+   i32.clz
+   i32.sub
+   local.set $fl
+   local.get $requestSize
+   local.get $fl
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 1
+   i32.const 4
+   i32.shl
+   i32.xor
+   local.set $sl
+   local.get $fl
+   i32.const 8
+   i32.const 1
+   i32.sub
+   i32.sub
+   local.set $fl
+  end
+  i32.const 1
+  drop
+  local.get $fl
+  i32.const 23
+  i32.lt_u
+  if (result i32)
+   local.get $sl
+   i32.const 16
+   i32.lt_u
+  else
+   i32.const 0
+  end
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 334
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  block $~lib/rt/tlsf/GETSL|inlined.2 (result i32)
+   local.get $root
+   local.set $root|5
+   local.get $fl
+   local.set $fl|6
+   local.get $root|5
+   local.get $fl|6
+   i32.const 2
+   i32.shl
+   i32.add
+   i32.load $0 offset=4
+   br $~lib/rt/tlsf/GETSL|inlined.2
+  end
+  i32.const 0
+  i32.const -1
+  i32.xor
+  local.get $sl
+  i32.shl
+  i32.and
+  local.set $slMap
+  i32.const 0
+  local.set $head
+  local.get $slMap
+  i32.eqz
+  if
+   local.get $root
+   call $~lib/rt/tlsf/Root#get:flMap
+   i32.const 0
+   i32.const -1
+   i32.xor
+   local.get $fl
+   i32.const 1
+   i32.add
+   i32.shl
+   i32.and
+   local.set $flMap
+   local.get $flMap
+   i32.eqz
+   if
+    i32.const 0
+    local.set $head
+   else
+    local.get $flMap
+    i32.ctz
+    local.set $fl
+    block $~lib/rt/tlsf/GETSL|inlined.3 (result i32)
+     local.get $root
+     local.set $root|10
+     local.get $fl
+     local.set $fl|11
+     local.get $root|10
+     local.get $fl|11
+     i32.const 2
+     i32.shl
+     i32.add
+     i32.load $0 offset=4
+     br $~lib/rt/tlsf/GETSL|inlined.3
+    end
+    local.set $slMap
+    i32.const 1
+    drop
+    local.get $slMap
+    i32.eqz
+    if
+     i32.const 0
+     i32.const 544
+     i32.const 347
+     i32.const 18
+     call $~lib/builtins/abort
+     unreachable
+    end
+    block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32)
+     local.get $root
+     local.set $root|12
+     local.get $fl
+     local.set $fl|13
+     local.get $slMap
+     i32.ctz
+     local.set $sl|14
+     local.get $root|12
+     local.get $fl|13
+     i32.const 4
+     i32.shl
+     local.get $sl|14
+     i32.add
+     i32.const 2
+     i32.shl
+     i32.add
+     i32.load $0 offset=96
+     br $~lib/rt/tlsf/GETHEAD|inlined.2
+    end
+    local.set $head
+   end
+  else
+   block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32)
+    local.get $root
+    local.set $root|15
+    local.get $fl
+    local.set $fl|16
+    local.get $slMap
+    i32.ctz
+    local.set $sl|17
+    local.get $root|15
+    local.get $fl|16
+    i32.const 4
+    i32.shl
+    local.get $sl|17
+    i32.add
+    i32.const 2
+    i32.shl
+    i32.add
+    i32.load $0 offset=96
+    br $~lib/rt/tlsf/GETHEAD|inlined.3
+   end
+   local.set $head
+  end
+  local.get $head
+  return
+ )
+ (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32)
+  (local $pagesBefore i32)
+  (local $root|3 i32)
+  (local $pagesNeeded i32)
+  (local $5 i32)
+  (local $6 i32)
+  (local $pagesWanted i32)
+  (local $pagesAfter i32)
+  i32.const 0
+  drop
+  local.get $size
+  i32.const 256
+  i32.ge_u
+  if
+   local.get $size
+   call $~lib/rt/tlsf/roundSize
+   local.set $size
+  end
+  memory.size $0
+  local.set $pagesBefore
+  local.get $size
+  i32.const 4
+  local.get $pagesBefore
+  i32.const 16
+  i32.shl
+  i32.const 4
+  i32.sub
+  block $~lib/rt/tlsf/GETTAIL|inlined.1 (result i32)
+   local.get $root
+   local.set $root|3
+   local.get $root|3
+   i32.load $0 offset=1568
+   br $~lib/rt/tlsf/GETTAIL|inlined.1
+  end
+  i32.ne
+  i32.shl
+  i32.add
+  local.set $size
+  local.get $size
+  i32.const 65535
+  i32.add
+  i32.const 65535
+  i32.const -1
+  i32.xor
+  i32.and
+  i32.const 16
+  i32.shr_u
+  local.set $pagesNeeded
+  local.get $pagesBefore
+  local.tee $5
+  local.get $pagesNeeded
+  local.tee $6
+  local.get $5
+  local.get $6
+  i32.gt_s
+  select
+  local.set $pagesWanted
+  local.get $pagesWanted
+  memory.grow $0
+  i32.const 0
+  i32.lt_s
+  if
+   local.get $pagesNeeded
+   memory.grow $0
+   i32.const 0
+   i32.lt_s
+   if
+    unreachable
+   end
+  end
+  i32.const 1
+  drop
+  call $rt/grow-handler/handler
+  memory.size $0
+  local.set $pagesAfter
+  local.get $root
+  local.get $pagesBefore
+  i32.const 16
+  i32.shl
+  local.get $pagesAfter
+  i64.extend_i32_s
+  i64.const 16
+  i64.shl
+  call $~lib/rt/tlsf/addMemory
+  drop
+ )
+ (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32)
+  (local $blockInfo i32)
+  (local $remaining i32)
+  (local $spare i32)
+  (local $block|6 i32)
+  (local $block|7 i32)
+  local.get $block
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  local.set $blockInfo
+  i32.const 1
+  drop
+  local.get $size
+  i32.const 4
+  i32.add
+  i32.const 15
+  i32.and
+  i32.eqz
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 361
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $blockInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  local.get $size
+  i32.sub
+  local.set $remaining
+  local.get $remaining
+  i32.const 4
+  i32.const 12
+  i32.add
+  i32.ge_u
+  if
+   local.get $block
+   local.get $size
+   local.get $blockInfo
+   i32.const 2
+   i32.and
+   i32.or
+   call $~lib/rt/common/BLOCK#set:mmInfo
+   local.get $block
+   i32.const 4
+   i32.add
+   local.get $size
+   i32.add
+   local.set $spare
+   local.get $spare
+   local.get $remaining
+   i32.const 4
+   i32.sub
+   i32.const 1
+   i32.or
+   call $~lib/rt/common/BLOCK#set:mmInfo
+   local.get $root
+   local.get $spare
+   call $~lib/rt/tlsf/insertBlock
+  else
+   local.get $block
+   local.get $blockInfo
+   i32.const 1
+   i32.const -1
+   i32.xor
+   i32.and
+   call $~lib/rt/common/BLOCK#set:mmInfo
+   block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32)
+    local.get $block
+    local.set $block|7
+    local.get $block|7
+    i32.const 4
+    i32.add
+    local.get $block|7
+    call $~lib/rt/common/BLOCK#get:mmInfo
+    i32.const 3
+    i32.const -1
+    i32.xor
+    i32.and
+    i32.add
+    br $~lib/rt/tlsf/GETRIGHT|inlined.3
+   end
+   block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32)
+    local.get $block
+    local.set $block|6
+    local.get $block|6
+    i32.const 4
+    i32.add
+    local.get $block|6
+    call $~lib/rt/common/BLOCK#get:mmInfo
+    i32.const 3
+    i32.const -1
+    i32.xor
+    i32.and
+    i32.add
+    br $~lib/rt/tlsf/GETRIGHT|inlined.2
+   end
+   call $~lib/rt/common/BLOCK#get:mmInfo
+   i32.const 2
+   i32.const -1
+   i32.xor
+   i32.and
+   call $~lib/rt/common/BLOCK#set:mmInfo
+  end
+ )
+ (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32)
+  (local $payloadSize i32)
+  (local $block i32)
+  local.get $size
+  call $~lib/rt/tlsf/prepareSize
+  local.set $payloadSize
+  local.get $root
+  local.get $payloadSize
+  call $~lib/rt/tlsf/searchBlock
+  local.set $block
+  local.get $block
+  i32.eqz
+  if
+   local.get $root
+   local.get $payloadSize
+   call $~lib/rt/tlsf/growMemory
+   local.get $root
+   local.get $payloadSize
+   call $~lib/rt/tlsf/searchBlock
+   local.set $block
+   i32.const 1
+   drop
+   local.get $block
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 544
+    i32.const 503
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+  end
+  i32.const 1
+  drop
+  local.get $block
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  local.get $payloadSize
+  i32.ge_u
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 544
+   i32.const 505
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $root
+  local.get $block
+  call $~lib/rt/tlsf/removeBlock
+  local.get $root
+  local.get $block
+  local.get $payloadSize
+  call $~lib/rt/tlsf/prepareBlock
+  i32.const 0
+  drop
+  local.get $block
+  return
+ )
+ (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32)
+  global.get $~lib/rt/tlsf/ROOT
+  i32.eqz
+  if
+   call $~lib/rt/tlsf/initialize
+  end
+  global.get $~lib/rt/tlsf/ROOT
+  local.get $size
+  call $~lib/rt/tlsf/allocateBlock
+  i32.const 4
+  i32.add
+  return
+ )
+ (func $~lib/rt/itcms/Object#set:rtId (param $this i32) (param $rtId i32)
+  local.get $this
+  local.get $rtId
+  i32.store $0 offset=12
+ )
+ (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32)
+  (local $obj i32)
+  (local $ptr i32)
+  local.get $size
+  i32.const 1073741804
+  i32.ge_u
+  if
+   i32.const 208
+   i32.const 272
+   i32.const 261
+   i32.const 31
+   call $~lib/builtins/abort
+   unreachable
+  end
+  global.get $~lib/rt/itcms/total
+  global.get $~lib/rt/itcms/threshold
+  i32.ge_u
+  if
+   call $~lib/rt/itcms/interrupt
+  end
+  i32.const 16
+  local.get $size
+  i32.add
+  call $~lib/rt/tlsf/__alloc
+  i32.const 4
+  i32.sub
+  local.set $obj
+  local.get $obj
+  local.get $id
+  call $~lib/rt/itcms/Object#set:rtId
+  local.get $obj
+  local.get $size
+  call $~lib/rt/itcms/Object#set:rtSize
+  local.get $obj
+  global.get $~lib/rt/itcms/fromSpace
+  global.get $~lib/rt/itcms/white
+  call $~lib/rt/itcms/Object#linkTo
+  global.get $~lib/rt/itcms/total
+  local.get $obj
+  call $~lib/rt/itcms/Object#get:size
+  i32.add
+  global.set $~lib/rt/itcms/total
+  local.get $obj
+  i32.const 20
+  i32.add
+  local.set $ptr
+  local.get $ptr
+  i32.const 0
+  local.get $size
+  memory.fill $0
+  local.get $ptr
+  return
+ )
+ (func $~lib/rt/itcms/Object#get:rtSize (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=16
+ )
+ (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32)
+  (local $oldObj i32)
+  (local $newPtr i32)
+  (local $4 i32)
+  (local $5 i32)
+  local.get $oldPtr
+  i32.const 20
+  i32.sub
+  local.set $oldObj
+  local.get $size
+  local.get $oldObj
+  call $~lib/rt/common/BLOCK#get:mmInfo
+  i32.const 3
+  i32.const -1
+  i32.xor
+  i32.and
+  i32.const 16
+  i32.sub
+  i32.le_u
+  if
+   local.get $oldObj
+   local.get $size
+   call $~lib/rt/itcms/Object#set:rtSize
+   local.get $oldPtr
+   return
+  end
+  local.get $size
+  local.get $oldObj
+  call $~lib/rt/itcms/Object#get:rtId
+  call $~lib/rt/itcms/__new
+  local.set $newPtr
+  local.get $newPtr
+  local.get $oldPtr
+  local.get $size
+  local.tee $4
+  local.get $oldObj
+  call $~lib/rt/itcms/Object#get:rtSize
+  local.tee $5
+  local.get $4
+  local.get $5
+  i32.lt_u
+  select
+  memory.copy $0 $0
+  local.get $newPtr
+  return
+ )
+ (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32)
+  (local $child i32)
+  (local $parent i32)
+  (local $parentColor i32)
+  local.get $childPtr
+  i32.eqz
+  if
+   return
+  end
+  i32.const 1
+  drop
+  local.get $parentPtr
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 272
+   i32.const 295
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $childPtr
+  i32.const 20
+  i32.sub
+  local.set $child
+  local.get $child
+  call $~lib/rt/itcms/Object#get:color
+  global.get $~lib/rt/itcms/white
+  i32.eq
+  if
+   local.get $parentPtr
+   i32.const 20
+   i32.sub
+   local.set $parent
+   local.get $parent
+   call $~lib/rt/itcms/Object#get:color
+   local.set $parentColor
+   local.get $parentColor
+   global.get $~lib/rt/itcms/white
+   i32.eqz
+   i32.eq
+   if
+    local.get $expectMultiple
+    if
+     local.get $parent
+     call $~lib/rt/itcms/Object#makeGray
+    else
+     local.get $child
+     call $~lib/rt/itcms/Object#makeGray
+    end
+   else
+    local.get $parentColor
+    i32.const 3
+    i32.eq
+    if (result i32)
+     global.get $~lib/rt/itcms/state
+     i32.const 1
+     i32.eq
+    else
+     i32.const 0
+    end
+    if
+     local.get $child
+     call $~lib/rt/itcms/Object#makeGray
+    end
+   end
+  end
+ )
+ (func $~lib/array/Array<i32>#get:dataStart (param $this i32) (result i32)
+  local.get $this
+  i32.load $0 offset=4
+ )
+ (func $~lib/array/Array<i32>#set:length_ (param $this i32) (param $length_ i32)
+  local.get $this
+  local.get $length_
+  i32.store $0 offset=12
+ )
+ (func $~lib/rt/__visit_globals (param $0 i32)
+  (local $1 i32)
+  global.get $rt/grow-handler/leak
+  local.tee $1
+  if
+   local.get $1
+   local.get $0
+   call $~lib/rt/itcms/__visit
+  end
+  i32.const 400
+  local.get $0
+  call $~lib/rt/itcms/__visit
+  i32.const 112
+  local.get $0
+  call $~lib/rt/itcms/__visit
+  i32.const 208
+  local.get $0
+  call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32)
+  (local $2 i32)
+  local.get $0
+  local.get $1
+  call $~lib/object/Object~visit
+  local.get $0
+  i32.load $0
+  local.tee $2
+  if
+   local.get $2
+   local.get $1
+   call $~lib/rt/itcms/__visit
+  end
+ )
+ (func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
+  nop
+ )
+ (func $~lib/array/Array<i32>#get:buffer (param $this i32) (result i32)
+  local.get $this
+  i32.load $0
+ )
+ (func $~lib/array/Array<i32>~visit (param $0 i32) (param $1 i32)
+  local.get $0
+  local.get $1
+  call $~lib/object/Object~visit
+  local.get $0
+  local.get $1
+  call $~lib/array/Array<i32>#__visit
+ )
+ (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32)
+  block $invalid
+   block $~lib/array/Array<i32>
+    block $~lib/arraybuffer/ArrayBufferView
+     block $~lib/string/String
+      block $~lib/arraybuffer/ArrayBuffer
+       block $~lib/object/Object
+        local.get $0
+        i32.const 8
+        i32.sub
+        i32.load $0
+        br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/array/Array<i32> $invalid
+       end
+       return
+      end
+      return
+     end
+     return
+    end
+    local.get $0
+    local.get $1
+    call $~lib/arraybuffer/ArrayBufferView~visit
+    return
+   end
+   local.get $0
+   local.get $1
+   call $~lib/array/Array<i32>~visit
+   return
+  end
+  unreachable
+ )
+ (func $~start
+  memory.size $0
+  i32.const 16
+  i32.shl
+  global.get $~lib/memory/__heap_base
+  i32.sub
+  i32.const 1
+  i32.shr_u
+  global.set $~lib/rt/itcms/threshold
+  i32.const 320
+  call $~lib/rt/itcms/initLazy
+  global.set $~lib/rt/itcms/pinSpace
+  i32.const 352
+  call $~lib/rt/itcms/initLazy
+  global.set $~lib/rt/itcms/toSpace
+  i32.const 496
+  call $~lib/rt/itcms/initLazy
+  global.set $~lib/rt/itcms/fromSpace
+ )
+ (func $~stack_check
+  global.get $~lib/memory/__stack_pointer
+  global.get $~lib/memory/__data_end
+  i32.lt_s
+  if
+   i32.const 33408
+   i32.const 33456
+   i32.const 1
+   i32.const 1
+   call $~lib/builtins/abort
+   unreachable
+  end
+ )
+ (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32)
+  (local $oldCapacity i32)
+  (local $oldData i32)
+  (local $6 i32)
+  (local $7 i32)
+  (local $newCapacity i32)
+  (local $9 i32)
+  (local $10 i32)
+  (local $11 i32)
+  (local $12 i32)
+  (local $newData i32)
+  (local $14 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  call $~stack_check
+  global.get $~lib/memory/__stack_pointer
+  i32.const 0
+  i32.store $0
+  local.get $array
+  local.set $14
+  global.get $~lib/memory/__stack_pointer
+  local.get $14
+  i32.store $0
+  local.get $14
+  call $~lib/arraybuffer/ArrayBufferView#get:byteLength
+  local.set $oldCapacity
+  local.get $newSize
+  local.get $oldCapacity
+  local.get $alignLog2
+  i32.shr_u
+  i32.gt_u
+  if
+   local.get $newSize
+   i32.const 1073741820
+   local.get $alignLog2
+   i32.shr_u
+   i32.gt_u
+   if
+    i32.const 112
+    i32.const 160
+    i32.const 19
+    i32.const 48
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $array
+   local.set $14
+   global.get $~lib/memory/__stack_pointer
+   local.get $14
+   i32.store $0
+   local.get $14
+   call $~lib/arraybuffer/ArrayBufferView#get:buffer
+   local.set $oldData
+   local.get $newSize
+   local.tee $6
+   i32.const 8
+   local.tee $7
+   local.get $6
+   local.get $7
+   i32.gt_u
+   select
+   local.get $alignLog2
+   i32.shl
+   local.set $newCapacity
+   local.get $canGrow
+   if
+    local.get $oldCapacity
+    i32.const 1
+    i32.shl
+    local.tee $9
+    i32.const 1073741820
+    local.tee $10
+    local.get $9
+    local.get $10
+    i32.lt_u
+    select
+    local.tee $11
+    local.get $newCapacity
+    local.tee $12
+    local.get $11
+    local.get $12
+    i32.gt_u
+    select
+    local.set $newCapacity
+   end
+   local.get $oldData
+   local.get $newCapacity
+   call $~lib/rt/itcms/__renew
+   local.set $newData
+   i32.const 2
+   global.get $~lib/shared/runtime/Runtime.Incremental
+   i32.ne
+   drop
+   local.get $newData
+   local.get $oldData
+   i32.ne
+   if
+    local.get $array
+    local.get $newData
+    i32.store $0
+    local.get $array
+    local.get $newData
+    i32.store $0 offset=4
+    local.get $array
+    local.get $newData
+    i32.const 0
+    call $~lib/rt/itcms/__link
+   end
+   local.get $array
+   local.get $newCapacity
+   i32.store $0 offset=8
+  end
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.add
+  global.set $~lib/memory/__stack_pointer
+ )
+ (func $~lib/array/Array<i32>#push (param $this i32) (param $value i32) (result i32)
+  (local $oldLen i32)
+  (local $len i32)
+  (local $4 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  call $~stack_check
+  global.get $~lib/memory/__stack_pointer
+  i32.const 0
+  i32.store $0
+  local.get $this
+  local.set $4
+  global.get $~lib/memory/__stack_pointer
+  local.get $4
+  i32.store $0
+  local.get $4
+  call $~lib/array/Array<i32>#get:length_
+  local.set $oldLen
+  local.get $oldLen
+  i32.const 1
+  i32.add
+  local.set $len
+  local.get $this
+  local.get $len
+  i32.const 2
+  i32.const 1
+  call $~lib/array/ensureCapacity
+  i32.const 0
+  drop
+  local.get $this
+  local.set $4
+  global.get $~lib/memory/__stack_pointer
+  local.get $4
+  i32.store $0
+  local.get $4
+  call $~lib/array/Array<i32>#get:dataStart
+  local.get $oldLen
+  i32.const 2
+  i32.shl
+  i32.add
+  local.get $value
+  i32.store $0
+  local.get $this
+  local.set $4
+  global.get $~lib/memory/__stack_pointer
+  local.get $4
+  i32.store $0
+  local.get $4
+  local.get $len
+  call $~lib/array/Array<i32>#set:length_
+  local.get $len
+  local.set $4
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.add
+  global.set $~lib/memory/__stack_pointer
+  local.get $4
+  return
+ )
+ (func $rt/grow-handler/stress
+  (local $i i32)
+  (local $1 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  call $~stack_check
+  global.get $~lib/memory/__stack_pointer
+  i32.const 0
+  i32.store $0
+  i32.const 0
+  local.set $i
+  loop $for-loop|0
+   local.get $i
+   i32.const 65536
+   i32.lt_s
+   if
+    global.get $rt/grow-handler/leak
+    local.set $1
+    global.get $~lib/memory/__stack_pointer
+    local.get $1
+    i32.store $0
+    local.get $1
+    local.get $i
+    call $~lib/array/Array<i32>#push
+    drop
+    local.get $i
+    i32.const 1
+    i32.add
+    local.set $i
+    br $for-loop|0
+   end
+  end
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.add
+  global.set $~lib/memory/__stack_pointer
+ )
+ (func $~lib/array/Array<i32>#__visit (param $this i32) (param $cookie i32)
+  (local $2 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  call $~stack_check
+  global.get $~lib/memory/__stack_pointer
+  i32.const 0
+  i32.store $0
+  i32.const 0
+  drop
+  local.get $this
+  local.set $2
+  global.get $~lib/memory/__stack_pointer
+  local.get $2
+  i32.store $0
+  local.get $2
+  call $~lib/array/Array<i32>#get:buffer
+  local.get $cookie
+  call $~lib/rt/itcms/__visit
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.add
+  global.set $~lib/memory/__stack_pointer
+ )
+)
diff --git a/tests/compiler/rt/grow-handler.js b/tests/compiler/rt/grow-handler.js
new file mode 100644
index 0000000000..11668221b1
--- /dev/null
+++ b/tests/compiler/rt/grow-handler.js
@@ -0,0 +1,12 @@
+let growCount = 0;
+
+export function preInstantiate(imports) {
+  imports.grow = {
+    handler() { growCount++; }
+  };
+}
+
+export function postInstantiate({exports}) {
+  exports.stress();
+  if (!growCount) throw new Error("did not detect growth on large allocation");
+}
\ No newline at end of file
diff --git a/tests/compiler/rt/grow-handler.json b/tests/compiler/rt/grow-handler.json
new file mode 100644
index 0000000000..3675c01e3c
--- /dev/null
+++ b/tests/compiler/rt/grow-handler.json
@@ -0,0 +1,5 @@
+{
+    "asc_flags": [
+        "-u", "ASC_RT_GROW_HANDLER=rt/grow-handler/handler"
+    ]
+}
\ No newline at end of file
diff --git a/tests/compiler/rt/grow-handler.release.wat b/tests/compiler/rt/grow-handler.release.wat
new file mode 100644
index 0000000000..d5b6104229
--- /dev/null
+++ b/tests/compiler/rt/grow-handler.release.wat
@@ -0,0 +1,1896 @@
+(module
+ (type $none_=>_none (func))
+ (type $i32_=>_none (func (param i32)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
+ (type $i32_i32_i64_=>_none (func (param i32 i32 i64)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
+ (import "grow" "handler" (func $rt/grow-handler/handler))
+ (global $~lib/rt/itcms/total (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/state (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/iter (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/white (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
+ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 34408))
+ (memory $0 1)
+ (data $0 (i32.const 1036) "\1c")
+ (data $0.1 (i32.const 1048) "\01")
+ (data $1 (i32.const 1068) ",")
+ (data $1.1 (i32.const 1080) "\04\00\00\00\10\00\00\00 \04\00\00 \04")
+ (data $2 (i32.const 1116) ",")
+ (data $2.1 (i32.const 1128) "\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h")
+ (data $3 (i32.const 1164) ",")
+ (data $3.1 (i32.const 1176) "\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
+ (data $4 (i32.const 1212) "<")
+ (data $4.1 (i32.const 1224) "\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e")
+ (data $5 (i32.const 1276) "<")
+ (data $5.1 (i32.const 1288) "\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s")
+ (data $8 (i32.const 1404) "<")
+ (data $8.1 (i32.const 1416) "\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e")
+ (data $9 (i32.const 1468) ",")
+ (data $9.1 (i32.const 1480) "\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s")
+ (data $11 (i32.const 1548) "<")
+ (data $11.1 (i32.const 1560) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s")
+ (data $12 (i32.const 1616) "\05\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00\02\t")
+ (export "stress" (func $rt/grow-handler/stress))
+ (export "memory" (memory $0))
+ (start $~start)
+ (func $~lib/rt/itcms/visitRoots
+  (local $0 i32)
+  (local $1 i32)
+  i32.const 1088
+  call $byn-split-outlined-A$~lib/rt/itcms/__visit
+  i32.const 1424
+  call $byn-split-outlined-A$~lib/rt/itcms/__visit
+  i32.const 1136
+  call $byn-split-outlined-A$~lib/rt/itcms/__visit
+  i32.const 1232
+  call $byn-split-outlined-A$~lib/rt/itcms/__visit
+  global.get $~lib/rt/itcms/pinSpace
+  local.tee $1
+  i32.load $0 offset=4
+  i32.const -4
+  i32.and
+  local.set $0
+  loop $while-continue|0
+   local.get $0
+   local.get $1
+   i32.ne
+   if
+    local.get $0
+    i32.load $0 offset=4
+    i32.const 3
+    i32.and
+    i32.const 3
+    i32.ne
+    if
+     i32.const 0
+     i32.const 1296
+     i32.const 160
+     i32.const 16
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $0
+    i32.const 20
+    i32.add
+    call $~lib/rt/__visit_members
+    local.get $0
+    i32.load $0 offset=4
+    i32.const -4
+    i32.and
+    local.set $0
+    br $while-continue|0
+   end
+  end
+ )
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
+  (local $1 i32)
+  (local $2 i32)
+  (local $3 i32)
+  local.get $0
+  global.get $~lib/rt/itcms/iter
+  i32.eq
+  if
+   local.get $0
+   i32.load $0 offset=8
+   local.tee $1
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 1296
+    i32.const 148
+    i32.const 30
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $1
+   global.set $~lib/rt/itcms/iter
+  end
+  block $__inlined_func$~lib/rt/itcms/Object#unlink
+   local.get $0
+   i32.load $0 offset=4
+   i32.const -4
+   i32.and
+   local.tee $1
+   i32.eqz
+   if
+    local.get $0
+    i32.load $0 offset=8
+    i32.eqz
+    local.get $0
+    i32.const 34408
+    i32.lt_u
+    i32.and
+    i32.eqz
+    if
+     i32.const 0
+     i32.const 1296
+     i32.const 128
+     i32.const 18
+     call $~lib/builtins/abort
+     unreachable
+    end
+    br $__inlined_func$~lib/rt/itcms/Object#unlink
+   end
+   local.get $0
+   i32.load $0 offset=8
+   local.tee $2
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 1296
+    i32.const 132
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $1
+   local.get $2
+   i32.store $0 offset=8
+   local.get $2
+   local.get $1
+   local.get $2
+   i32.load $0 offset=4
+   i32.const 3
+   i32.and
+   i32.or
+   i32.store $0 offset=4
+  end
+  global.get $~lib/rt/itcms/toSpace
+  local.set $2
+  local.get $0
+  i32.load $0 offset=12
+  local.tee $1
+  i32.const 2
+  i32.le_u
+  if (result i32)
+   i32.const 1
+  else
+   local.get $1
+   i32.const 1616
+   i32.load $0
+   i32.gt_u
+   if
+    i32.const 1424
+    i32.const 1488
+    i32.const 21
+    i32.const 28
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $1
+   i32.const 2
+   i32.shl
+   i32.const 1620
+   i32.add
+   i32.load $0
+   i32.const 32
+   i32.and
+  end
+  local.set $3
+  local.get $2
+  i32.load $0 offset=8
+  local.set $1
+  local.get $0
+  global.get $~lib/rt/itcms/white
+  i32.eqz
+  i32.const 2
+  local.get $3
+  select
+  local.get $2
+  i32.or
+  i32.store $0 offset=4
+  local.get $0
+  local.get $1
+  i32.store $0 offset=8
+  local.get $1
+  local.get $0
+  local.get $1
+  i32.load $0 offset=4
+  i32.const 3
+  i32.and
+  i32.or
+  i32.store $0 offset=4
+  local.get $2
+  local.get $0
+  i32.store $0 offset=8
+ )
+ (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32)
+  (local $2 i32)
+  (local $3 i32)
+  (local $4 i32)
+  (local $5 i32)
+  local.get $1
+  i32.load $0
+  local.tee $2
+  i32.const 1
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 268
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $2
+  i32.const -4
+  i32.and
+  local.tee $2
+  i32.const 12
+  i32.lt_u
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 270
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $2
+  i32.const 256
+  i32.lt_u
+  if (result i32)
+   local.get $2
+   i32.const 4
+   i32.shr_u
+  else
+   i32.const 31
+   i32.const 1073741820
+   local.get $2
+   local.get $2
+   i32.const 1073741820
+   i32.ge_u
+   select
+   local.tee $2
+   i32.clz
+   i32.sub
+   local.tee $4
+   i32.const 7
+   i32.sub
+   local.set $3
+   local.get $2
+   local.get $4
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 16
+   i32.xor
+  end
+  local.tee $2
+  i32.const 16
+  i32.lt_u
+  local.get $3
+  i32.const 23
+  i32.lt_u
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 284
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $1
+  i32.load $0 offset=8
+  local.set $5
+  local.get $1
+  i32.load $0 offset=4
+  local.tee $4
+  if
+   local.get $4
+   local.get $5
+   i32.store $0 offset=8
+  end
+  local.get $5
+  if
+   local.get $5
+   local.get $4
+   i32.store $0 offset=4
+  end
+  local.get $1
+  local.get $0
+  local.get $3
+  i32.const 4
+  i32.shl
+  local.get $2
+  i32.add
+  i32.const 2
+  i32.shl
+  i32.add
+  i32.load $0 offset=96
+  i32.eq
+  if
+   local.get $0
+   local.get $3
+   i32.const 4
+   i32.shl
+   local.get $2
+   i32.add
+   i32.const 2
+   i32.shl
+   i32.add
+   local.get $5
+   i32.store $0 offset=96
+   local.get $5
+   i32.eqz
+   if
+    local.get $0
+    local.get $3
+    i32.const 2
+    i32.shl
+    i32.add
+    local.tee $1
+    i32.load $0 offset=4
+    i32.const -2
+    local.get $2
+    i32.rotl
+    i32.and
+    local.set $2
+    local.get $1
+    local.get $2
+    i32.store $0 offset=4
+    local.get $2
+    i32.eqz
+    if
+     local.get $0
+     local.get $0
+     i32.load $0
+     i32.const -2
+     local.get $3
+     i32.rotl
+     i32.and
+     i32.store $0
+    end
+   end
+  end
+ )
+ (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32)
+  (local $2 i32)
+  (local $3 i32)
+  (local $4 i32)
+  (local $5 i32)
+  (local $6 i32)
+  local.get $1
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 201
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $1
+  i32.load $0
+  local.tee $3
+  i32.const 1
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 203
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $1
+  i32.const 4
+  i32.add
+  local.get $1
+  i32.load $0
+  i32.const -4
+  i32.and
+  i32.add
+  local.tee $4
+  i32.load $0
+  local.tee $2
+  i32.const 1
+  i32.and
+  if
+   local.get $0
+   local.get $4
+   call $~lib/rt/tlsf/removeBlock
+   local.get $1
+   local.get $3
+   i32.const 4
+   i32.add
+   local.get $2
+   i32.const -4
+   i32.and
+   i32.add
+   local.tee $3
+   i32.store $0
+   local.get $1
+   i32.const 4
+   i32.add
+   local.get $1
+   i32.load $0
+   i32.const -4
+   i32.and
+   i32.add
+   local.tee $4
+   i32.load $0
+   local.set $2
+  end
+  local.get $3
+  i32.const 2
+  i32.and
+  if
+   local.get $1
+   i32.const 4
+   i32.sub
+   i32.load $0
+   local.tee $1
+   i32.load $0
+   local.tee $6
+   i32.const 1
+   i32.and
+   i32.eqz
+   if
+    i32.const 0
+    i32.const 1568
+    i32.const 221
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $0
+   local.get $1
+   call $~lib/rt/tlsf/removeBlock
+   local.get $1
+   local.get $6
+   i32.const 4
+   i32.add
+   local.get $3
+   i32.const -4
+   i32.and
+   i32.add
+   local.tee $3
+   i32.store $0
+  end
+  local.get $4
+  local.get $2
+  i32.const 2
+  i32.or
+  i32.store $0
+  local.get $3
+  i32.const -4
+  i32.and
+  local.tee $2
+  i32.const 12
+  i32.lt_u
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 233
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $4
+  local.get $1
+  i32.const 4
+  i32.add
+  local.get $2
+  i32.add
+  i32.ne
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 234
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $4
+  i32.const 4
+  i32.sub
+  local.get $1
+  i32.store $0
+  local.get $2
+  i32.const 256
+  i32.lt_u
+  if (result i32)
+   local.get $2
+   i32.const 4
+   i32.shr_u
+  else
+   i32.const 31
+   i32.const 1073741820
+   local.get $2
+   local.get $2
+   i32.const 1073741820
+   i32.ge_u
+   select
+   local.tee $2
+   i32.clz
+   i32.sub
+   local.tee $3
+   i32.const 7
+   i32.sub
+   local.set $5
+   local.get $2
+   local.get $3
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 16
+   i32.xor
+  end
+  local.tee $2
+  i32.const 16
+  i32.lt_u
+  local.get $5
+  i32.const 23
+  i32.lt_u
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 251
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $0
+  local.get $5
+  i32.const 4
+  i32.shl
+  local.get $2
+  i32.add
+  i32.const 2
+  i32.shl
+  i32.add
+  i32.load $0 offset=96
+  local.set $3
+  local.get $1
+  i32.const 0
+  i32.store $0 offset=4
+  local.get $1
+  local.get $3
+  i32.store $0 offset=8
+  local.get $3
+  if
+   local.get $3
+   local.get $1
+   i32.store $0 offset=4
+  end
+  local.get $0
+  local.get $5
+  i32.const 4
+  i32.shl
+  local.get $2
+  i32.add
+  i32.const 2
+  i32.shl
+  i32.add
+  local.get $1
+  i32.store $0 offset=96
+  local.get $0
+  local.get $0
+  i32.load $0
+  i32.const 1
+  local.get $5
+  i32.shl
+  i32.or
+  i32.store $0
+  local.get $0
+  local.get $5
+  i32.const 2
+  i32.shl
+  i32.add
+  local.tee $0
+  local.get $0
+  i32.load $0 offset=4
+  i32.const 1
+  local.get $2
+  i32.shl
+  i32.or
+  i32.store $0 offset=4
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+  (local $3 i32)
+  (local $4 i32)
+  local.get $2
+  local.get $1
+  i64.extend_i32_u
+  i64.lt_u
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 382
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $1
+  i32.const 19
+  i32.add
+  i32.const -16
+  i32.and
+  i32.const 4
+  i32.sub
+  local.set $1
+  local.get $0
+  i32.load $0 offset=1568
+  local.tee $4
+  if
+   local.get $4
+   i32.const 4
+   i32.add
+   local.get $1
+   i32.gt_u
+   if
+    i32.const 0
+    i32.const 1568
+    i32.const 389
+    i32.const 16
+    call $~lib/builtins/abort
+    unreachable
+   end
+   local.get $1
+   i32.const 16
+   i32.sub
+   local.get $4
+   i32.eq
+   if
+    local.get $4
+    i32.load $0
+    local.set $3
+    local.get $1
+    i32.const 16
+    i32.sub
+    local.set $1
+   end
+  else
+   local.get $0
+   i32.const 1572
+   i32.add
+   local.get $1
+   i32.gt_u
+   if
+    i32.const 0
+    i32.const 1568
+    i32.const 402
+    i32.const 5
+    call $~lib/builtins/abort
+    unreachable
+   end
+  end
+  local.get $2
+  i32.wrap_i64
+  i32.const -16
+  i32.and
+  local.get $1
+  i32.sub
+  local.tee $4
+  i32.const 20
+  i32.lt_u
+  if
+   return
+  end
+  local.get $1
+  local.get $3
+  i32.const 2
+  i32.and
+  local.get $4
+  i32.const 8
+  i32.sub
+  local.tee $3
+  i32.const 1
+  i32.or
+  i32.or
+  i32.store $0
+  local.get $1
+  i32.const 0
+  i32.store $0 offset=4
+  local.get $1
+  i32.const 0
+  i32.store $0 offset=8
+  local.get $1
+  i32.const 4
+  i32.add
+  local.get $3
+  i32.add
+  local.tee $3
+  i32.const 2
+  i32.store $0
+  local.get $0
+  local.get $3
+  i32.store $0 offset=1568
+  local.get $0
+  local.get $1
+  call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/tlsf/initialize
+  (local $0 i32)
+  (local $1 i32)
+  memory.size $0
+  local.tee $1
+  i32.const 0
+  i32.le_s
+  if
+   i32.const 1
+   local.get $1
+   i32.sub
+   memory.grow $0
+   i32.const 0
+   i32.lt_s
+   if
+    unreachable
+   end
+   call $rt/grow-handler/handler
+  end
+  i32.const 34416
+  i32.const 0
+  i32.store $0
+  i32.const 35984
+  i32.const 0
+  i32.store $0
+  loop $for-loop|0
+   local.get $0
+   i32.const 23
+   i32.lt_u
+   if
+    local.get $0
+    i32.const 2
+    i32.shl
+    i32.const 34416
+    i32.add
+    i32.const 0
+    i32.store $0 offset=4
+    i32.const 0
+    local.set $1
+    loop $for-loop|1
+     local.get $1
+     i32.const 16
+     i32.lt_u
+     if
+      local.get $0
+      i32.const 4
+      i32.shl
+      local.get $1
+      i32.add
+      i32.const 2
+      i32.shl
+      i32.const 34416
+      i32.add
+      i32.const 0
+      i32.store $0 offset=96
+      local.get $1
+      i32.const 1
+      i32.add
+      local.set $1
+      br $for-loop|1
+     end
+    end
+    local.get $0
+    i32.const 1
+    i32.add
+    local.set $0
+    br $for-loop|0
+   end
+  end
+  i32.const 34416
+  i32.const 35988
+  memory.size $0
+  i64.extend_i32_s
+  i64.const 16
+  i64.shl
+  call $~lib/rt/tlsf/addMemory
+  i32.const 34416
+  global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/itcms/step (result i32)
+  (local $0 i32)
+  (local $1 i32)
+  (local $2 i32)
+  block $break|0
+   block $case2|0
+    block $case1|0
+     block $case0|0
+      global.get $~lib/rt/itcms/state
+      br_table $case0|0 $case1|0 $case2|0 $break|0
+     end
+     i32.const 1
+     global.set $~lib/rt/itcms/state
+     i32.const 0
+     global.set $~lib/rt/itcms/visitCount
+     call $~lib/rt/itcms/visitRoots
+     global.get $~lib/rt/itcms/toSpace
+     global.set $~lib/rt/itcms/iter
+     global.get $~lib/rt/itcms/visitCount
+     return
+    end
+    global.get $~lib/rt/itcms/white
+    i32.eqz
+    local.set $1
+    global.get $~lib/rt/itcms/iter
+    i32.load $0 offset=4
+    i32.const -4
+    i32.and
+    local.set $0
+    loop $while-continue|1
+     local.get $0
+     global.get $~lib/rt/itcms/toSpace
+     i32.ne
+     if
+      local.get $0
+      global.set $~lib/rt/itcms/iter
+      local.get $1
+      local.get $0
+      i32.load $0 offset=4
+      i32.const 3
+      i32.and
+      i32.ne
+      if
+       local.get $0
+       local.get $0
+       i32.load $0 offset=4
+       i32.const -4
+       i32.and
+       local.get $1
+       i32.or
+       i32.store $0 offset=4
+       i32.const 0
+       global.set $~lib/rt/itcms/visitCount
+       local.get $0
+       i32.const 20
+       i32.add
+       call $~lib/rt/__visit_members
+       global.get $~lib/rt/itcms/visitCount
+       return
+      end
+      local.get $0
+      i32.load $0 offset=4
+      i32.const -4
+      i32.and
+      local.set $0
+      br $while-continue|1
+     end
+    end
+    i32.const 0
+    global.set $~lib/rt/itcms/visitCount
+    call $~lib/rt/itcms/visitRoots
+    global.get $~lib/rt/itcms/toSpace
+    global.get $~lib/rt/itcms/iter
+    i32.load $0 offset=4
+    i32.const -4
+    i32.and
+    i32.eq
+    if
+     global.get $~lib/memory/__stack_pointer
+     local.set $0
+     loop $while-continue|0
+      local.get $0
+      i32.const 34408
+      i32.lt_u
+      if
+       local.get $0
+       i32.load $0
+       local.tee $2
+       if
+        local.get $2
+        call $byn-split-outlined-A$~lib/rt/itcms/__visit
+       end
+       local.get $0
+       i32.const 4
+       i32.add
+       local.set $0
+       br $while-continue|0
+      end
+     end
+     global.get $~lib/rt/itcms/iter
+     i32.load $0 offset=4
+     i32.const -4
+     i32.and
+     local.set $0
+     loop $while-continue|2
+      local.get $0
+      global.get $~lib/rt/itcms/toSpace
+      i32.ne
+      if
+       local.get $1
+       local.get $0
+       i32.load $0 offset=4
+       i32.const 3
+       i32.and
+       i32.ne
+       if
+        local.get $0
+        local.get $0
+        i32.load $0 offset=4
+        i32.const -4
+        i32.and
+        local.get $1
+        i32.or
+        i32.store $0 offset=4
+        local.get $0
+        i32.const 20
+        i32.add
+        call $~lib/rt/__visit_members
+       end
+       local.get $0
+       i32.load $0 offset=4
+       i32.const -4
+       i32.and
+       local.set $0
+       br $while-continue|2
+      end
+     end
+     global.get $~lib/rt/itcms/fromSpace
+     local.set $0
+     global.get $~lib/rt/itcms/toSpace
+     global.set $~lib/rt/itcms/fromSpace
+     local.get $0
+     global.set $~lib/rt/itcms/toSpace
+     local.get $1
+     global.set $~lib/rt/itcms/white
+     local.get $0
+     i32.load $0 offset=4
+     i32.const -4
+     i32.and
+     global.set $~lib/rt/itcms/iter
+     i32.const 2
+     global.set $~lib/rt/itcms/state
+    end
+    global.get $~lib/rt/itcms/visitCount
+    return
+   end
+   global.get $~lib/rt/itcms/iter
+   local.tee $0
+   global.get $~lib/rt/itcms/toSpace
+   i32.ne
+   if
+    local.get $0
+    i32.load $0 offset=4
+    local.tee $1
+    i32.const -4
+    i32.and
+    global.set $~lib/rt/itcms/iter
+    global.get $~lib/rt/itcms/white
+    i32.eqz
+    local.get $1
+    i32.const 3
+    i32.and
+    i32.ne
+    if
+     i32.const 0
+     i32.const 1296
+     i32.const 229
+     i32.const 20
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $0
+    i32.const 34408
+    i32.lt_u
+    if
+     local.get $0
+     i32.const 0
+     i32.store $0 offset=4
+     local.get $0
+     i32.const 0
+     i32.store $0 offset=8
+    else
+     global.get $~lib/rt/itcms/total
+     local.get $0
+     i32.load $0
+     i32.const -4
+     i32.and
+     i32.const 4
+     i32.add
+     i32.sub
+     global.set $~lib/rt/itcms/total
+     local.get $0
+     i32.const 4
+     i32.add
+     local.tee $0
+     i32.const 34408
+     i32.ge_u
+     if
+      global.get $~lib/rt/tlsf/ROOT
+      i32.eqz
+      if
+       call $~lib/rt/tlsf/initialize
+      end
+      global.get $~lib/rt/tlsf/ROOT
+      local.set $1
+      local.get $0
+      i32.const 4
+      i32.sub
+      local.set $2
+      local.get $0
+      i32.const 15
+      i32.and
+      i32.const 1
+      local.get $0
+      select
+      if (result i32)
+       i32.const 1
+      else
+       local.get $2
+       i32.load $0
+       i32.const 1
+       i32.and
+      end
+      if
+       i32.const 0
+       i32.const 1568
+       i32.const 566
+       i32.const 3
+       call $~lib/builtins/abort
+       unreachable
+      end
+      local.get $2
+      local.get $2
+      i32.load $0
+      i32.const 1
+      i32.or
+      i32.store $0
+      local.get $1
+      local.get $2
+      call $~lib/rt/tlsf/insertBlock
+     end
+    end
+    i32.const 10
+    return
+   end
+   global.get $~lib/rt/itcms/toSpace
+   local.tee $0
+   local.get $0
+   i32.store $0 offset=4
+   local.get $0
+   local.get $0
+   i32.store $0 offset=8
+   i32.const 0
+   global.set $~lib/rt/itcms/state
+  end
+  i32.const 0
+ )
+ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32)
+  (local $2 i32)
+  (local $3 i32)
+  local.get $1
+  i32.const 256
+  i32.lt_u
+  if (result i32)
+   local.get $1
+   i32.const 4
+   i32.shr_u
+  else
+   i32.const 31
+   local.get $1
+   i32.const 1
+   i32.const 27
+   local.get $1
+   i32.clz
+   i32.sub
+   i32.shl
+   i32.add
+   i32.const 1
+   i32.sub
+   local.get $1
+   local.get $1
+   i32.const 536870910
+   i32.lt_u
+   select
+   local.tee $1
+   i32.clz
+   i32.sub
+   local.tee $3
+   i32.const 7
+   i32.sub
+   local.set $2
+   local.get $1
+   local.get $3
+   i32.const 4
+   i32.sub
+   i32.shr_u
+   i32.const 16
+   i32.xor
+  end
+  local.tee $1
+  i32.const 16
+  i32.lt_u
+  local.get $2
+  i32.const 23
+  i32.lt_u
+  i32.and
+  i32.eqz
+  if
+   i32.const 0
+   i32.const 1568
+   i32.const 334
+   i32.const 14
+   call $~lib/builtins/abort
+   unreachable
+  end
+  local.get $0
+  local.get $2
+  i32.const 2
+  i32.shl
+  i32.add
+  i32.load $0 offset=4
+  i32.const -1
+  local.get $1
+  i32.shl
+  i32.and
+  local.tee $1
+  if (result i32)
+   local.get $0
+   local.get $1
+   i32.ctz
+   local.get $2
+   i32.const 4
+   i32.shl
+   i32.add
+   i32.const 2
+   i32.shl
+   i32.add
+   i32.load $0 offset=96
+  else
+   local.get $0
+   i32.load $0
+   i32.const -1
+   local.get $2
+   i32.const 1
+   i32.add
+   i32.shl
+   i32.and
+   local.tee $1
+   if (result i32)
+    local.get $0
+    local.get $1
+    i32.ctz
+    local.tee $1
+    i32.const 2
+    i32.shl
+    i32.add
+    i32.load $0 offset=4
+    local.tee $2
+    i32.eqz
+    if
+     i32.const 0
+     i32.const 1568
+     i32.const 347
+     i32.const 18
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $0
+    local.get $2
+    i32.ctz
+    local.get $1
+    i32.const 4
+    i32.shl
+    i32.add
+    i32.const 2
+    i32.shl
+    i32.add
+    i32.load $0 offset=96
+   else
+    i32.const 0
+   end
+  end
+ )
+ (func $~lib/rt/__visit_members (param $0 i32)
+  (local $1 i32)
+  block $invalid
+   block $~lib/array/Array<i32>
+    block $~lib/arraybuffer/ArrayBufferView
+     block $~lib/string/String
+      block $~lib/arraybuffer/ArrayBuffer
+       block $~lib/object/Object
+        local.get $0
+        i32.const 8
+        i32.sub
+        i32.load $0
+        br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/array/Array<i32> $invalid
+       end
+       return
+      end
+      return
+     end
+     return
+    end
+    local.get $0
+    i32.load $0
+    local.tee $0
+    if
+     local.get $0
+     call $byn-split-outlined-A$~lib/rt/itcms/__visit
+    end
+    return
+   end
+   global.get $~lib/memory/__stack_pointer
+   i32.const 4
+   i32.sub
+   global.set $~lib/memory/__stack_pointer
+   global.get $~lib/memory/__stack_pointer
+   i32.const 1640
+   i32.lt_s
+   if
+    i32.const 34432
+    i32.const 34480
+    i32.const 1
+    i32.const 1
+    call $~lib/builtins/abort
+    unreachable
+   end
+   global.get $~lib/memory/__stack_pointer
+   local.tee $1
+   i32.const 0
+   i32.store $0
+   local.get $1
+   local.get $0
+   i32.store $0
+   local.get $0
+   i32.load $0
+   local.tee $0
+   if
+    local.get $0
+    call $byn-split-outlined-A$~lib/rt/itcms/__visit
+   end
+   global.get $~lib/memory/__stack_pointer
+   i32.const 4
+   i32.add
+   global.set $~lib/memory/__stack_pointer
+   return
+  end
+  unreachable
+ )
+ (func $~start
+  memory.size $0
+  i32.const 16
+  i32.shl
+  i32.const 34408
+  i32.sub
+  i32.const 1
+  i32.shr_u
+  global.set $~lib/rt/itcms/threshold
+  i32.const 1348
+  i32.const 1344
+  i32.store $0
+  i32.const 1352
+  i32.const 1344
+  i32.store $0
+  i32.const 1344
+  global.set $~lib/rt/itcms/pinSpace
+  i32.const 1380
+  i32.const 1376
+  i32.store $0
+  i32.const 1384
+  i32.const 1376
+  i32.store $0
+  i32.const 1376
+  global.set $~lib/rt/itcms/toSpace
+  i32.const 1524
+  i32.const 1520
+  i32.store $0
+  i32.const 1528
+  i32.const 1520
+  i32.store $0
+  i32.const 1520
+  global.set $~lib/rt/itcms/fromSpace
+ )
+ (func $~lib/array/ensureCapacity (param $0 i32)
+  (local $1 i32)
+  (local $2 i32)
+  (local $3 i32)
+  (local $4 i32)
+  (local $5 i32)
+  (local $6 i32)
+  (local $7 i32)
+  (local $8 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  global.get $~lib/memory/__stack_pointer
+  i32.const 1640
+  i32.lt_s
+  if
+   i32.const 34432
+   i32.const 34480
+   i32.const 1
+   i32.const 1
+   call $~lib/builtins/abort
+   unreachable
+  end
+  global.get $~lib/memory/__stack_pointer
+  local.tee $1
+  i32.const 0
+  i32.store $0
+  local.get $1
+  i32.const 1088
+  i32.store $0
+  local.get $0
+  i32.const 1096
+  i32.load $0
+  local.tee $1
+  i32.const 2
+  i32.shr_u
+  i32.gt_u
+  if
+   local.get $0
+   i32.const 268435455
+   i32.gt_u
+   if
+    i32.const 1136
+    i32.const 1184
+    i32.const 19
+    i32.const 48
+    call $~lib/builtins/abort
+    unreachable
+   end
+   global.get $~lib/memory/__stack_pointer
+   i32.const 1088
+   i32.store $0
+   block $__inlined_func$~lib/rt/itcms/__renew
+    i32.const 1073741820
+    local.get $1
+    i32.const 1
+    i32.shl
+    local.tee $1
+    local.get $1
+    i32.const 1073741820
+    i32.ge_u
+    select
+    local.tee $1
+    i32.const 8
+    local.get $0
+    local.get $0
+    i32.const 8
+    i32.le_u
+    select
+    i32.const 2
+    i32.shl
+    local.tee $0
+    local.get $0
+    local.get $1
+    i32.lt_u
+    select
+    local.tee $2
+    i32.const 1088
+    i32.load $0
+    local.tee $1
+    i32.const 20
+    i32.sub
+    local.tee $5
+    i32.load $0
+    i32.const -4
+    i32.and
+    i32.const 16
+    i32.sub
+    i32.le_u
+    if
+     local.get $5
+     local.get $2
+     i32.store $0 offset=16
+     local.get $1
+     local.set $0
+     br $__inlined_func$~lib/rt/itcms/__renew
+    end
+    local.get $5
+    i32.load $0 offset=12
+    local.set $6
+    local.get $2
+    i32.const 1073741804
+    i32.ge_u
+    if
+     i32.const 1232
+     i32.const 1296
+     i32.const 261
+     i32.const 31
+     call $~lib/builtins/abort
+     unreachable
+    end
+    global.get $~lib/rt/itcms/total
+    global.get $~lib/rt/itcms/threshold
+    i32.ge_u
+    if
+     block $__inlined_func$~lib/rt/itcms/interrupt
+      i32.const 2048
+      local.set $0
+      loop $do-loop|0
+       local.get $0
+       call $~lib/rt/itcms/step
+       i32.sub
+       local.set $0
+       global.get $~lib/rt/itcms/state
+       i32.eqz
+       if
+        global.get $~lib/rt/itcms/total
+        i64.extend_i32_u
+        i64.const 200
+        i64.mul
+        i64.const 100
+        i64.div_u
+        i32.wrap_i64
+        i32.const 1024
+        i32.add
+        global.set $~lib/rt/itcms/threshold
+        br $__inlined_func$~lib/rt/itcms/interrupt
+       end
+       local.get $0
+       i32.const 0
+       i32.gt_s
+       br_if $do-loop|0
+      end
+      global.get $~lib/rt/itcms/total
+      local.tee $0
+      local.get $0
+      global.get $~lib/rt/itcms/threshold
+      i32.sub
+      i32.const 1024
+      i32.lt_u
+      i32.const 10
+      i32.shl
+      i32.add
+      global.set $~lib/rt/itcms/threshold
+     end
+    end
+    global.get $~lib/rt/tlsf/ROOT
+    i32.eqz
+    if
+     call $~lib/rt/tlsf/initialize
+    end
+    global.get $~lib/rt/tlsf/ROOT
+    local.set $3
+    local.get $2
+    i32.const 16
+    i32.add
+    local.tee $0
+    i32.const 1073741820
+    i32.gt_u
+    if
+     i32.const 1232
+     i32.const 1568
+     i32.const 462
+     i32.const 29
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $3
+    i32.const 12
+    local.get $0
+    i32.const 19
+    i32.add
+    i32.const -16
+    i32.and
+    i32.const 4
+    i32.sub
+    local.get $0
+    i32.const 12
+    i32.le_u
+    select
+    local.tee $7
+    call $~lib/rt/tlsf/searchBlock
+    local.tee $0
+    i32.eqz
+    if
+     memory.size $0
+     local.tee $0
+     local.get $7
+     i32.const 256
+     i32.ge_u
+     if (result i32)
+      local.get $7
+      i32.const 1
+      i32.const 27
+      local.get $7
+      i32.clz
+      i32.sub
+      i32.shl
+      i32.add
+      i32.const 1
+      i32.sub
+      local.get $7
+      local.get $7
+      i32.const 536870910
+      i32.lt_u
+      select
+     else
+      local.get $7
+     end
+     i32.const 4
+     local.get $3
+     i32.load $0 offset=1568
+     local.get $0
+     i32.const 16
+     i32.shl
+     i32.const 4
+     i32.sub
+     i32.ne
+     i32.shl
+     i32.add
+     i32.const 65535
+     i32.add
+     i32.const -65536
+     i32.and
+     i32.const 16
+     i32.shr_u
+     local.tee $4
+     local.get $0
+     local.get $4
+     i32.gt_s
+     select
+     memory.grow $0
+     i32.const 0
+     i32.lt_s
+     if
+      local.get $4
+      memory.grow $0
+      i32.const 0
+      i32.lt_s
+      if
+       unreachable
+      end
+     end
+     call $rt/grow-handler/handler
+     local.get $3
+     local.get $0
+     i32.const 16
+     i32.shl
+     memory.size $0
+     i64.extend_i32_s
+     i64.const 16
+     i64.shl
+     call $~lib/rt/tlsf/addMemory
+     local.get $3
+     local.get $7
+     call $~lib/rt/tlsf/searchBlock
+     local.tee $0
+     i32.eqz
+     if
+      i32.const 0
+      i32.const 1568
+      i32.const 503
+      i32.const 16
+      call $~lib/builtins/abort
+      unreachable
+     end
+    end
+    local.get $7
+    local.get $0
+    i32.load $0
+    i32.const -4
+    i32.and
+    i32.gt_u
+    if
+     i32.const 0
+     i32.const 1568
+     i32.const 505
+     i32.const 14
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $3
+    local.get $0
+    call $~lib/rt/tlsf/removeBlock
+    local.get $0
+    i32.load $0
+    local.set $4
+    local.get $7
+    i32.const 4
+    i32.add
+    i32.const 15
+    i32.and
+    if
+     i32.const 0
+     i32.const 1568
+     i32.const 361
+     i32.const 14
+     call $~lib/builtins/abort
+     unreachable
+    end
+    local.get $4
+    i32.const -4
+    i32.and
+    local.get $7
+    i32.sub
+    local.tee $8
+    i32.const 16
+    i32.ge_u
+    if
+     local.get $0
+     local.get $7
+     local.get $4
+     i32.const 2
+     i32.and
+     i32.or
+     i32.store $0
+     local.get $0
+     i32.const 4
+     i32.add
+     local.get $7
+     i32.add
+     local.tee $4
+     local.get $8
+     i32.const 4
+     i32.sub
+     i32.const 1
+     i32.or
+     i32.store $0
+     local.get $3
+     local.get $4
+     call $~lib/rt/tlsf/insertBlock
+    else
+     local.get $0
+     local.get $4
+     i32.const -2
+     i32.and
+     i32.store $0
+     local.get $0
+     i32.const 4
+     i32.add
+     local.get $0
+     i32.load $0
+     i32.const -4
+     i32.and
+     i32.add
+     local.tee $3
+     local.get $3
+     i32.load $0
+     i32.const -3
+     i32.and
+     i32.store $0
+    end
+    local.get $0
+    local.get $6
+    i32.store $0 offset=12
+    local.get $0
+    local.get $2
+    i32.store $0 offset=16
+    global.get $~lib/rt/itcms/fromSpace
+    local.tee $3
+    i32.load $0 offset=8
+    local.set $4
+    local.get $0
+    local.get $3
+    global.get $~lib/rt/itcms/white
+    i32.or
+    i32.store $0 offset=4
+    local.get $0
+    local.get $4
+    i32.store $0 offset=8
+    local.get $4
+    local.get $0
+    local.get $4
+    i32.load $0 offset=4
+    i32.const 3
+    i32.and
+    i32.or
+    i32.store $0 offset=4
+    local.get $3
+    local.get $0
+    i32.store $0 offset=8
+    global.get $~lib/rt/itcms/total
+    local.get $0
+    i32.load $0
+    i32.const -4
+    i32.and
+    i32.const 4
+    i32.add
+    i32.add
+    global.set $~lib/rt/itcms/total
+    local.get $0
+    i32.const 20
+    i32.add
+    local.tee $0
+    i32.const 0
+    local.get $2
+    memory.fill $0
+    local.get $0
+    local.get $1
+    local.get $2
+    local.get $5
+    i32.load $0 offset=16
+    local.tee $3
+    local.get $2
+    local.get $3
+    i32.lt_u
+    select
+    memory.copy $0 $0
+   end
+   local.get $0
+   local.get $1
+   i32.ne
+   if
+    i32.const 1088
+    local.get $0
+    i32.store $0
+    i32.const 1092
+    local.get $0
+    i32.store $0
+    local.get $0
+    if
+     global.get $~lib/rt/itcms/white
+     local.get $0
+     i32.const 20
+     i32.sub
+     local.tee $0
+     i32.load $0 offset=4
+     i32.const 3
+     i32.and
+     i32.eq
+     if
+      i32.const 1072
+      i32.load $0
+      i32.const 3
+      i32.and
+      local.tee $1
+      global.get $~lib/rt/itcms/white
+      i32.eqz
+      i32.eq
+      if
+       local.get $0
+       call $~lib/rt/itcms/Object#makeGray
+      else
+       global.get $~lib/rt/itcms/state
+       i32.const 1
+       i32.eq
+       local.get $1
+       i32.const 3
+       i32.eq
+       i32.and
+       if
+        local.get $0
+        call $~lib/rt/itcms/Object#makeGray
+       end
+      end
+     end
+    end
+   end
+   i32.const 1096
+   local.get $2
+   i32.store $0
+  end
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.add
+  global.set $~lib/memory/__stack_pointer
+ )
+ (func $rt/grow-handler/stress
+  (local $0 i32)
+  (local $1 i32)
+  (local $2 i32)
+  global.get $~lib/memory/__stack_pointer
+  i32.const 4
+  i32.sub
+  global.set $~lib/memory/__stack_pointer
+  block $folding-inner0
+   global.get $~lib/memory/__stack_pointer
+   i32.const 1640
+   i32.lt_s
+   br_if $folding-inner0
+   global.get $~lib/memory/__stack_pointer
+   i32.const 0
+   i32.store $0
+   loop $for-loop|0
+    local.get $0
+    i32.const 65536
+    i32.lt_s
+    if
+     global.get $~lib/memory/__stack_pointer
+     local.tee $1
+     i32.const 1088
+     i32.store $0
+     local.get $1
+     i32.const 4
+     i32.sub
+     global.set $~lib/memory/__stack_pointer
+     global.get $~lib/memory/__stack_pointer
+     i32.const 1640
+     i32.lt_s
+     br_if $folding-inner0
+     global.get $~lib/memory/__stack_pointer
+     local.tee $1
+     i32.const 0
+     i32.store $0
+     local.get $1
+     i32.const 1088
+     i32.store $0
+     i32.const 1100
+     i32.load $0
+     local.tee $1
+     i32.const 1
+     i32.add
+     local.tee $2
+     call $~lib/array/ensureCapacity
+     global.get $~lib/memory/__stack_pointer
+     i32.const 1088
+     i32.store $0
+     i32.const 1092
+     i32.load $0
+     local.get $1
+     i32.const 2
+     i32.shl
+     i32.add
+     local.get $0
+     i32.store $0
+     global.get $~lib/memory/__stack_pointer
+     i32.const 1088
+     i32.store $0
+     i32.const 1100
+     local.get $2
+     i32.store $0
+     global.get $~lib/memory/__stack_pointer
+     i32.const 4
+     i32.add
+     global.set $~lib/memory/__stack_pointer
+     local.get $0
+     i32.const 1
+     i32.add
+     local.set $0
+     br $for-loop|0
+    end
+   end
+   global.get $~lib/memory/__stack_pointer
+   i32.const 4
+   i32.add
+   global.set $~lib/memory/__stack_pointer
+   return
+  end
+  i32.const 34432
+  i32.const 34480
+  i32.const 1
+  i32.const 1
+  call $~lib/builtins/abort
+  unreachable
+ )
+ (func $byn-split-outlined-A$~lib/rt/itcms/__visit (param $0 i32)
+  global.get $~lib/rt/itcms/white
+  local.get $0
+  i32.const 20
+  i32.sub
+  local.tee $0
+  i32.load $0 offset=4
+  i32.const 3
+  i32.and
+  i32.eq
+  if
+   local.get $0
+   call $~lib/rt/itcms/Object#makeGray
+   global.get $~lib/rt/itcms/visitCount
+   i32.const 1
+   i32.add
+   global.set $~lib/rt/itcms/visitCount
+  end
+ )
+)
diff --git a/tests/compiler/rt/grow-handler.ts b/tests/compiler/rt/grow-handler.ts
new file mode 100644
index 0000000000..af12f7b747
--- /dev/null
+++ b/tests/compiler/rt/grow-handler.ts
@@ -0,0 +1,7 @@
+@external("grow", "handler")
+declare function handler(): void;
+
+let leak: i32[] = [];
+export function stress(): void {
+  for (let i = 0; i < 65536; i++) leak.push(i);
+}
\ No newline at end of file
diff --git a/tests/compiler/rt/issue-2719.debug.wat b/tests/compiler/rt/issue-2719.debug.wat
index e42ecb6b4c..db8c932505 100644
--- a/tests/compiler/rt/issue-2719.debug.wat
+++ b/tests/compiler/rt/issue-2719.debug.wat
@@ -1224,18 +1224,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1356,7 +1356,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1685,7 +1685,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1981,6 +1981,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2130,7 +2132,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2150,7 +2152,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/issue-2719.release.wat b/tests/compiler/rt/issue-2719.release.wat
index 19e5c96b2c..e03ec6388b 100644
--- a/tests/compiler/rt/issue-2719.release.wat
+++ b/tests/compiler/rt/issue-2719.release.wat
@@ -731,18 +731,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34304
   i32.const 0
@@ -1040,7 +1038,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1275,7 +1273,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1373,7 +1371,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1388,7 +1386,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/runtime-incremental-export.debug.wat b/tests/compiler/rt/runtime-incremental-export.debug.wat
index 1c5c21375c..a2b0ab3bb0 100644
--- a/tests/compiler/rt/runtime-incremental-export.debug.wat
+++ b/tests/compiler/rt/runtime-incremental-export.debug.wat
@@ -1230,18 +1230,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1362,7 +1362,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1691,7 +1691,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1987,6 +1987,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2136,7 +2138,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2156,7 +2158,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/runtime-incremental-export.release.wat b/tests/compiler/rt/runtime-incremental-export.release.wat
index 8ac160e12a..473f971e6d 100644
--- a/tests/compiler/rt/runtime-incremental-export.release.wat
+++ b/tests/compiler/rt/runtime-incremental-export.release.wat
@@ -746,18 +746,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34368
   i32.const 0
@@ -1055,7 +1053,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1290,7 +1288,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1388,7 +1386,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1403,7 +1401,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/runtime-minimal-export.debug.wat b/tests/compiler/rt/runtime-minimal-export.debug.wat
index c667c5ca2c..d92fe473b6 100644
--- a/tests/compiler/rt/runtime-minimal-export.debug.wat
+++ b/tests/compiler/rt/runtime-minimal-export.debug.wat
@@ -886,18 +886,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1016,7 +1016,7 @@
   if
    i32.const 32
    i32.const 160
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1312,6 +1312,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -1461,7 +1463,7 @@
    if
     i32.const 0
     i32.const 160
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1481,7 +1483,7 @@
   if
    i32.const 0
    i32.const 160
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
@@ -1792,7 +1794,7 @@
   if
    i32.const 0
    i32.const 160
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/runtime-minimal-export.release.wat b/tests/compiler/rt/runtime-minimal-export.release.wat
index 5c5459a0d3..4ff15c4375 100644
--- a/tests/compiler/rt/runtime-minimal-export.release.wat
+++ b/tests/compiler/rt/runtime-minimal-export.release.wat
@@ -553,18 +553,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 1488
   i32.const 0
@@ -785,7 +783,7 @@
   if
    i32.const 1056
    i32.const 1184
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -883,7 +881,7 @@
    if
     i32.const 0
     i32.const 1184
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -898,7 +896,7 @@
   if
    i32.const 0
    i32.const 1184
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
@@ -1345,7 +1343,7 @@
       if
        i32.const 0
        i32.const 1184
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
diff --git a/tests/compiler/rt/runtime-stub-export.debug.wat b/tests/compiler/rt/runtime-stub-export.debug.wat
index 42a8a1c554..425a29af9b 100644
--- a/tests/compiler/rt/runtime-stub-export.debug.wat
+++ b/tests/compiler/rt/runtime-stub-export.debug.wat
@@ -80,6 +80,8 @@
      unreachable
     end
    end
+   i32.const 0
+   drop
   end
   local.get $newOffset
   global.set $~lib/rt/stub/offset
@@ -100,7 +102,7 @@
   if
    i32.const 32
    i32.const 96
-   i32.const 33
+   i32.const 34
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -167,7 +169,7 @@
   if
    i32.const 32
    i32.const 96
-   i32.const 86
+   i32.const 87
    i32.const 30
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/rt/runtime-stub-export.release.wat b/tests/compiler/rt/runtime-stub-export.release.wat
index 368b597871..b537d7301a 100644
--- a/tests/compiler/rt/runtime-stub-export.release.wat
+++ b/tests/compiler/rt/runtime-stub-export.release.wat
@@ -33,7 +33,7 @@
   if
    i32.const 1056
    i32.const 1120
-   i32.const 86
+   i32.const 87
    i32.const 30
    call $~lib/builtins/abort
    unreachable
@@ -47,7 +47,7 @@
   if
    i32.const 1056
    i32.const 1120
-   i32.const 33
+   i32.const 34
    i32.const 29
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat
index bb810b7e42..b024933e1a 100644
--- a/tests/compiler/simd.debug.wat
+++ b/tests/compiler/simd.debug.wat
@@ -1263,18 +1263,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1395,7 +1395,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1724,7 +1724,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2020,6 +2020,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2169,7 +2171,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2189,7 +2191,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/simd.release.wat b/tests/compiler/simd.release.wat
index deba7d8f6d..d2845892b0 100644
--- a/tests/compiler/simd.release.wat
+++ b/tests/compiler/simd.release.wat
@@ -762,18 +762,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34384
   i32.const 0
@@ -872,7 +870,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1244,7 +1242,7 @@
   if
    i32.const 1104
    i32.const 1440
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1342,7 +1340,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1357,7 +1355,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/array-literal.debug.wat b/tests/compiler/std/array-literal.debug.wat
index fd50847553..58e4e2e3a7 100644
--- a/tests/compiler/std/array-literal.debug.wat
+++ b/tests/compiler/std/array-literal.debug.wat
@@ -1259,18 +1259,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1391,7 +1391,7 @@
   if
    i32.const 0
    i32.const 720
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1720,7 +1720,7 @@
   if
    i32.const 448
    i32.const 720
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2016,6 +2016,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2165,7 +2167,7 @@
    if
     i32.const 0
     i32.const 720
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2185,7 +2187,7 @@
   if
    i32.const 0
    i32.const 720
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/array-literal.release.wat b/tests/compiler/std/array-literal.release.wat
index 4455e67b59..12878ed9c7 100644
--- a/tests/compiler/std/array-literal.release.wat
+++ b/tests/compiler/std/array-literal.release.wat
@@ -792,18 +792,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34656
   i32.const 0
@@ -1101,7 +1099,7 @@
       if
        i32.const 0
        i32.const 1744
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1336,7 +1334,7 @@
   if
    i32.const 1472
    i32.const 1744
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1434,7 +1432,7 @@
    if
     i32.const 0
     i32.const 1744
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1449,7 +1447,7 @@
   if
    i32.const 0
    i32.const 1744
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat
index 1cf71a8daa..8f5e2cecae 100644
--- a/tests/compiler/std/array.debug.wat
+++ b/tests/compiler/std/array.debug.wat
@@ -1568,18 +1568,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1700,7 +1700,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2029,7 +2029,7 @@
   if
    i32.const 128
    i32.const 464
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2325,6 +2325,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2474,7 +2476,7 @@
    if
     i32.const 0
     i32.const 464
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2494,7 +2496,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/array.release.wat b/tests/compiler/std/array.release.wat
index 80194460d7..e9ab2071ee 100644
--- a/tests/compiler/std/array.release.wat
+++ b/tests/compiler/std/array.release.wat
@@ -1387,18 +1387,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 48960
   i32.const 0
@@ -1497,7 +1495,7 @@
   if
    i32.const 0
    i32.const 1488
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1869,7 +1867,7 @@
   if
    i32.const 1152
    i32.const 1488
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1967,7 +1965,7 @@
    if
     i32.const 0
     i32.const 1488
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1982,7 +1980,7 @@
   if
    i32.const 0
    i32.const 1488
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/arraybuffer.debug.wat b/tests/compiler/std/arraybuffer.debug.wat
index 8a91cfb438..ea0b9e4a92 100644
--- a/tests/compiler/std/arraybuffer.debug.wat
+++ b/tests/compiler/std/arraybuffer.debug.wat
@@ -1232,18 +1232,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1364,7 +1364,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1693,7 +1693,7 @@
   if
    i32.const 144
    i32.const 480
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1989,6 +1989,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2138,7 +2140,7 @@
    if
     i32.const 0
     i32.const 480
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2158,7 +2160,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/arraybuffer.release.wat b/tests/compiler/std/arraybuffer.release.wat
index deba42487f..04e564ed02 100644
--- a/tests/compiler/std/arraybuffer.release.wat
+++ b/tests/compiler/std/arraybuffer.release.wat
@@ -743,18 +743,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34560
   i32.const 0
@@ -1052,7 +1050,7 @@
       if
        i32.const 0
        i32.const 1504
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1287,7 +1285,7 @@
   if
    i32.const 1168
    i32.const 1504
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1385,7 +1383,7 @@
    if
     i32.const 0
     i32.const 1504
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1400,7 +1398,7 @@
   if
    i32.const 0
    i32.const 1504
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/dataview.debug.wat b/tests/compiler/std/dataview.debug.wat
index 1fd092614d..12db81bff5 100644
--- a/tests/compiler/std/dataview.debug.wat
+++ b/tests/compiler/std/dataview.debug.wat
@@ -1239,18 +1239,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1371,7 +1371,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1700,7 +1700,7 @@
   if
    i32.const 144
    i32.const 480
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1996,6 +1996,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2145,7 +2147,7 @@
    if
     i32.const 0
     i32.const 480
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2165,7 +2167,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/dataview.release.wat b/tests/compiler/std/dataview.release.wat
index b660db363b..c4336feb7a 100644
--- a/tests/compiler/std/dataview.release.wat
+++ b/tests/compiler/std/dataview.release.wat
@@ -751,18 +751,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34544
   i32.const 0
@@ -1060,7 +1058,7 @@
       if
        i32.const 0
        i32.const 1504
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1295,7 +1293,7 @@
   if
    i32.const 1168
    i32.const 1504
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1393,7 +1391,7 @@
    if
     i32.const 0
     i32.const 1504
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1408,7 +1406,7 @@
   if
    i32.const 0
    i32.const 1504
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/date.debug.wat b/tests/compiler/std/date.debug.wat
index 3557776ad2..aba3d93842 100644
--- a/tests/compiler/std/date.debug.wat
+++ b/tests/compiler/std/date.debug.wat
@@ -1616,18 +1616,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1748,7 +1748,7 @@
   if
    i32.const 0
    i32.const 512
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2077,7 +2077,7 @@
   if
    i32.const 176
    i32.const 512
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2373,6 +2373,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2522,7 +2524,7 @@
    if
     i32.const 0
     i32.const 512
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2542,7 +2544,7 @@
   if
    i32.const 0
    i32.const 512
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/date.release.wat b/tests/compiler/std/date.release.wat
index ecc147d17d..ec35df4098 100644
--- a/tests/compiler/std/date.release.wat
+++ b/tests/compiler/std/date.release.wat
@@ -1117,18 +1117,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 40608
   i32.const 0
@@ -1426,7 +1424,7 @@
       if
        i32.const 0
        i32.const 1536
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1661,7 +1659,7 @@
   if
    i32.const 1200
    i32.const 1536
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1759,7 +1757,7 @@
    if
     i32.const 0
     i32.const 1536
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1774,7 +1772,7 @@
   if
    i32.const 0
    i32.const 1536
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/map.debug.wat b/tests/compiler/std/map.debug.wat
index f8b67fdf6a..70da16110b 100644
--- a/tests/compiler/std/map.debug.wat
+++ b/tests/compiler/std/map.debug.wat
@@ -1255,18 +1255,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1387,7 +1387,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1716,7 +1716,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2012,6 +2012,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2161,7 +2163,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2181,7 +2183,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/map.release.wat b/tests/compiler/std/map.release.wat
index 65fa89cce5..229e843f6d 100644
--- a/tests/compiler/std/map.release.wat
+++ b/tests/compiler/std/map.release.wat
@@ -763,18 +763,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34672
   i32.const 0
@@ -1072,7 +1070,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1307,7 +1305,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1405,7 +1403,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1420,7 +1418,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/new.debug.wat b/tests/compiler/std/new.debug.wat
index e8912548ca..6bd99b7849 100644
--- a/tests/compiler/std/new.debug.wat
+++ b/tests/compiler/std/new.debug.wat
@@ -1241,18 +1241,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1373,7 +1373,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1702,7 +1702,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1998,6 +1998,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2147,7 +2149,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2167,7 +2169,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/new.release.wat b/tests/compiler/std/new.release.wat
index f42da5d035..60633b50b5 100644
--- a/tests/compiler/std/new.release.wat
+++ b/tests/compiler/std/new.release.wat
@@ -736,18 +736,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1045,7 +1043,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1245,7 +1243,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1260,7 +1258,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/object.debug.wat b/tests/compiler/std/object.debug.wat
index c22fafeb2d..9f6e787a15 100644
--- a/tests/compiler/std/object.debug.wat
+++ b/tests/compiler/std/object.debug.wat
@@ -325,6 +325,8 @@
      unreachable
     end
    end
+   i32.const 0
+   drop
   end
   local.get $newOffset
   global.set $~lib/rt/stub/offset
@@ -345,7 +347,7 @@
   if
    i32.const 208
    i32.const 272
-   i32.const 33
+   i32.const 34
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -412,7 +414,7 @@
   if
    i32.const 208
    i32.const 272
-   i32.const 86
+   i32.const 87
    i32.const 30
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/operator-overloading.debug.wat b/tests/compiler/std/operator-overloading.debug.wat
index b262deed12..aff1a10ab8 100644
--- a/tests/compiler/std/operator-overloading.debug.wat
+++ b/tests/compiler/std/operator-overloading.debug.wat
@@ -1297,18 +1297,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1429,7 +1429,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1758,7 +1758,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2054,6 +2054,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2203,7 +2205,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2223,7 +2225,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/operator-overloading.release.wat b/tests/compiler/std/operator-overloading.release.wat
index 5e5f9130c8..4bd20aaed1 100644
--- a/tests/compiler/std/operator-overloading.release.wat
+++ b/tests/compiler/std/operator-overloading.release.wat
@@ -669,18 +669,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34400
   i32.const 0
@@ -978,7 +976,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1178,7 +1176,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1193,7 +1191,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/set.debug.wat b/tests/compiler/std/set.debug.wat
index 0bba1a96ff..1a7e669aae 100644
--- a/tests/compiler/std/set.debug.wat
+++ b/tests/compiler/std/set.debug.wat
@@ -1250,18 +1250,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1382,7 +1382,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1711,7 +1711,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2007,6 +2007,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2156,7 +2158,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2176,7 +2178,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/set.release.wat b/tests/compiler/std/set.release.wat
index 19b518d3f0..17511a6fef 100644
--- a/tests/compiler/std/set.release.wat
+++ b/tests/compiler/std/set.release.wat
@@ -754,18 +754,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34528
   i32.const 0
@@ -1063,7 +1061,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1298,7 +1296,7 @@
   if
    i32.const 1056
    i32.const 1392
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1396,7 +1394,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1411,7 +1409,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/static-array.debug.wat b/tests/compiler/std/static-array.debug.wat
index 1da1570de1..11e5c3942a 100644
--- a/tests/compiler/std/static-array.debug.wat
+++ b/tests/compiler/std/static-array.debug.wat
@@ -1266,18 +1266,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1398,7 +1398,7 @@
   if
    i32.const 0
    i32.const 880
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1727,7 +1727,7 @@
   if
    i32.const 608
    i32.const 880
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2023,6 +2023,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2172,7 +2174,7 @@
    if
     i32.const 0
     i32.const 880
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2192,7 +2194,7 @@
   if
    i32.const 0
    i32.const 880
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/static-array.release.wat b/tests/compiler/std/static-array.release.wat
index 9f31ef8c98..285ba44c2d 100644
--- a/tests/compiler/std/static-array.release.wat
+++ b/tests/compiler/std/static-array.release.wat
@@ -766,18 +766,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34768
   i32.const 0
@@ -1075,7 +1073,7 @@
       if
        i32.const 0
        i32.const 1904
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1555,7 +1553,7 @@
     if
      i32.const 1632
      i32.const 1904
-     i32.const 461
+     i32.const 462
      i32.const 29
      call $~lib/builtins/abort
      unreachable
@@ -1653,7 +1651,7 @@
      if
       i32.const 0
       i32.const 1904
-      i32.const 499
+      i32.const 503
       i32.const 16
       call $~lib/builtins/abort
       unreachable
@@ -1668,7 +1666,7 @@
     if
      i32.const 0
      i32.const 1904
-     i32.const 501
+     i32.const 505
      i32.const 14
      call $~lib/builtins/abort
      unreachable
diff --git a/tests/compiler/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat
index 3f0be58115..ca0853f1f5 100644
--- a/tests/compiler/std/staticarray.debug.wat
+++ b/tests/compiler/std/staticarray.debug.wat
@@ -1332,18 +1332,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1464,7 +1464,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1793,7 +1793,7 @@
   if
    i32.const 320
    i32.const 592
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2089,6 +2089,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2238,7 +2240,7 @@
    if
     i32.const 0
     i32.const 592
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2258,7 +2260,7 @@
   if
    i32.const 0
    i32.const 592
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/staticarray.release.wat b/tests/compiler/std/staticarray.release.wat
index 0b492e20cc..282b1c9deb 100644
--- a/tests/compiler/std/staticarray.release.wat
+++ b/tests/compiler/std/staticarray.release.wat
@@ -890,18 +890,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 36736
   i32.const 0
@@ -1000,7 +998,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1372,7 +1370,7 @@
   if
    i32.const 1344
    i32.const 1616
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1470,7 +1468,7 @@
    if
     i32.const 0
     i32.const 1616
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1485,7 +1483,7 @@
   if
    i32.const 0
    i32.const 1616
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string-casemapping.debug.wat b/tests/compiler/std/string-casemapping.debug.wat
index ee2b866fe8..59c1dcfbbb 100644
--- a/tests/compiler/std/string-casemapping.debug.wat
+++ b/tests/compiler/std/string-casemapping.debug.wat
@@ -1418,18 +1418,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1550,7 +1550,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1879,7 +1879,7 @@
   if
    i32.const 64
    i32.const 400
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2175,6 +2175,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2324,7 +2326,7 @@
    if
     i32.const 0
     i32.const 400
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2344,7 +2346,7 @@
   if
    i32.const 0
    i32.const 400
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string-casemapping.release.wat b/tests/compiler/std/string-casemapping.release.wat
index f4ffed5598..6dcdd592b6 100644
--- a/tests/compiler/std/string-casemapping.release.wat
+++ b/tests/compiler/std/string-casemapping.release.wat
@@ -1185,18 +1185,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 53856
   i32.const 0
@@ -1494,7 +1492,7 @@
       if
        i32.const 0
        i32.const 1424
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1729,7 +1727,7 @@
   if
    i32.const 1088
    i32.const 1424
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1827,7 +1825,7 @@
    if
     i32.const 0
     i32.const 1424
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1842,7 +1840,7 @@
   if
    i32.const 0
    i32.const 1424
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string-encoding.debug.wat b/tests/compiler/std/string-encoding.debug.wat
index 05b49de702..25947c3218 100644
--- a/tests/compiler/std/string-encoding.debug.wat
+++ b/tests/compiler/std/string-encoding.debug.wat
@@ -1257,18 +1257,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1389,7 +1389,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1718,7 +1718,7 @@
   if
    i32.const 128
    i32.const 464
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2014,6 +2014,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2163,7 +2165,7 @@
    if
     i32.const 0
     i32.const 464
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2183,7 +2185,7 @@
   if
    i32.const 0
    i32.const 464
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string-encoding.release.wat b/tests/compiler/std/string-encoding.release.wat
index e6c6135966..7b28a114af 100644
--- a/tests/compiler/std/string-encoding.release.wat
+++ b/tests/compiler/std/string-encoding.release.wat
@@ -772,18 +772,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 55584
   i32.const 0
@@ -1081,7 +1079,7 @@
       if
        i32.const 0
        i32.const 1488
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1316,7 +1314,7 @@
   if
    i32.const 1152
    i32.const 1488
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1414,7 +1412,7 @@
    if
     i32.const 0
     i32.const 1488
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1429,7 +1427,7 @@
   if
    i32.const 0
    i32.const 1488
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string.debug.wat b/tests/compiler/std/string.debug.wat
index 5e90c52111..6da4323046 100644
--- a/tests/compiler/std/string.debug.wat
+++ b/tests/compiler/std/string.debug.wat
@@ -1848,18 +1848,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1980,7 +1980,7 @@
   if
    i32.const 0
    i32.const 624
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2309,7 +2309,7 @@
   if
    i32.const 352
    i32.const 624
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2605,6 +2605,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2754,7 +2756,7 @@
    if
     i32.const 0
     i32.const 624
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2774,7 +2776,7 @@
   if
    i32.const 0
    i32.const 624
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/string.release.wat b/tests/compiler/std/string.release.wat
index 15345f5036..6a9a83bb45 100644
--- a/tests/compiler/std/string.release.wat
+++ b/tests/compiler/std/string.release.wat
@@ -1764,18 +1764,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 59216
   i32.const 0
@@ -2073,7 +2071,7 @@
       if
        i32.const 0
        i32.const 1648
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -2308,7 +2306,7 @@
   if
    i32.const 1376
    i32.const 1648
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2406,7 +2404,7 @@
    if
     i32.const 0
     i32.const 1648
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2421,7 +2419,7 @@
   if
    i32.const 0
    i32.const 1648
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/symbol.debug.wat b/tests/compiler/std/symbol.debug.wat
index 5fdd3c6a22..648fe21bf4 100644
--- a/tests/compiler/std/symbol.debug.wat
+++ b/tests/compiler/std/symbol.debug.wat
@@ -1286,18 +1286,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1418,7 +1418,7 @@
   if
    i32.const 0
    i32.const 448
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1747,7 +1747,7 @@
   if
    i32.const 112
    i32.const 448
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2043,6 +2043,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2192,7 +2194,7 @@
    if
     i32.const 0
     i32.const 448
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2212,7 +2214,7 @@
   if
    i32.const 0
    i32.const 448
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/symbol.release.wat b/tests/compiler/std/symbol.release.wat
index 1c79687c29..e897bc66ba 100644
--- a/tests/compiler/std/symbol.release.wat
+++ b/tests/compiler/std/symbol.release.wat
@@ -835,18 +835,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 35520
   i32.const 0
@@ -1144,7 +1142,7 @@
       if
        i32.const 0
        i32.const 1472
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1379,7 +1377,7 @@
   if
    i32.const 1136
    i32.const 1472
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1477,7 +1475,7 @@
    if
     i32.const 0
     i32.const 1472
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1492,7 +1490,7 @@
   if
    i32.const 0
    i32.const 1472
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/typedarray.debug.wat b/tests/compiler/std/typedarray.debug.wat
index aa7cf73198..69a7690fb7 100644
--- a/tests/compiler/std/typedarray.debug.wat
+++ b/tests/compiler/std/typedarray.debug.wat
@@ -1596,18 +1596,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1728,7 +1728,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2057,7 +2057,7 @@
   if
    i32.const 144
    i32.const 480
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2353,6 +2353,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2502,7 +2504,7 @@
    if
     i32.const 0
     i32.const 480
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2522,7 +2524,7 @@
   if
    i32.const 0
    i32.const 480
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/typedarray.release.wat b/tests/compiler/std/typedarray.release.wat
index 8ec89852f3..1b3f195665 100644
--- a/tests/compiler/std/typedarray.release.wat
+++ b/tests/compiler/std/typedarray.release.wat
@@ -1396,18 +1396,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 49088
   i32.const 0
@@ -1506,7 +1504,7 @@
   if
    i32.const 0
    i32.const 1504
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1878,7 +1876,7 @@
   if
    i32.const 1168
    i32.const 1504
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1976,7 +1974,7 @@
    if
     i32.const 0
     i32.const 1504
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1991,7 +1989,7 @@
   if
    i32.const 0
    i32.const 1504
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/uri.debug.wat b/tests/compiler/std/uri.debug.wat
index 0a61dbfdb2..e64d1c3be9 100644
--- a/tests/compiler/std/uri.debug.wat
+++ b/tests/compiler/std/uri.debug.wat
@@ -1300,18 +1300,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1432,7 +1432,7 @@
   if
    i32.const 0
    i32.const 496
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1761,7 +1761,7 @@
   if
    i32.const 160
    i32.const 496
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2057,6 +2057,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2206,7 +2208,7 @@
    if
     i32.const 0
     i32.const 496
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2226,7 +2228,7 @@
   if
    i32.const 0
    i32.const 496
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/std/uri.release.wat b/tests/compiler/std/uri.release.wat
index f72e4f3bee..d363f9e467 100644
--- a/tests/compiler/std/uri.release.wat
+++ b/tests/compiler/std/uri.release.wat
@@ -852,18 +852,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 37136
   i32.const 0
@@ -1161,7 +1159,7 @@
       if
        i32.const 0
        i32.const 1520
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1396,7 +1394,7 @@
   if
    i32.const 1184
    i32.const 1520
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1494,7 +1492,7 @@
    if
     i32.const 0
     i32.const 1520
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1509,7 +1507,7 @@
   if
    i32.const 0
    i32.const 1520
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/super-inline.debug.wat b/tests/compiler/super-inline.debug.wat
index a82a1ae02d..33f85fb95f 100644
--- a/tests/compiler/super-inline.debug.wat
+++ b/tests/compiler/super-inline.debug.wat
@@ -1225,18 +1225,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1357,7 +1357,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1686,7 +1686,7 @@
   if
    i32.const 32
    i32.const 368
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1982,6 +1982,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2131,7 +2133,7 @@
    if
     i32.const 0
     i32.const 368
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2151,7 +2153,7 @@
   if
    i32.const 0
    i32.const 368
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/super-inline.release.wat b/tests/compiler/super-inline.release.wat
index ba821f9359..79cb61566c 100644
--- a/tests/compiler/super-inline.release.wat
+++ b/tests/compiler/super-inline.release.wat
@@ -743,18 +743,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34240
   i32.const 0
@@ -1052,7 +1050,7 @@
       if
        i32.const 0
        i32.const 1392
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1252,7 +1250,7 @@
    if
     i32.const 0
     i32.const 1392
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1267,7 +1265,7 @@
   if
    i32.const 0
    i32.const 1392
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/templateliteral.debug.wat b/tests/compiler/templateliteral.debug.wat
index d725adb848..5467a84375 100644
--- a/tests/compiler/templateliteral.debug.wat
+++ b/tests/compiler/templateliteral.debug.wat
@@ -1406,18 +1406,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1538,7 +1538,7 @@
   if
    i32.const 0
    i32.const 528
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1867,7 +1867,7 @@
   if
    i32.const 192
    i32.const 528
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2163,6 +2163,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2312,7 +2314,7 @@
    if
     i32.const 0
     i32.const 528
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2332,7 +2334,7 @@
   if
    i32.const 0
    i32.const 528
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/templateliteral.release.wat b/tests/compiler/templateliteral.release.wat
index 0048219b20..ec59d80065 100644
--- a/tests/compiler/templateliteral.release.wat
+++ b/tests/compiler/templateliteral.release.wat
@@ -832,18 +832,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 38464
   i32.const 0
@@ -1141,7 +1139,7 @@
       if
        i32.const 0
        i32.const 1552
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1376,7 +1374,7 @@
   if
    i32.const 1216
    i32.const 1552
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -1474,7 +1472,7 @@
    if
     i32.const 0
     i32.const 1552
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1489,7 +1487,7 @@
   if
    i32.const 0
    i32.const 1552
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/throw.debug.wat b/tests/compiler/throw.debug.wat
index e18fa212c9..97b9738d89 100644
--- a/tests/compiler/throw.debug.wat
+++ b/tests/compiler/throw.debug.wat
@@ -1337,18 +1337,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1469,7 +1469,7 @@
   if
    i32.const 0
    i32.const 608
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/throw.release.wat b/tests/compiler/throw.release.wat
index 66c340701c..98432c027f 100644
--- a/tests/compiler/throw.release.wat
+++ b/tests/compiler/throw.release.wat
@@ -845,18 +845,16 @@
        local.tee $0
        i32.const 0
        i32.le_s
-       if (result i32)
+       if
         i32.const 1
         local.get $0
         i32.sub
         memory.grow $0
         i32.const 0
         i32.lt_s
-       else
-        i32.const 0
-       end
-       if
-        unreachable
+        if
+         unreachable
+        end
        end
        i32.const 34528
        i32.const 0
@@ -1028,7 +1026,7 @@
       if
        i32.const 0
        i32.const 1632
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
diff --git a/tests/compiler/typeof.debug.wat b/tests/compiler/typeof.debug.wat
index 53a934fd4e..f1fb925df1 100644
--- a/tests/compiler/typeof.debug.wat
+++ b/tests/compiler/typeof.debug.wat
@@ -1364,18 +1364,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1496,7 +1496,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -1825,7 +1825,7 @@
   if
    i32.const 336
    i32.const 672
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2121,6 +2121,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2270,7 +2272,7 @@
    if
     i32.const 0
     i32.const 672
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2290,7 +2292,7 @@
   if
    i32.const 0
    i32.const 672
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/typeof.release.wat b/tests/compiler/typeof.release.wat
index 34f7c56d60..3ab550d972 100644
--- a/tests/compiler/typeof.release.wat
+++ b/tests/compiler/typeof.release.wat
@@ -759,18 +759,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34592
   i32.const 0
@@ -1068,7 +1066,7 @@
       if
        i32.const 0
        i32.const 1696
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1268,7 +1266,7 @@
    if
     i32.const 0
     i32.const 1696
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1283,7 +1281,7 @@
   if
    i32.const 0
    i32.const 1696
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/while.debug.wat b/tests/compiler/while.debug.wat
index 27f83c7032..1f0f7942d5 100644
--- a/tests/compiler/while.debug.wat
+++ b/tests/compiler/while.debug.wat
@@ -1647,18 +1647,18 @@
   local.get $pagesNeeded
   local.get $pagesBefore
   i32.gt_s
-  if (result i32)
+  if
    local.get $pagesNeeded
    local.get $pagesBefore
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
+   if
+    unreachable
+   end
    i32.const 0
-  end
-  if
-   unreachable
+   drop
   end
   local.get $rootOffset
   local.set $root
@@ -1779,7 +1779,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 562
+   i32.const 566
    i32.const 3
    call $~lib/builtins/abort
    unreachable
@@ -2108,7 +2108,7 @@
   if
    i32.const 80
    i32.const 416
-   i32.const 461
+   i32.const 462
    i32.const 29
    call $~lib/builtins/abort
    unreachable
@@ -2404,6 +2404,8 @@
     unreachable
    end
   end
+  i32.const 0
+  drop
   memory.size $0
   local.set $pagesAfter
   local.get $root
@@ -2553,7 +2555,7 @@
    if
     i32.const 0
     i32.const 416
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -2573,7 +2575,7 @@
   if
    i32.const 0
    i32.const 416
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable
diff --git a/tests/compiler/while.release.wat b/tests/compiler/while.release.wat
index b6ef7b8ce6..554c5b8d11 100644
--- a/tests/compiler/while.release.wat
+++ b/tests/compiler/while.release.wat
@@ -731,18 +731,16 @@
   local.tee $1
   i32.const 0
   i32.le_s
-  if (result i32)
+  if
    i32.const 1
    local.get $1
    i32.sub
    memory.grow $0
    i32.const 0
    i32.lt_s
-  else
-   i32.const 0
-  end
-  if
-   unreachable
+   if
+    unreachable
+   end
   end
   i32.const 34288
   i32.const 0
@@ -1040,7 +1038,7 @@
       if
        i32.const 0
        i32.const 1440
-       i32.const 562
+       i32.const 566
        i32.const 3
        call $~lib/builtins/abort
        unreachable
@@ -1240,7 +1238,7 @@
    if
     i32.const 0
     i32.const 1440
-    i32.const 499
+    i32.const 503
     i32.const 16
     call $~lib/builtins/abort
     unreachable
@@ -1255,7 +1253,7 @@
   if
    i32.const 0
    i32.const 1440
-   i32.const 501
+   i32.const 505
    i32.const 14
    call $~lib/builtins/abort
    unreachable