summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pass.cpp1
-rw-r--r--src/passes/RemoveUnusedBrs.cpp162
-rw-r--r--src/passes/Vacuum.cpp38
-rw-r--r--test/emcc_O2_hello_world.fromasm946
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise946
-rw-r--r--test/emcc_hello_world.fromasm2120
-rw-r--r--test/emcc_hello_world.fromasm.imprecise2120
-rw-r--r--test/memorygrowth.fromasm849
-rw-r--r--test/memorygrowth.fromasm.imprecise849
-rw-r--r--test/passes/remove-unused-brs.txt93
-rw-r--r--test/passes/remove-unused-brs.wast73
-rw-r--r--test/passes/vacuum.txt23
-rw-r--r--test/passes/vacuum.wast31
-rw-r--r--test/unit.fromasm5
-rw-r--r--test/unit.fromasm.imprecise5
15 files changed, 3930 insertions, 4331 deletions
diff --git a/src/pass.cpp b/src/pass.cpp
index 7095da71d..5c4f510f8 100644
--- a/src/pass.cpp
+++ b/src/pass.cpp
@@ -65,6 +65,7 @@ void PassRunner::addDefaultOptimizationPasses() {
add("merge-blocks");
add("reorder-locals");
add("vacuum");
+ add("optimize-instructions");
}
void PassRunner::run(Module* module) {
diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp
index cfd9ea7ce..3d6d6973f 100644
--- a/src/passes/RemoveUnusedBrs.cpp
+++ b/src/passes/RemoveUnusedBrs.cpp
@@ -15,89 +15,133 @@
*/
//
-// Removes branches that go to where they go anyhow
+// Removes branches for which we go to where they go anyhow
//
#include <wasm.h>
#include <pass.h>
+#include <ast_utils.h>
namespace wasm {
struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<RemoveUnusedBrs>>> {
bool isFunctionParallel() { return true; }
- // preparation: try to unify branches, as the fewer there are, the higher a chance we can remove them
- // specifically for if-else, turn an if-else with branches to the same target at the end of each
- // child, and with a value, to a branch to that target containing the if-else
+ bool anotherCycle;
+
+ typedef std::vector<Break*> Flows;
+
+ // list of breaks that are currently flowing. if they reach their target without
+ // interference, they can be removed (or their value forwarded TODO)
+ Flows flows;
+
+ // a stack for if-else contents, we merge their outputs
+ std::vector<Flows> ifStack;
+
+ static void visitAny(RemoveUnusedBrs* self, Expression** currp) {
+ auto* curr = *currp;
+ auto& flows = self->flows;
+
+ if (curr->is<Break>()) {
+ flows.clear();
+ auto* br = curr->cast<Break>();
+ if (!br->condition && !br->value) { // TODO: optimize in those cases?
+ // a break, let's see where it flows to
+ flows.push_back(br);
+ }
+ } else if (curr->is<Switch>()) {
+ flows.clear();
+ } else if (curr->is<If>()) {
+ auto* iff = curr->cast<If>();
+ if (iff->ifFalse) {
+ assert(self->ifStack.size() > 0);
+ for (auto* flow : self->ifStack.back()) {
+ flows.push_back(flow);
+ }
+ self->ifStack.pop_back();
+ }
+ } else if (curr->is<Block>()) {
+ // any breaks flowing to here are unnecessary, as we get here anyhow
+ auto name = curr->cast<Block>()->name;
+ if (name.is()) {
+ size_t size = flows.size();
+ size_t skip = 0;
+ for (size_t i = 0; i < size; i++) {
+ if (flows[i]->name == name) {
+ ExpressionManipulator::nop(flows[i]);
+ skip++;
+ self->anotherCycle = true;
+ } else if (skip > 0) {
+ flows[i - skip] = flows[i];
+ }
+ }
+ if (skip > 0) {
+ flows.resize(size - skip);
+ }
+ }
+ } else if (curr->is<Loop>()) {
+ // TODO we might optimize branches out of here
+ flows.clear();
+ } else if (curr->is<Nop>()) {
+ // ignore (could be result of a previous cycle)
+ } else {
+ // anything else stops the flow
+ flows.clear();
+ }
+ }
+
+ static void clear(RemoveUnusedBrs* self, Expression** currp) {
+ self->flows.clear();
+ }
+
+ static void saveIfTrue(RemoveUnusedBrs* self, Expression** currp) {
+ self->ifStack.push_back(std::move(self->flows));
+ }
+
void visitIf(If* curr) {
if (!curr->ifFalse) {
- // try to reduce an if (condition) br => br_if (condition) , which might open up other optimization opportunities
+ // if without an else. try to reduce if (condition) br => br_if (condition)
Break* br = curr->ifTrue->dynCast<Break>();
if (br && !br->condition) { // TODO: if there is a condition, join them
br->condition = curr->condition;
replaceCurrent(br);
+ anotherCycle = true;
}
- return;
- }
- if (isConcreteWasmType(curr->type)) return; // already has a returned value
- // an if_else that indirectly returns a value by breaking to the same target can potentially remove both breaks, and break outside once
- auto getLast = [](Expression *side) -> Expression* {
- Block* b = side->dynCast<Block>();
- if (!b) return nullptr;
- if (b->list.size() == 0) return nullptr;
- return b->list.back();
- };
- auto process = [&](Expression *side, bool doIt) {
- Expression* last = getLast(side);
- if (!last) return Name();
- Block* b = side->cast<Block>();
- Break* br = last->dynCast<Break>();
- if (!br) return Name();
- if (br->condition) return Name();
- if (!br->value) return Name();
- if (doIt) {
- b->list[b->list.size()-1] = br->value;
- }
- return br->name;
- };
- // do both, or none
- if (process(curr->ifTrue, false).is() && process(curr->ifTrue, false) == process(curr->ifFalse, false)) {
- auto br = getLast(curr->ifTrue)->cast<Break>(); // we are about to discard this, so why not reuse it!
- process(curr->ifTrue, true);
- process(curr->ifFalse, true);
- curr->type = br->value->type; // if_else now returns a value
- br->value = curr;
- // no need to change anything else in the br - target is correct already
- replaceCurrent(br);
}
}
- // main portion
- void visitBlock(Block *curr) {
- if (curr->name.isNull()) return;
- if (curr->list.size() == 0) return;
- // preparation - remove all code after an unconditional break, since it can't execute, and it might confuse us (we look at the last)
- for (size_t i = 0; i < curr->list.size()-1; i++) {
- Break* br = curr->list[i]->dynCast<Break>();
- if (br && !br->condition) {
- curr->list.resize(i+1);
- break;
- }
- }
- Expression* last = curr->list.back();
- if (Break* br = last->dynCast<Break>()) {
- if (br->condition) return;
- if (br->name == curr->name) {
- if (!br->value) {
- curr->list.pop_back();
- } else {
- curr->list[curr->list.size()-1] = br->value; // can replace with the value
- }
+ // override scan to add a pre and a post check task to all nodes
+ static void scan(RemoveUnusedBrs* self, Expression** currp) {
+ self->pushTask(visitAny, currp);
+
+ auto* iff = (*currp)->dynCast<If>();
+
+ if (iff) {
+ self->pushTask(doVisitIf, currp);
+ if (iff->ifFalse) {
+ // we need to join up if-else control flow, and clear after the condition
+ self->pushTask(scan, &iff->ifFalse);
+ self->pushTask(saveIfTrue, currp); // safe the ifTrue flow, we'll join it later
}
+ self->pushTask(scan, &iff->ifTrue);
+ self->pushTask(clear, currp); // clear all flow after the condition
+ self->pushTask(scan, &iff->condition);
+ } else {
+ WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<RemoveUnusedBrs>>>::scan(self, currp);
}
}
+
+ void walk(Expression*& root) {
+ // multiple cycles may be needed
+ do {
+ anotherCycle = false;
+ WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<RemoveUnusedBrs>>>::walk(root);
+ assert(ifStack.empty());
+ assert(flows.empty());
+ } while (anotherCycle);
+ }
};
-static RegisterPass<RemoveUnusedBrs> registerPass("remove-unused-brs", "removes breaks from locations that are never branched to");
+static RegisterPass<RemoveUnusedBrs> registerPass("remove-unused-brs", "removes breaks from locations that are not needed");
} // namespace wasm
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp
index 863d78f14..dd88fa0eb 100644
--- a/src/passes/Vacuum.cpp
+++ b/src/passes/Vacuum.cpp
@@ -21,6 +21,7 @@
#include <wasm.h>
#include <pass.h>
#include <ast_utils.h>
+#include <wasm-builder.h>
namespace wasm {
@@ -32,14 +33,26 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum, Visitor<Vacuum>>> {
int skip = 0;
auto& list = curr->list;
size_t size = list.size();
+ bool needResize = false;
for (size_t z = 0; z < size; z++) {
if (list[z]->is<Nop>()) {
skip++;
- } else if (skip > 0) {
- list[z - skip] = list[z];
+ needResize = true;
+ } else {
+ if (skip > 0) {
+ list[z - skip] = list[z];
+ }
+ // if this is an unconditional br, the rest is dead code
+ Break* br = list[z - skip]->dynCast<Break>();
+ Switch* sw = list[z - skip]->dynCast<Switch>();
+ if ((br && !br->condition) || sw) {
+ list.resize(z - skip + 1);
+ needResize = false;
+ break;
+ }
}
}
- if (skip > 0) {
+ if (needResize) {
list.resize(size - skip);
}
if (!curr->name.is()) {
@@ -50,6 +63,25 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum, Visitor<Vacuum>>> {
}
}
}
+
+ void visitIf(If* curr) {
+ if (curr->ifFalse) {
+ if (curr->ifFalse->is<Nop>()) {
+ curr->ifFalse = nullptr;
+ } else if (curr->ifTrue->is<Nop>()) {
+ curr->ifTrue = curr->ifFalse;
+ curr->ifFalse = nullptr;
+ curr->condition = Builder(*getModule()).makeUnary(EqZ, curr->condition, curr->condition->type);
+ }
+ }
+ if (!curr->ifFalse) {
+ // no else
+ if (curr->ifTrue->is<Nop>()) {
+ // no nothing
+ replaceCurrent(curr->condition);
+ }
+ }
+ }
};
static RegisterPass<Vacuum> registerPass("vacuum", "removes obviously unneeded code");
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index de6dfd4b8..ce017ac82 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -217,59 +217,56 @@
)
)
)
- (block $do-once$2
- (if
- (i32.ne
- (get_local $i7)
- (get_local $i11)
- )
- (block
- (if
- (i32.lt_u
- (get_local $i11)
- (i32.load
- (i32.const 192)
- )
+ (if
+ (i32.ne
+ (get_local $i7)
+ (get_local $i11)
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i11)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $i12
- (i32.add
- (get_local $i11)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $i12
+ (i32.add
+ (get_local $i11)
+ (i32.const 12)
)
)
- (get_local $i9)
)
- (block
- (i32.store
- (get_local $i12)
- (get_local $i7)
- )
- (i32.store
- (get_local $i8)
- (get_local $i11)
- )
- (br $do-once$2)
+ (get_local $i9)
+ )
+ (block
+ (i32.store
+ (get_local $i12)
+ (get_local $i7)
+ )
+ (i32.store
+ (get_local $i8)
+ (get_local $i11)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $i4)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $i6)
- )
- (i32.const -1)
+ )
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $i4)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $i6)
)
+ (i32.const -1)
)
)
)
@@ -462,70 +459,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.ne
- (get_local $i15)
- (get_local $i7)
- )
- (block
- (if
- (i32.lt_u
- (get_local $i7)
- (i32.load
- (i32.const 192)
- )
+ (if
+ (i32.ne
+ (get_local $i15)
+ (get_local $i7)
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i7)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $i11
- (i32.add
- (get_local $i7)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $i11
+ (i32.add
+ (get_local $i7)
+ (i32.const 12)
)
)
- (get_local $i14)
)
- (block
- (i32.store
- (get_local $i11)
- (get_local $i15)
- )
- (i32.store
- (get_local $i16)
- (get_local $i7)
- )
- (set_local $i18
- (i32.load
- (i32.const 184)
- )
+ (get_local $i14)
+ )
+ (block
+ (i32.store
+ (get_local $i11)
+ (get_local $i15)
+ )
+ (i32.store
+ (get_local $i16)
+ (get_local $i7)
+ )
+ (set_local $i18
+ (i32.load
+ (i32.const 184)
)
- (br $do-once$4)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
- (block
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $i4)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $i17)
- )
- (i32.const -1)
+ )
+ (block
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $i4)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $i17)
)
+ (i32.const -1)
)
)
- (set_local $i18
- (get_local $i8)
- )
+ )
+ (set_local $i18
+ (get_local $i8)
)
)
)
@@ -1015,7 +1009,6 @@
(set_local $i24
(get_local $i27)
)
- (br $do-once$8)
)
)
)
@@ -1069,7 +1062,6 @@
(set_local $i24
(get_local $i12)
)
- (br $do-once$8)
)
(call_import $_abort)
)
@@ -1181,29 +1173,26 @@
(get_local $i24)
(get_local $i5)
)
- (block $do-once$14
+ (if
+ (set_local $i7
+ (i32.load offset=16
+ (get_local $i22)
+ )
+ )
(if
- (set_local $i7
- (i32.load offset=16
- (get_local $i22)
- )
+ (i32.lt_u
+ (get_local $i7)
+ (get_local $i12)
)
- (if
- (i32.lt_u
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i24)
(get_local $i7)
- (get_local $i12)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i24)
- (get_local $i7)
- )
- (i32.store offset=24
- (get_local $i7)
- (get_local $i24)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $i7)
+ (get_local $i24)
)
)
)
@@ -1231,7 +1220,6 @@
(get_local $i7)
(get_local $i24)
)
- (br $do-once$12)
)
)
)
@@ -2194,7 +2182,6 @@
(set_local $i45
(get_local $i48)
)
- (br $do-once$21)
)
)
)
@@ -2248,7 +2235,6 @@
(set_local $i45
(get_local $i7)
)
- (br $do-once$21)
)
(call_import $_abort)
)
@@ -2360,29 +2346,26 @@
(get_local $i45)
(get_local $i3)
)
- (block $do-once$27
+ (if
+ (set_local $i15
+ (i32.load offset=16
+ (get_local $i44)
+ )
+ )
(if
- (set_local $i15
- (i32.load offset=16
- (get_local $i44)
- )
+ (i32.lt_u
+ (get_local $i15)
+ (get_local $i7)
)
- (if
- (i32.lt_u
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i45)
(get_local $i15)
- (get_local $i7)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i45)
- (get_local $i15)
- )
- (i32.store offset=24
- (get_local $i15)
- (get_local $i45)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $i15)
+ (get_local $i45)
)
)
)
@@ -2410,7 +2393,6 @@
(get_local $i15)
(get_local $i45)
)
- (br $do-once$25)
)
)
)
@@ -2838,7 +2820,6 @@
(get_local $i8)
(get_local $i8)
)
- (br $do-once$29)
)
)
(if
@@ -2891,7 +2872,6 @@
(get_local $i8)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $_abort)
)
@@ -3112,64 +3092,61 @@
)
)
)
- (block $do-once$33
- (if
- (i32.eqz
- (i32.load
- (i32.const 648)
- )
+ (if
+ (i32.eqz
+ (i32.load
+ (i32.const 648)
)
- (if
- (i32.and
- (i32.add
- (set_local $i53
- (call_import $_sysconf
- (i32.const 30)
- )
+ )
+ (if
+ (i32.and
+ (i32.add
+ (set_local $i53
+ (call_import $_sysconf
+ (i32.const 30)
)
- (i32.const -1)
)
+ (i32.const -1)
+ )
+ (get_local $i53)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (i32.const 656)
(get_local $i53)
)
- (call_import $_abort)
- (block
- (i32.store
- (i32.const 656)
- (get_local $i53)
- )
- (i32.store
- (i32.const 652)
- (get_local $i53)
- )
- (i32.store
- (i32.const 660)
- (i32.const -1)
- )
- (i32.store
- (i32.const 664)
- (i32.const -1)
- )
- (i32.store
- (i32.const 668)
- (i32.const 0)
- )
- (i32.store
- (i32.const 620)
- (i32.const 0)
- )
- (i32.store
- (i32.const 648)
- (i32.xor
- (i32.and
- (call_import $_time
- (i32.const 0)
- )
- (i32.const -16)
+ (i32.store
+ (i32.const 652)
+ (get_local $i53)
+ )
+ (i32.store
+ (i32.const 660)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 664)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 668)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 620)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 648)
+ (i32.xor
+ (i32.and
+ (call_import $_time
+ (i32.const 0)
)
- (i32.const 1431655768)
+ (i32.const -16)
)
+ (i32.const 1431655768)
)
- (br $do-once$33)
)
)
)
@@ -3545,76 +3522,71 @@
(get_local $i61)
)
)
- (block $do-once$42
+ (if
(if
- (if
+ (i32.and
+ (i32.gt_u
+ (get_local $i53)
+ (get_local $i61)
+ )
(i32.and
- (i32.gt_u
- (get_local $i53)
+ (i32.lt_u
(get_local $i61)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $i61)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $i60)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $i60)
+ (i32.const -1)
)
)
- (i32.lt_u
- (set_local $i5
- (i32.and
- (i32.add
- (i32.sub
- (get_local $i44)
- (get_local $i61)
- )
- (set_local $i52
- (i32.load
- (i32.const 656)
- )
- )
- )
+ )
+ (i32.lt_u
+ (set_local $i5
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $i52)
+ (get_local $i44)
+ (get_local $i61)
)
+ (set_local $i52
+ (i32.load
+ (i32.const 656)
+ )
+ )
+ )
+ (i32.sub
+ (i32.const 0)
+ (get_local $i52)
)
)
- (i32.const 2147483647)
)
- (i32.const 0)
+ (i32.const 2147483647)
)
- (if
- (i32.eq
- (call_import $_sbrk
- (get_local $i5)
- )
- (i32.const -1)
- )
- (block
- (call_import $_sbrk
- (get_local $i45)
- )
- (br $label$break$L279)
+ (i32.const 0)
+ )
+ (if
+ (i32.eq
+ (call_import $_sbrk
+ (get_local $i5)
)
- (block
- (set_local $i63
- (i32.add
- (get_local $i5)
- (get_local $i61)
- )
- )
- (br $do-once$42)
+ (i32.const -1)
+ )
+ (block
+ (call_import $_sbrk
+ (get_local $i45)
)
+ (br $label$break$L279)
)
(set_local $i63
- (get_local $i61)
+ (i32.add
+ (get_local $i5)
+ (get_local $i61)
+ )
)
)
+ (set_local $i63
+ (get_local $i61)
+ )
)
(if
(i32.ne
@@ -4306,7 +4278,6 @@
(set_local $i72
(get_local $i75)
)
- (br $do-once$53)
)
)
)
@@ -4360,7 +4331,6 @@
(set_local $i72
(get_local $i55)
)
- (br $do-once$53)
)
(call_import $_abort)
)
@@ -4471,34 +4441,31 @@
(get_local $i72)
(get_local $i54)
)
- (block $do-once$59
- (if
- (set_local $i45
- (i32.load
- (set_local $i5
- (i32.add
- (get_local $i43)
- (i32.const 16)
- )
+ (if
+ (set_local $i45
+ (i32.load
+ (set_local $i5
+ (i32.add
+ (get_local $i43)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i45)
+ (get_local $i55)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i72)
(get_local $i45)
- (get_local $i55)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i72)
- (get_local $i45)
- )
- (i32.store offset=24
- (get_local $i45)
- (get_local $i72)
- )
- (br $do-once$59)
+ (i32.store offset=24
+ (get_local $i45)
+ (get_local $i72)
)
)
)
@@ -4529,7 +4496,6 @@
(get_local $i45)
(get_local $i72)
)
- (br $label$break$L331)
)
)
)
@@ -5113,7 +5079,6 @@
(get_local $i63)
(get_local $i63)
)
- (br $do-once$50)
)
)
(if
@@ -5166,7 +5131,6 @@
(get_local $i63)
(i32.const 0)
)
- (br $do-once$50)
)
(call_import $_abort)
)
@@ -5857,7 +5821,6 @@
(get_local $i60)
(get_local $i60)
)
- (br $do-once$44)
)
)
(if
@@ -5910,7 +5873,6 @@
(get_local $i60)
(i32.const 0)
)
- (br $do-once$44)
)
(call_import $_abort)
)
@@ -6598,7 +6560,6 @@
(set_local $i18
(get_local $i21)
)
- (br $do-once$2)
)
)
)
@@ -6652,7 +6613,6 @@
(set_local $i18
(get_local $i10)
)
- (br $do-once$2)
)
(call_import $_abort)
)
@@ -6778,34 +6738,31 @@
(get_local $i18)
(get_local $i7)
)
- (block $do-once$6
- (if
- (set_local $i14
- (i32.load
- (set_local $i11
- (i32.add
- (get_local $i8)
- (i32.const 16)
- )
+ (if
+ (set_local $i14
+ (i32.load
+ (set_local $i11
+ (i32.add
+ (get_local $i8)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i14)
+ (get_local $i10)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i18)
(get_local $i14)
- (get_local $i10)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i18)
- (get_local $i14)
- )
- (i32.store offset=24
- (get_local $i14)
- (get_local $i18)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $i14)
+ (get_local $i18)
)
)
)
@@ -6839,7 +6796,6 @@
(set_local $i13
(get_local $i9)
)
- (br $do-once$0)
)
)
(block
@@ -7164,7 +7120,6 @@
(set_local $i23
(get_local $i26)
)
- (br $do-once$10)
)
)
)
@@ -7220,7 +7175,6 @@
(set_local $i23
(get_local $i22)
)
- (br $do-once$10)
)
(call_import $_abort)
)
@@ -7331,34 +7285,31 @@
(get_local $i23)
(get_local $i21)
)
- (block $do-once$14
- (if
- (set_local $i8
- (i32.load
- (set_local $i9
- (i32.add
- (get_local $i6)
- (i32.const 16)
- )
+ (if
+ (set_local $i8
+ (i32.load
+ (set_local $i9
+ (i32.add
+ (get_local $i6)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i8)
+ (get_local $i22)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i23)
(get_local $i8)
- (get_local $i22)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i23)
- (get_local $i8)
- )
- (i32.store offset=24
- (get_local $i8)
- (get_local $i23)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $i8)
+ (get_local $i23)
)
)
)
@@ -7386,7 +7337,6 @@
(get_local $i8)
(get_local $i23)
)
- (br $do-once$8)
)
)
)
@@ -7773,228 +7723,224 @@
(get_local $i12)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.and
- (set_local $i30
- (i32.load
- (i32.const 180)
- )
+ (if
+ (i32.and
+ (set_local $i30
+ (i32.load
+ (i32.const 180)
)
- (set_local $i18
- (i32.shl
- (i32.const 1)
- (get_local $i32)
- )
+ )
+ (set_local $i18
+ (i32.shl
+ (i32.const 1)
+ (get_local $i32)
)
)
- (block
- (set_local $i31
- (i32.shl
- (get_local $i29)
- (if
- (i32.eq
+ )
+ (block
+ (set_local $i31
+ (i32.shl
+ (get_local $i29)
+ (if
+ (i32.eq
+ (get_local $i32)
+ (i32.const 31)
+ )
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
(get_local $i32)
- (i32.const 31)
- )
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $i32)
- (i32.const 1)
- )
+ (i32.const 1)
)
)
)
)
- (set_local $i2
- (i32.load
- (get_local $i5)
- )
+ )
+ (set_local $i2
+ (i32.load
+ (get_local $i5)
)
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $i2)
- )
- (i32.const -8)
- )
- (get_local $i29)
- )
- (block
- (set_local $i33
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
(get_local $i2)
)
- (set_local $i34
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const -8)
)
+ (get_local $i29)
)
- (if
- (set_local $i13
- (i32.load
- (set_local $i28
+ (block
+ (set_local $i33
+ (get_local $i2)
+ )
+ (set_local $i34
+ (i32.const 130)
+ )
+ (br $while-out$18)
+ )
+ )
+ (if
+ (set_local $i13
+ (i32.load
+ (set_local $i28
+ (i32.add
(i32.add
- (i32.add
- (get_local $i2)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $i31)
- (i32.const 31)
- )
- (i32.const 2)
+ (get_local $i2)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $i31)
+ (i32.const 31)
)
+ (i32.const 2)
)
)
)
)
- (block
- (set_local $i31
- (i32.shl
- (get_local $i31)
- (i32.const 1)
- )
- )
- (set_local $i2
- (get_local $i13)
+ )
+ (block
+ (set_local $i31
+ (i32.shl
+ (get_local $i31)
+ (i32.const 1)
)
)
- (block
- (set_local $i35
- (get_local $i28)
- )
- (set_local $i36
- (get_local $i2)
- )
- (set_local $i34
- (i32.const 127)
- )
- (br $while-out$18)
+ (set_local $i2
+ (get_local $i13)
+ )
+ )
+ (block
+ (set_local $i35
+ (get_local $i28)
+ )
+ (set_local $i36
+ (get_local $i2)
+ )
+ (set_local $i34
+ (i32.const 127)
+ )
+ (br $while-out$18)
+ )
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $i34)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $i35)
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (get_local $i35)
+ (get_local $i12)
+ )
+ (i32.store offset=24
+ (get_local $i12)
+ (get_local $i36)
+ )
+ (i32.store offset=12
+ (get_local $i12)
+ (get_local $i12)
+ )
+ (i32.store offset=8
+ (get_local $i12)
+ (get_local $i12)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $i34)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $i35)
- (i32.load
- (i32.const 192)
+ (i32.and
+ (i32.ge_u
+ (set_local $i31
+ (i32.load
+ (set_local $i2
+ (i32.add
+ (get_local $i33)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $i9
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $i33)
+ (get_local $i9)
)
)
- (call_import $_abort)
(block
+ (i32.store offset=12
+ (get_local $i31)
+ (get_local $i12)
+ )
(i32.store
- (get_local $i35)
+ (get_local $i2)
(get_local $i12)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $i12)
- (get_local $i36)
+ (get_local $i31)
)
(i32.store offset=12
(get_local $i12)
- (get_local $i12)
+ (get_local $i33)
)
- (i32.store offset=8
- (get_local $i12)
+ (i32.store offset=24
(get_local $i12)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $i34)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $i31
- (i32.load
- (set_local $i2
- (i32.add
- (get_local $i33)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $i9
- (i32.load
- (i32.const 192)
- )
- )
- )
- (i32.ge_u
- (get_local $i33)
- (get_local $i9)
- )
- )
- (block
- (i32.store offset=12
- (get_local $i31)
- (get_local $i12)
- )
- (i32.store
- (get_local $i2)
- (get_local $i12)
- )
- (i32.store offset=8
- (get_local $i12)
- (get_local $i31)
- )
- (i32.store offset=12
- (get_local $i12)
- (get_local $i33)
- )
- (i32.store offset=24
- (get_local $i12)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
- (block
- (i32.store
- (i32.const 180)
- (i32.or
- (get_local $i30)
- (get_local $i18)
- )
- )
- (i32.store
- (get_local $i5)
- (get_local $i12)
- )
- (i32.store offset=24
- (get_local $i12)
- (get_local $i5)
- )
- (i32.store offset=12
- (get_local $i12)
- (get_local $i12)
- )
- (i32.store offset=8
- (get_local $i12)
- (get_local $i12)
+ )
+ (block
+ (i32.store
+ (i32.const 180)
+ (i32.or
+ (get_local $i30)
+ (get_local $i18)
)
)
+ (i32.store
+ (get_local $i5)
+ (get_local $i12)
+ )
+ (i32.store offset=24
+ (get_local $i12)
+ (get_local $i5)
+ )
+ (i32.store offset=12
+ (get_local $i12)
+ (get_local $i12)
+ )
+ (i32.store offset=8
+ (get_local $i12)
+ (get_local $i12)
+ )
)
)
(i32.store
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index de6dfd4b8..ce017ac82 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -217,59 +217,56 @@
)
)
)
- (block $do-once$2
- (if
- (i32.ne
- (get_local $i7)
- (get_local $i11)
- )
- (block
- (if
- (i32.lt_u
- (get_local $i11)
- (i32.load
- (i32.const 192)
- )
+ (if
+ (i32.ne
+ (get_local $i7)
+ (get_local $i11)
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i11)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $i12
- (i32.add
- (get_local $i11)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $i12
+ (i32.add
+ (get_local $i11)
+ (i32.const 12)
)
)
- (get_local $i9)
)
- (block
- (i32.store
- (get_local $i12)
- (get_local $i7)
- )
- (i32.store
- (get_local $i8)
- (get_local $i11)
- )
- (br $do-once$2)
+ (get_local $i9)
+ )
+ (block
+ (i32.store
+ (get_local $i12)
+ (get_local $i7)
+ )
+ (i32.store
+ (get_local $i8)
+ (get_local $i11)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $i4)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $i6)
- )
- (i32.const -1)
+ )
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $i4)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $i6)
)
+ (i32.const -1)
)
)
)
@@ -462,70 +459,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.ne
- (get_local $i15)
- (get_local $i7)
- )
- (block
- (if
- (i32.lt_u
- (get_local $i7)
- (i32.load
- (i32.const 192)
- )
+ (if
+ (i32.ne
+ (get_local $i15)
+ (get_local $i7)
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i7)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $i11
- (i32.add
- (get_local $i7)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $i11
+ (i32.add
+ (get_local $i7)
+ (i32.const 12)
)
)
- (get_local $i14)
)
- (block
- (i32.store
- (get_local $i11)
- (get_local $i15)
- )
- (i32.store
- (get_local $i16)
- (get_local $i7)
- )
- (set_local $i18
- (i32.load
- (i32.const 184)
- )
+ (get_local $i14)
+ )
+ (block
+ (i32.store
+ (get_local $i11)
+ (get_local $i15)
+ )
+ (i32.store
+ (get_local $i16)
+ (get_local $i7)
+ )
+ (set_local $i18
+ (i32.load
+ (i32.const 184)
)
- (br $do-once$4)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
- (block
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $i4)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $i17)
- )
- (i32.const -1)
+ )
+ (block
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $i4)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $i17)
)
+ (i32.const -1)
)
)
- (set_local $i18
- (get_local $i8)
- )
+ )
+ (set_local $i18
+ (get_local $i8)
)
)
)
@@ -1015,7 +1009,6 @@
(set_local $i24
(get_local $i27)
)
- (br $do-once$8)
)
)
)
@@ -1069,7 +1062,6 @@
(set_local $i24
(get_local $i12)
)
- (br $do-once$8)
)
(call_import $_abort)
)
@@ -1181,29 +1173,26 @@
(get_local $i24)
(get_local $i5)
)
- (block $do-once$14
+ (if
+ (set_local $i7
+ (i32.load offset=16
+ (get_local $i22)
+ )
+ )
(if
- (set_local $i7
- (i32.load offset=16
- (get_local $i22)
- )
+ (i32.lt_u
+ (get_local $i7)
+ (get_local $i12)
)
- (if
- (i32.lt_u
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i24)
(get_local $i7)
- (get_local $i12)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i24)
- (get_local $i7)
- )
- (i32.store offset=24
- (get_local $i7)
- (get_local $i24)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $i7)
+ (get_local $i24)
)
)
)
@@ -1231,7 +1220,6 @@
(get_local $i7)
(get_local $i24)
)
- (br $do-once$12)
)
)
)
@@ -2194,7 +2182,6 @@
(set_local $i45
(get_local $i48)
)
- (br $do-once$21)
)
)
)
@@ -2248,7 +2235,6 @@
(set_local $i45
(get_local $i7)
)
- (br $do-once$21)
)
(call_import $_abort)
)
@@ -2360,29 +2346,26 @@
(get_local $i45)
(get_local $i3)
)
- (block $do-once$27
+ (if
+ (set_local $i15
+ (i32.load offset=16
+ (get_local $i44)
+ )
+ )
(if
- (set_local $i15
- (i32.load offset=16
- (get_local $i44)
- )
+ (i32.lt_u
+ (get_local $i15)
+ (get_local $i7)
)
- (if
- (i32.lt_u
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i45)
(get_local $i15)
- (get_local $i7)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i45)
- (get_local $i15)
- )
- (i32.store offset=24
- (get_local $i15)
- (get_local $i45)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $i15)
+ (get_local $i45)
)
)
)
@@ -2410,7 +2393,6 @@
(get_local $i15)
(get_local $i45)
)
- (br $do-once$25)
)
)
)
@@ -2838,7 +2820,6 @@
(get_local $i8)
(get_local $i8)
)
- (br $do-once$29)
)
)
(if
@@ -2891,7 +2872,6 @@
(get_local $i8)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $_abort)
)
@@ -3112,64 +3092,61 @@
)
)
)
- (block $do-once$33
- (if
- (i32.eqz
- (i32.load
- (i32.const 648)
- )
+ (if
+ (i32.eqz
+ (i32.load
+ (i32.const 648)
)
- (if
- (i32.and
- (i32.add
- (set_local $i53
- (call_import $_sysconf
- (i32.const 30)
- )
+ )
+ (if
+ (i32.and
+ (i32.add
+ (set_local $i53
+ (call_import $_sysconf
+ (i32.const 30)
)
- (i32.const -1)
)
+ (i32.const -1)
+ )
+ (get_local $i53)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (i32.const 656)
(get_local $i53)
)
- (call_import $_abort)
- (block
- (i32.store
- (i32.const 656)
- (get_local $i53)
- )
- (i32.store
- (i32.const 652)
- (get_local $i53)
- )
- (i32.store
- (i32.const 660)
- (i32.const -1)
- )
- (i32.store
- (i32.const 664)
- (i32.const -1)
- )
- (i32.store
- (i32.const 668)
- (i32.const 0)
- )
- (i32.store
- (i32.const 620)
- (i32.const 0)
- )
- (i32.store
- (i32.const 648)
- (i32.xor
- (i32.and
- (call_import $_time
- (i32.const 0)
- )
- (i32.const -16)
+ (i32.store
+ (i32.const 652)
+ (get_local $i53)
+ )
+ (i32.store
+ (i32.const 660)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 664)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 668)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 620)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 648)
+ (i32.xor
+ (i32.and
+ (call_import $_time
+ (i32.const 0)
)
- (i32.const 1431655768)
+ (i32.const -16)
)
+ (i32.const 1431655768)
)
- (br $do-once$33)
)
)
)
@@ -3545,76 +3522,71 @@
(get_local $i61)
)
)
- (block $do-once$42
+ (if
(if
- (if
+ (i32.and
+ (i32.gt_u
+ (get_local $i53)
+ (get_local $i61)
+ )
(i32.and
- (i32.gt_u
- (get_local $i53)
+ (i32.lt_u
(get_local $i61)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $i61)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $i60)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $i60)
+ (i32.const -1)
)
)
- (i32.lt_u
- (set_local $i5
- (i32.and
- (i32.add
- (i32.sub
- (get_local $i44)
- (get_local $i61)
- )
- (set_local $i52
- (i32.load
- (i32.const 656)
- )
- )
- )
+ )
+ (i32.lt_u
+ (set_local $i5
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $i52)
+ (get_local $i44)
+ (get_local $i61)
)
+ (set_local $i52
+ (i32.load
+ (i32.const 656)
+ )
+ )
+ )
+ (i32.sub
+ (i32.const 0)
+ (get_local $i52)
)
)
- (i32.const 2147483647)
)
- (i32.const 0)
+ (i32.const 2147483647)
)
- (if
- (i32.eq
- (call_import $_sbrk
- (get_local $i5)
- )
- (i32.const -1)
- )
- (block
- (call_import $_sbrk
- (get_local $i45)
- )
- (br $label$break$L279)
+ (i32.const 0)
+ )
+ (if
+ (i32.eq
+ (call_import $_sbrk
+ (get_local $i5)
)
- (block
- (set_local $i63
- (i32.add
- (get_local $i5)
- (get_local $i61)
- )
- )
- (br $do-once$42)
+ (i32.const -1)
+ )
+ (block
+ (call_import $_sbrk
+ (get_local $i45)
)
+ (br $label$break$L279)
)
(set_local $i63
- (get_local $i61)
+ (i32.add
+ (get_local $i5)
+ (get_local $i61)
+ )
)
)
+ (set_local $i63
+ (get_local $i61)
+ )
)
(if
(i32.ne
@@ -4306,7 +4278,6 @@
(set_local $i72
(get_local $i75)
)
- (br $do-once$53)
)
)
)
@@ -4360,7 +4331,6 @@
(set_local $i72
(get_local $i55)
)
- (br $do-once$53)
)
(call_import $_abort)
)
@@ -4471,34 +4441,31 @@
(get_local $i72)
(get_local $i54)
)
- (block $do-once$59
- (if
- (set_local $i45
- (i32.load
- (set_local $i5
- (i32.add
- (get_local $i43)
- (i32.const 16)
- )
+ (if
+ (set_local $i45
+ (i32.load
+ (set_local $i5
+ (i32.add
+ (get_local $i43)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i45)
+ (get_local $i55)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i72)
(get_local $i45)
- (get_local $i55)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i72)
- (get_local $i45)
- )
- (i32.store offset=24
- (get_local $i45)
- (get_local $i72)
- )
- (br $do-once$59)
+ (i32.store offset=24
+ (get_local $i45)
+ (get_local $i72)
)
)
)
@@ -4529,7 +4496,6 @@
(get_local $i45)
(get_local $i72)
)
- (br $label$break$L331)
)
)
)
@@ -5113,7 +5079,6 @@
(get_local $i63)
(get_local $i63)
)
- (br $do-once$50)
)
)
(if
@@ -5166,7 +5131,6 @@
(get_local $i63)
(i32.const 0)
)
- (br $do-once$50)
)
(call_import $_abort)
)
@@ -5857,7 +5821,6 @@
(get_local $i60)
(get_local $i60)
)
- (br $do-once$44)
)
)
(if
@@ -5910,7 +5873,6 @@
(get_local $i60)
(i32.const 0)
)
- (br $do-once$44)
)
(call_import $_abort)
)
@@ -6598,7 +6560,6 @@
(set_local $i18
(get_local $i21)
)
- (br $do-once$2)
)
)
)
@@ -6652,7 +6613,6 @@
(set_local $i18
(get_local $i10)
)
- (br $do-once$2)
)
(call_import $_abort)
)
@@ -6778,34 +6738,31 @@
(get_local $i18)
(get_local $i7)
)
- (block $do-once$6
- (if
- (set_local $i14
- (i32.load
- (set_local $i11
- (i32.add
- (get_local $i8)
- (i32.const 16)
- )
+ (if
+ (set_local $i14
+ (i32.load
+ (set_local $i11
+ (i32.add
+ (get_local $i8)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i14)
+ (get_local $i10)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i18)
(get_local $i14)
- (get_local $i10)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i18)
- (get_local $i14)
- )
- (i32.store offset=24
- (get_local $i14)
- (get_local $i18)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $i14)
+ (get_local $i18)
)
)
)
@@ -6839,7 +6796,6 @@
(set_local $i13
(get_local $i9)
)
- (br $do-once$0)
)
)
(block
@@ -7164,7 +7120,6 @@
(set_local $i23
(get_local $i26)
)
- (br $do-once$10)
)
)
)
@@ -7220,7 +7175,6 @@
(set_local $i23
(get_local $i22)
)
- (br $do-once$10)
)
(call_import $_abort)
)
@@ -7331,34 +7285,31 @@
(get_local $i23)
(get_local $i21)
)
- (block $do-once$14
- (if
- (set_local $i8
- (i32.load
- (set_local $i9
- (i32.add
- (get_local $i6)
- (i32.const 16)
- )
+ (if
+ (set_local $i8
+ (i32.load
+ (set_local $i9
+ (i32.add
+ (get_local $i6)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $i8)
+ (get_local $i22)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $i23)
(get_local $i8)
- (get_local $i22)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $i23)
- (get_local $i8)
- )
- (i32.store offset=24
- (get_local $i8)
- (get_local $i23)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $i8)
+ (get_local $i23)
)
)
)
@@ -7386,7 +7337,6 @@
(get_local $i8)
(get_local $i23)
)
- (br $do-once$8)
)
)
)
@@ -7773,228 +7723,224 @@
(get_local $i12)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.and
- (set_local $i30
- (i32.load
- (i32.const 180)
- )
+ (if
+ (i32.and
+ (set_local $i30
+ (i32.load
+ (i32.const 180)
)
- (set_local $i18
- (i32.shl
- (i32.const 1)
- (get_local $i32)
- )
+ )
+ (set_local $i18
+ (i32.shl
+ (i32.const 1)
+ (get_local $i32)
)
)
- (block
- (set_local $i31
- (i32.shl
- (get_local $i29)
- (if
- (i32.eq
+ )
+ (block
+ (set_local $i31
+ (i32.shl
+ (get_local $i29)
+ (if
+ (i32.eq
+ (get_local $i32)
+ (i32.const 31)
+ )
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
(get_local $i32)
- (i32.const 31)
- )
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $i32)
- (i32.const 1)
- )
+ (i32.const 1)
)
)
)
)
- (set_local $i2
- (i32.load
- (get_local $i5)
- )
+ )
+ (set_local $i2
+ (i32.load
+ (get_local $i5)
)
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $i2)
- )
- (i32.const -8)
- )
- (get_local $i29)
- )
- (block
- (set_local $i33
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
(get_local $i2)
)
- (set_local $i34
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const -8)
)
+ (get_local $i29)
)
- (if
- (set_local $i13
- (i32.load
- (set_local $i28
+ (block
+ (set_local $i33
+ (get_local $i2)
+ )
+ (set_local $i34
+ (i32.const 130)
+ )
+ (br $while-out$18)
+ )
+ )
+ (if
+ (set_local $i13
+ (i32.load
+ (set_local $i28
+ (i32.add
(i32.add
- (i32.add
- (get_local $i2)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $i31)
- (i32.const 31)
- )
- (i32.const 2)
+ (get_local $i2)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $i31)
+ (i32.const 31)
)
+ (i32.const 2)
)
)
)
)
- (block
- (set_local $i31
- (i32.shl
- (get_local $i31)
- (i32.const 1)
- )
- )
- (set_local $i2
- (get_local $i13)
+ )
+ (block
+ (set_local $i31
+ (i32.shl
+ (get_local $i31)
+ (i32.const 1)
)
)
- (block
- (set_local $i35
- (get_local $i28)
- )
- (set_local $i36
- (get_local $i2)
- )
- (set_local $i34
- (i32.const 127)
- )
- (br $while-out$18)
+ (set_local $i2
+ (get_local $i13)
+ )
+ )
+ (block
+ (set_local $i35
+ (get_local $i28)
+ )
+ (set_local $i36
+ (get_local $i2)
+ )
+ (set_local $i34
+ (i32.const 127)
+ )
+ (br $while-out$18)
+ )
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $i34)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $i35)
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (get_local $i35)
+ (get_local $i12)
+ )
+ (i32.store offset=24
+ (get_local $i12)
+ (get_local $i36)
+ )
+ (i32.store offset=12
+ (get_local $i12)
+ (get_local $i12)
+ )
+ (i32.store offset=8
+ (get_local $i12)
+ (get_local $i12)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $i34)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $i35)
- (i32.load
- (i32.const 192)
+ (i32.and
+ (i32.ge_u
+ (set_local $i31
+ (i32.load
+ (set_local $i2
+ (i32.add
+ (get_local $i33)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $i9
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $i33)
+ (get_local $i9)
)
)
- (call_import $_abort)
(block
+ (i32.store offset=12
+ (get_local $i31)
+ (get_local $i12)
+ )
(i32.store
- (get_local $i35)
+ (get_local $i2)
(get_local $i12)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $i12)
- (get_local $i36)
+ (get_local $i31)
)
(i32.store offset=12
(get_local $i12)
- (get_local $i12)
+ (get_local $i33)
)
- (i32.store offset=8
- (get_local $i12)
+ (i32.store offset=24
(get_local $i12)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $i34)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $i31
- (i32.load
- (set_local $i2
- (i32.add
- (get_local $i33)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $i9
- (i32.load
- (i32.const 192)
- )
- )
- )
- (i32.ge_u
- (get_local $i33)
- (get_local $i9)
- )
- )
- (block
- (i32.store offset=12
- (get_local $i31)
- (get_local $i12)
- )
- (i32.store
- (get_local $i2)
- (get_local $i12)
- )
- (i32.store offset=8
- (get_local $i12)
- (get_local $i31)
- )
- (i32.store offset=12
- (get_local $i12)
- (get_local $i33)
- )
- (i32.store offset=24
- (get_local $i12)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
- (block
- (i32.store
- (i32.const 180)
- (i32.or
- (get_local $i30)
- (get_local $i18)
- )
- )
- (i32.store
- (get_local $i5)
- (get_local $i12)
- )
- (i32.store offset=24
- (get_local $i12)
- (get_local $i5)
- )
- (i32.store offset=12
- (get_local $i12)
- (get_local $i12)
- )
- (i32.store offset=8
- (get_local $i12)
- (get_local $i12)
+ )
+ (block
+ (i32.store
+ (i32.const 180)
+ (i32.or
+ (get_local $i30)
+ (get_local $i18)
)
)
+ (i32.store
+ (get_local $i5)
+ (get_local $i12)
+ )
+ (i32.store offset=24
+ (get_local $i12)
+ (get_local $i5)
+ )
+ (i32.store offset=12
+ (get_local $i12)
+ (get_local $i12)
+ )
+ (i32.store offset=8
+ (get_local $i12)
+ (get_local $i12)
+ )
)
)
(i32.store
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index 2d8457313..75e2bf024 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -766,14 +766,12 @@
(get_local $$tio)
)
(if
- (i32.eqz
- (i32.eq
- (call_import $___syscall54
- (i32.const 54)
- (get_local $$vararg_buffer)
- )
- (i32.const 0)
+ (i32.ne
+ (call_import $___syscall54
+ (i32.const 54)
+ (get_local $$vararg_buffer)
)
+ (i32.const 0)
)
(i32.store8 offset=75
(get_local $$f)
@@ -990,11 +988,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond19)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$cond19)
+ (i32.const 0)
)
(call $___unlockfile
(get_local $$f$addr$022)
@@ -1037,13 +1033,11 @@
)
(block
(if
- (i32.eqz
- (i32.gt_s
- (i32.load offset=76
- (get_local $$f)
- )
- (i32.const -1)
+ (i32.le_s
+ (i32.load offset=76
+ (get_local $$f)
)
+ (i32.const -1)
)
(block
(set_local $$retval$0
@@ -1918,11 +1912,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$cond)
+ (i32.const 0)
)
(call $___unlockfile
(get_local $$f)
@@ -2526,7 +2518,6 @@
(set_local $$retval$0
(i32.const 4)
)
- (br $do-once$0)
)
(block
(i32.store
@@ -2536,7 +2527,6 @@
(set_local $$retval$0
(i32.const -1)
)
- (br $do-once$0)
)
)
)
@@ -2846,20 +2836,18 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.xor
- (i32.and
- (get_local $$xor)
- (i32.const -2139062144)
- )
+ (i32.ne
+ (i32.and
+ (i32.xor
+ (i32.and
+ (get_local $$xor)
(i32.const -2139062144)
)
- (get_local $$sub)
+ (i32.const -2139062144)
)
- (i32.const 0)
+ (get_local $$sub)
)
+ (i32.const 0)
)
(block
(set_local $$n$addr$133$lcssa
@@ -3859,44 +3847,38 @@
(i32.const 0)
)
(loop $label$break$L1 $label$continue$L1
- (block $do-once$0
+ (if
+ (i32.gt_s
+ (get_local $$cnt$0)
+ (i32.const -1)
+ )
(if
(i32.gt_s
- (get_local $$cnt$0)
- (i32.const -1)
- )
- (if
- (i32.gt_s
- (get_local $$l$0)
- (i32.sub
- (i32.const 2147483647)
- (get_local $$cnt$0)
- )
+ (get_local $$l$0)
+ (i32.sub
+ (i32.const 2147483647)
+ (get_local $$cnt$0)
)
- (block
- (i32.store
- (call $___errno_location)
- (i32.const 75)
- )
- (set_local $$cnt$1
- (i32.const -1)
- )
- (br $do-once$0)
+ )
+ (block
+ (i32.store
+ (call $___errno_location)
+ (i32.const 75)
)
- (block
- (set_local $$cnt$1
- (i32.add
- (get_local $$l$0)
- (get_local $$cnt$0)
- )
- )
- (br $do-once$0)
+ (set_local $$cnt$1
+ (i32.const -1)
)
)
(set_local $$cnt$1
- (get_local $$cnt$0)
+ (i32.add
+ (get_local $$l$0)
+ (get_local $$cnt$0)
+ )
)
)
+ (set_local $$cnt$1
+ (get_local $$cnt$0)
+ )
)
(if
(i32.eq
@@ -3963,7 +3945,6 @@
(i32.const 9)
)
(br $label$break$L9)
- (br $switch$2)
)
(set_local $$incdec$ptr169276$lcssa
(get_local $$incdec$ptr169274)
@@ -3972,7 +3953,6 @@
(get_local $$incdec$ptr169274)
)
(br $label$break$L9)
- (br $switch$2)
)
)
)
@@ -4002,19 +3982,17 @@
(i32.const 0)
)
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s offset=1
- (get_local $$incdec$ptr169276301)
- )
- (i32.const 24)
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s offset=1
+ (get_local $$incdec$ptr169276301)
)
(i32.const 24)
)
- (i32.const 37)
+ (i32.const 24)
)
+ (i32.const 37)
)
(block
(set_local $$incdec$ptr169276$lcssa
@@ -4101,11 +4079,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$z$0$lcssa)
- (get_local $$incdec$ptr169275)
- )
+ (i32.ne
+ (get_local $$z$0$lcssa)
+ (get_local $$incdec$ptr169275)
)
(block
(set_local $$cnt$0
@@ -4481,11 +4457,9 @@
(i32.const 0)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$l10n$1)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$l10n$1)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -4745,26 +4719,24 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (set_local $$32
- (i32.load8_s
- (set_local $$arrayidx114
- (i32.add
- (get_local $$incdec$ptr169269)
- (i32.const 1)
- )
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (set_local $$32
+ (i32.load8_s
+ (set_local $$arrayidx114
+ (i32.add
+ (get_local $$incdec$ptr169269)
+ (i32.const 1)
)
)
)
- (i32.const 24)
)
(i32.const 24)
)
- (i32.const 42)
+ (i32.const 24)
)
+ (i32.const 42)
)
(block
(if
@@ -4950,11 +4922,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$l10n$3)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$l10n$3)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -5394,7 +5364,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(i32.load
@@ -5415,7 +5384,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(set_local $$76
@@ -5451,7 +5419,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store16
(i32.load
@@ -5475,7 +5442,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store8
(i32.load
@@ -5499,7 +5465,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(i32.load
@@ -5520,7 +5485,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(set_local $$86
@@ -5556,7 +5520,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(set_local $$cnt$0
(get_local $$cnt$1)
@@ -6251,107 +6214,99 @@
(i32.const 2)
)
)
- (block $do-once$58
- (if
- (i32.or
- (i32.gt_u
- (get_local $$p$0)
- (i32.const 11)
- )
- (i32.eq
- (set_local $$sub74$i
- (i32.sub
- (i32.const 12)
- (get_local $$p$0)
- )
+ (if
+ (i32.or
+ (i32.gt_u
+ (get_local $$p$0)
+ (i32.const 11)
+ )
+ (i32.eq
+ (set_local $$sub74$i
+ (i32.sub
+ (i32.const 12)
+ (get_local $$p$0)
)
- (i32.const 0)
)
+ (i32.const 0)
)
- (set_local $$y$addr$1$i
- (get_local $$mul$i$240)
+ )
+ (set_local $$y$addr$1$i
+ (get_local $$mul$i$240)
+ )
+ (block
+ (set_local $$re$1482$i
+ (get_local $$sub74$i)
)
- (block
- (set_local $$re$1482$i
- (get_local $$sub74$i)
- )
- (set_local $$round$0481$i
- (f64.const 8)
+ (set_local $$round$0481$i
+ (f64.const 8)
+ )
+ (loop $while-out$60 $while-in$61
+ (set_local $$mul80$i
+ (f64.mul
+ (get_local $$round$0481$i)
+ (f64.const 16)
+ )
)
- (loop $while-out$60 $while-in$61
- (set_local $$mul80$i
- (f64.mul
- (get_local $$round$0481$i)
- (f64.const 16)
+ (if
+ (i32.eq
+ (set_local $$dec78$i
+ (i32.add
+ (get_local $$re$1482$i)
+ (i32.const -1)
+ )
)
+ (i32.const 0)
)
- (if
- (i32.eq
- (set_local $$dec78$i
- (i32.add
- (get_local $$re$1482$i)
- (i32.const -1)
- )
- )
- (i32.const 0)
+ (block
+ (set_local $$mul80$i$lcssa
+ (get_local $$mul80$i)
)
- (block
- (set_local $$mul80$i$lcssa
- (get_local $$mul80$i)
- )
- (br $while-out$60)
+ (br $while-out$60)
+ )
+ (block
+ (set_local $$re$1482$i
+ (get_local $$dec78$i)
)
- (block
- (set_local $$re$1482$i
- (get_local $$dec78$i)
- )
- (set_local $$round$0481$i
- (get_local $$mul80$i)
- )
+ (set_local $$round$0481$i
+ (get_local $$mul80$i)
)
)
- (br $while-in$61)
)
- (if
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s
- (get_local $$prefix$0$add$ptr65$i)
- )
- (i32.const 24)
+ (br $while-in$61)
+ )
+ (if
+ (i32.eq
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s
+ (get_local $$prefix$0$add$ptr65$i)
)
(i32.const 24)
)
- (i32.const 45)
- )
- (block
- (set_local $$y$addr$1$i
- (f64.neg
- (f64.add
- (get_local $$mul80$i$lcssa)
- (f64.sub
- (f64.neg
- (get_local $$mul$i$240)
- )
- (get_local $$mul80$i$lcssa)
- )
- )
- )
- )
- (br $do-once$58)
+ (i32.const 24)
)
- (block
- (set_local $$y$addr$1$i
+ (i32.const 45)
+ )
+ (set_local $$y$addr$1$i
+ (f64.neg
+ (f64.add
+ (get_local $$mul80$i$lcssa)
(f64.sub
- (f64.add
+ (f64.neg
(get_local $$mul$i$240)
- (get_local $$mul80$i$lcssa)
)
(get_local $$mul80$i$lcssa)
)
)
- (br $do-once$58)
+ )
+ )
+ (set_local $$y$addr$1$i
+ (f64.sub
+ (f64.add
+ (get_local $$mul$i$240)
+ (get_local $$mul80$i$lcssa)
+ )
+ (get_local $$mul80$i$lcssa)
)
)
)
@@ -7000,11 +6955,9 @@
)
(loop $while-out$74 $while-in$75
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$z$2$i)
- (get_local $$a$2$ph$i)
- )
+ (i32.le_u
+ (get_local $$z$2$i)
+ (get_local $$a$2$ph$i)
)
(block
(set_local $$z$2$i$lcssa
@@ -7710,19 +7663,17 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s
- (get_local $$prefix$0$i)
- )
- (i32.const 24)
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s
+ (get_local $$prefix$0$i)
)
(i32.const 24)
)
- (i32.const 45)
+ (i32.const 24)
)
+ (i32.const 45)
)
(block
(set_local $$round377$1$i
@@ -7757,14 +7708,12 @@
)
)
(if
- (i32.eqz
- (f64.ne
- (f64.add
- (get_local $$round377$1$i)
- (get_local $$small$1$i)
- )
+ (f64.eq
+ (f64.add
(get_local $$round377$1$i)
+ (get_local $$small$1$i)
)
+ (get_local $$round377$1$i)
)
(block
(set_local $$a$8$i
@@ -8012,11 +7961,9 @@
)
(loop $while-out$96 $while-in$97
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$z$7$i)
- (get_local $$a$9$ph$i)
- )
+ (i32.le_u
+ (get_local $$z$7$i)
+ (get_local $$a$9$ph$i)
)
(block
(set_local $$cmp450$lcssa$i
@@ -8114,16 +8061,14 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$and483$i
- (i32.and
- (get_local $$fl$1$and219)
- (i32.const 8)
- )
+ (i32.ne
+ (set_local $$and483$i
+ (i32.and
+ (get_local $$fl$1$and219)
+ (i32.const 8)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$and610$pre$phi$iZ2D
@@ -8291,7 +8236,6 @@
(set_local $$t$addr$1$i
(get_local $$t$addr$0$i)
)
- (br $do-once$98)
)
(block
(set_local $$$sub562$i
@@ -8331,7 +8275,6 @@
(set_local $$t$addr$1$i
(get_local $$t$addr$0$i)
)
- (br $do-once$98)
)
)
)
@@ -8591,11 +8534,9 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (get_local $$249)
- (get_local $$add$ptr671$i)
- )
+ (i32.ne
+ (get_local $$249)
+ (get_local $$add$ptr671$i)
)
(block
(set_local $$s668$1$i
@@ -8701,24 +8642,20 @@
)
(block $do-once$114
(if
- (i32.eqz
- (i32.eq
- (get_local $$239)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$239)
+ (i32.const 0)
)
(block
(br_if $do-once$114
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
)
(call $___fwritex
@@ -8984,16 +8921,14 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
(block
(set_local $$s753$2$i
@@ -9145,16 +9080,14 @@
(i32.const 0)
)
(br_if $do-once$106
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
)
(call $___fwritex
@@ -9328,7 +9261,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$24)
)
(set_local $$a$2
(get_local $$incdec$ptr169275)
@@ -10274,19 +10206,17 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (i32.add
- (get_local $$nl_type)
- (i32.shl
- (get_local $$i$3296)
- (i32.const 2)
- )
+ (i32.ne
+ (i32.load
+ (i32.add
+ (get_local $$nl_type)
+ (i32.shl
+ (get_local $$i$3296)
+ (i32.const 2)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -10372,11 +10302,9 @@
)
(block $label$break$L1
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$type)
- (i32.const 20)
- )
+ (i32.le_u
+ (get_local $$type)
+ (i32.const 20)
)
(block $switch$3
(block $switch-default$14
@@ -10440,7 +10368,6 @@
(get_local $$6)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$13
(i32.load
@@ -10499,7 +10426,6 @@
)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$26
(i32.load
@@ -10549,7 +10475,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$39
(i32.load
@@ -10606,7 +10531,6 @@
(get_local $$42)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$53
(i32.load
@@ -10679,7 +10603,6 @@
(get_local $$56)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$67
(i32.load
@@ -10732,7 +10655,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$78
(i32.load
@@ -10805,7 +10727,6 @@
(get_local $$81)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$92
(i32.load
@@ -10858,7 +10779,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$103
(f64.load
@@ -10902,7 +10822,6 @@
(get_local $$103)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$110
(f64.load
@@ -10945,10 +10864,7 @@
(get_local $$arg)
(get_local $$110)
)
- (br $label$break$L1)
- (br $switch$3)
)
- (br $label$break$L1)
)
)
)
@@ -11885,23 +11801,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (set_local $$shr3
- (i32.shr_u
- (set_local $$0
- (i32.load
- (i32.const 176)
- )
+ (i32.ne
+ (i32.and
+ (set_local $$shr3
+ (i32.shr_u
+ (set_local $$0
+ (i32.load
+ (i32.const 176)
)
- (get_local $$shr)
)
+ (get_local $$shr)
)
- (i32.const 3)
)
- (i32.const 0)
+ (i32.const 3)
)
+ (i32.const 0)
)
(block
(set_local $$3
@@ -11945,60 +11859,57 @@
)
)
)
- (block $do-once$2
- (if
- (i32.eq
- (get_local $$arrayidx)
- (get_local $$3)
- )
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $$0)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $$add8)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $$arrayidx)
+ (get_local $$3)
+ )
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $$0)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $$add8)
)
+ (i32.const -1)
)
)
- (block
- (if
- (i32.lt_u
- (get_local $$3)
- (i32.load
- (i32.const 192)
- )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $$3)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $$bk
- (i32.add
- (get_local $$3)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $$bk
+ (i32.add
+ (get_local $$3)
+ (i32.const 12)
)
)
- (get_local $$2)
)
- (block
- (i32.store
- (get_local $$bk)
- (get_local $$arrayidx)
- )
- (i32.store
- (get_local $$1)
- (get_local $$3)
- )
- (br $do-once$2)
+ (get_local $$2)
+ )
+ (block
+ (i32.store
+ (get_local $$bk)
+ (get_local $$arrayidx)
+ )
+ (i32.store
+ (get_local $$1)
+ (get_local $$3)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
@@ -12050,11 +11961,9 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (get_local $$shr3)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$shr3)
+ (i32.const 0)
)
(block
(set_local $$sub
@@ -12204,70 +12113,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.eq
- (get_local $$arrayidx66)
- (get_local $$10)
- )
- (block
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $$0)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $$add64)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $$arrayidx66)
+ (get_local $$10)
+ )
+ (block
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $$0)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $$add64)
)
+ (i32.const -1)
)
)
- (set_local $$13
- (get_local $$7)
- )
)
- (block
- (if
- (i32.lt_u
- (get_local $$10)
- (i32.load
- (i32.const 192)
- )
+ (set_local $$13
+ (get_local $$7)
+ )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $$10)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $$bk78
- (i32.add
- (get_local $$10)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $$bk78
+ (i32.add
+ (get_local $$10)
+ (i32.const 12)
)
)
- (get_local $$9)
)
- (block
- (i32.store
- (get_local $$bk78)
- (get_local $$arrayidx66)
- )
- (i32.store
- (get_local $$8)
- (get_local $$10)
- )
- (set_local $$13
- (i32.load
- (i32.const 184)
- )
+ (get_local $$9)
+ )
+ (block
+ (i32.store
+ (get_local $$bk78)
+ (get_local $$arrayidx66)
+ )
+ (i32.store
+ (get_local $$8)
+ (get_local $$10)
+ )
+ (set_local $$13
+ (i32.load
+ (i32.const 184)
)
- (br $do-once$4)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
@@ -12306,11 +12212,9 @@
(get_local $$sub91)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$13)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$13)
+ (i32.const 0)
)
(block
(set_local $$14
@@ -12643,14 +12547,12 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$v$0$i$lcssa)
- (set_local $$add$ptr$i
- (i32.add
- (get_local $$v$0$i$lcssa)
- (get_local $$cond)
- )
+ (i32.ge_u
+ (get_local $$v$0$i$lcssa)
+ (set_local $$add$ptr$i
+ (i32.add
+ (get_local $$v$0$i$lcssa)
+ (get_local $$cond)
)
)
)
@@ -12726,20 +12628,18 @@
)
(loop $while-out$10 $while-in$11
(if
- (i32.eqz
- (i32.eq
- (set_local $$33
- (i32.load
- (set_local $$arrayidx71$i
- (i32.add
- (get_local $$R$1$i)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$33
+ (i32.load
+ (set_local $$arrayidx71$i
+ (i32.add
+ (get_local $$R$1$i)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i
@@ -12799,7 +12699,6 @@
(set_local $$R$3$i
(get_local $$R$1$i$lcssa)
)
- (br $do-once$8)
)
)
)
@@ -12816,18 +12715,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk47$i
- (i32.add
- (get_local $$28)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk47$i
+ (i32.add
+ (get_local $$28)
+ (i32.const 12)
)
)
- (get_local $$v$0$i$lcssa)
)
+ (get_local $$v$0$i$lcssa)
)
(call_import $_abort)
)
@@ -12855,7 +12752,6 @@
(set_local $$R$3$i
(get_local $$27)
)
- (br $do-once$8)
)
(call_import $_abort)
)
@@ -12864,11 +12760,9 @@
)
(block $do-once$12
(if
- (i32.eqz
- (i32.eq
- (get_local $$26)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$26)
+ (i32.const 0)
)
(block
(if
@@ -12974,48 +12868,41 @@
(get_local $$R$3$i)
(get_local $$26)
)
- (block $do-once$14
- (if
- (i32.eqz
- (i32.eq
- (set_local $$41
- (i32.load offset=16
- (get_local $$v$0$i$lcssa)
- )
- )
- (i32.const 0)
+ (if
+ (i32.ne
+ (set_local $$41
+ (i32.load offset=16
+ (get_local $$v$0$i$lcssa)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$41)
+ (get_local $$40)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i)
(get_local $$41)
- (get_local $$40)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i)
- (get_local $$41)
- )
- (i32.store offset=24
- (get_local $$41)
- (get_local $$R$3$i)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $$41)
+ (get_local $$R$3$i)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$42
- (i32.load offset=20
- (get_local $$v$0$i$lcssa)
- )
+ (i32.ne
+ (set_local $$42
+ (i32.load offset=20
+ (get_local $$v$0$i$lcssa)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -13034,7 +12921,6 @@
(get_local $$42)
(get_local $$R$3$i)
)
- (br $do-once$12)
)
)
)
@@ -13103,15 +12989,13 @@
(get_local $$rsize$0$i$lcssa)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$45
- (i32.load
- (i32.const 184)
- )
+ (i32.ne
+ (set_local $$45
+ (i32.load
+ (i32.const 184)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$46
@@ -13823,15 +13707,13 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$59
- (i32.load offset=16
- (get_local $$t$48$i)
- )
+ (i32.ne
+ (set_local $$59
+ (i32.load offset=16
+ (get_local $$t$48$i)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$rsize$49$i
@@ -13916,14 +13798,12 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$v$4$lcssa$i)
- (set_local $$add$ptr$i$161
- (i32.add
- (get_local $$v$4$lcssa$i)
- (get_local $$and145)
- )
+ (i32.ge_u
+ (get_local $$v$4$lcssa$i)
+ (set_local $$add$ptr$i$161
+ (i32.add
+ (get_local $$v$4$lcssa$i)
+ (get_local $$and145)
)
)
)
@@ -13999,20 +13879,18 @@
)
(loop $while-out$23 $while-in$24
(if
- (i32.eqz
- (i32.eq
- (set_local $$70
- (i32.load
- (set_local $$arrayidx161$i
- (i32.add
- (get_local $$R$1$i$168)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$70
+ (i32.load
+ (set_local $$arrayidx161$i
+ (i32.add
+ (get_local $$R$1$i$168)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i$168
@@ -14072,7 +13950,6 @@
(set_local $$R$3$i$171
(get_local $$R$1$i$168$lcssa)
)
- (br $do-once$21)
)
)
)
@@ -14089,18 +13966,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk136$i
- (i32.add
- (get_local $$65)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk136$i
+ (i32.add
+ (get_local $$65)
+ (i32.const 12)
)
)
- (get_local $$v$4$lcssa$i)
)
+ (get_local $$v$4$lcssa$i)
)
(call_import $_abort)
)
@@ -14128,7 +14003,6 @@
(set_local $$R$3$i$171
(get_local $$64)
)
- (br $do-once$21)
)
(call_import $_abort)
)
@@ -14137,11 +14011,9 @@
)
(block $do-once$25
(if
- (i32.eqz
- (i32.eq
- (get_local $$63)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$63)
+ (i32.const 0)
)
(block
(if
@@ -14247,48 +14119,41 @@
(get_local $$R$3$i$171)
(get_local $$63)
)
- (block $do-once$27
- (if
- (i32.eqz
- (i32.eq
- (set_local $$78
- (i32.load offset=16
- (get_local $$v$4$lcssa$i)
- )
- )
- (i32.const 0)
+ (if
+ (i32.ne
+ (set_local $$78
+ (i32.load offset=16
+ (get_local $$v$4$lcssa$i)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$78)
+ (get_local $$77)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i$171)
(get_local $$78)
- (get_local $$77)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i$171)
- (get_local $$78)
- )
- (i32.store offset=24
- (get_local $$78)
- (get_local $$R$3$i$171)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $$78)
+ (get_local $$R$3$i$171)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$79
- (i32.load offset=20
- (get_local $$v$4$lcssa$i)
- )
+ (i32.ne
+ (set_local $$79
+ (i32.load offset=20
+ (get_local $$v$4$lcssa$i)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -14307,7 +14172,6 @@
(get_local $$79)
(get_local $$R$3$i$171)
)
- (br $do-once$25)
)
)
)
@@ -14796,7 +14660,6 @@
(get_local $$add$ptr$i$161)
(get_local $$add$ptr$i$161)
)
- (br $do-once$29)
)
)
(if
@@ -14849,7 +14712,6 @@
(get_local $$add$ptr$i$161)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $_abort)
)
@@ -14877,15 +14739,13 @@
)
)
(if
- (i32.eqz
- (i32.lt_u
- (set_local $$94
- (i32.load
- (i32.const 184)
- )
+ (i32.ge_u
+ (set_local $$94
+ (i32.load
+ (i32.const 184)
)
- (get_local $$nb$0)
)
+ (get_local $$nb$0)
)
(block
(set_local $$95
@@ -15039,70 +14899,67 @@
)
)
)
- (block $do-once$33
+ (if
+ (i32.eq
+ (i32.load
+ (i32.const 648)
+ )
+ (i32.const 0)
+ )
(if
(i32.eq
- (i32.load
- (i32.const 648)
- )
- (i32.const 0)
- )
- (if
- (i32.eq
- (i32.and
- (i32.add
- (set_local $$call$i$i
- (call_import $_sysconf
- (i32.const 30)
- )
+ (i32.and
+ (i32.add
+ (set_local $$call$i$i
+ (call_import $_sysconf
+ (i32.const 30)
)
- (i32.const -1)
)
- (get_local $$call$i$i)
+ (i32.const -1)
)
+ (get_local $$call$i$i)
+ )
+ (i32.const 0)
+ )
+ (block
+ (i32.store
+ (i32.const 656)
+ (get_local $$call$i$i)
+ )
+ (i32.store
+ (i32.const 652)
+ (get_local $$call$i$i)
+ )
+ (i32.store
+ (i32.const 660)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 664)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 668)
(i32.const 0)
)
- (block
- (i32.store
- (i32.const 656)
- (get_local $$call$i$i)
- )
- (i32.store
- (i32.const 652)
- (get_local $$call$i$i)
- )
- (i32.store
- (i32.const 660)
- (i32.const -1)
- )
- (i32.store
- (i32.const 664)
- (i32.const -1)
- )
- (i32.store
- (i32.const 668)
- (i32.const 0)
- )
- (i32.store
- (i32.const 620)
- (i32.const 0)
- )
- (i32.store
- (i32.const 648)
- (i32.xor
- (i32.and
- (call_import $_time
- (i32.const 0)
- )
- (i32.const -16)
+ (i32.store
+ (i32.const 620)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 648)
+ (i32.xor
+ (i32.and
+ (call_import $_time
+ (i32.const 0)
)
- (i32.const 1431655768)
+ (i32.const -16)
)
+ (i32.const 1431655768)
)
- (br $do-once$33)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
(set_local $$add$i$180
@@ -15112,50 +14969,46 @@
)
)
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$and11$i
- (i32.and
- (set_local $$add9$i
- (i32.add
- (set_local $$100
- (i32.load
- (i32.const 656)
- )
+ (i32.le_u
+ (set_local $$and11$i
+ (i32.and
+ (set_local $$add9$i
+ (i32.add
+ (set_local $$100
+ (i32.load
+ (i32.const 656)
)
- (set_local $$sub$i$181
- (i32.add
- (get_local $$nb$0)
- (i32.const 47)
- )
+ )
+ (set_local $$sub$i$181
+ (i32.add
+ (get_local $$nb$0)
+ (i32.const 47)
)
)
)
- (set_local $$neg$i$182
- (i32.sub
- (i32.const 0)
- (get_local $$100)
- )
+ )
+ (set_local $$neg$i$182
+ (i32.sub
+ (i32.const 0)
+ (get_local $$100)
)
)
)
- (get_local $$nb$0)
)
+ (get_local $$nb$0)
)
(return
(i32.const 0)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$101
- (i32.load
- (i32.const 616)
- )
+ (i32.ne
+ (set_local $$101
+ (i32.load
+ (i32.const 616)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.or
@@ -15213,15 +15066,13 @@
)
(loop $while-out$37 $while-in$38
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$105
- (i32.load
- (get_local $$sp$0$i$i)
- )
+ (i32.le_u
+ (set_local $$105
+ (i32.load
+ (get_local $$sp$0$i$i)
)
- (get_local $$104)
)
+ (get_local $$104)
)
(if
(i32.gt_u
@@ -15302,11 +15153,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$call83$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$call83$i)
+ (i32.const -1)
)
(block
(set_local $$tbase$796$i
@@ -15344,15 +15193,13 @@
(i32.const 173)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$call37$i
- (call_import $_sbrk
- (i32.const 0)
- )
+ (i32.ne
+ (set_local $$call37$i
+ (call_import $_sbrk
+ (i32.const 0)
)
- (i32.const -1)
)
+ (i32.const -1)
)
(block
(if
@@ -15419,15 +15266,13 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (set_local $$111
- (i32.load
- (i32.const 616)
- )
+ (i32.ne
+ (set_local $$111
+ (i32.load
+ (i32.const 616)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(br_if $do-once$39
(i32.or
@@ -15494,85 +15339,78 @@
(get_local $$ssize$2$ph$i)
)
)
- (block $do-once$42
- (if
+ (if
+ (i32.and
+ (i32.gt_u
+ (get_local $$add$i$180)
+ (get_local $$ssize$2$ph$i)
+ )
(i32.and
- (i32.gt_u
- (get_local $$add$i$180)
+ (i32.lt_u
(get_local $$ssize$2$ph$i)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $$ssize$2$ph$i)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $$br$2$ph$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$br$2$ph$i)
+ (i32.const -1)
)
)
- (if
- (i32.lt_u
- (set_local $$and104$i
- (i32.and
- (i32.add
- (i32.sub
- (get_local $$sub$i$181)
- (get_local $$ssize$2$ph$i)
- )
- (set_local $$115
- (i32.load
- (i32.const 656)
- )
- )
- )
+ )
+ (if
+ (i32.lt_u
+ (set_local $$and104$i
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $$115)
+ (get_local $$sub$i$181)
+ (get_local $$ssize$2$ph$i)
+ )
+ (set_local $$115
+ (i32.load
+ (i32.const 656)
+ )
)
)
- )
- (i32.const 2147483647)
- )
- (if
- (i32.eq
- (call_import $_sbrk
- (get_local $$and104$i)
+ (i32.sub
+ (i32.const 0)
+ (get_local $$115)
)
- (i32.const -1)
)
- (block
- (call_import $_sbrk
- (get_local $$sub112$i)
- )
- (br $label$break$L279)
+ )
+ (i32.const 2147483647)
+ )
+ (if
+ (i32.eq
+ (call_import $_sbrk
+ (get_local $$and104$i)
)
- (block
- (set_local $$ssize$5$i
- (i32.add
- (get_local $$and104$i)
- (get_local $$ssize$2$ph$i)
- )
- )
- (br $do-once$42)
+ (i32.const -1)
+ )
+ (block
+ (call_import $_sbrk
+ (get_local $$sub112$i)
)
+ (br $label$break$L279)
)
(set_local $$ssize$5$i
- (get_local $$ssize$2$ph$i)
+ (i32.add
+ (get_local $$and104$i)
+ (get_local $$ssize$2$ph$i)
+ )
)
)
(set_local $$ssize$5$i
(get_local $$ssize$2$ph$i)
)
)
+ (set_local $$ssize$5$i
+ (get_local $$ssize$2$ph$i)
+ )
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$br$2$ph$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$br$2$ph$i)
+ (i32.const -1)
)
(block
(set_local $$tbase$796$i
@@ -16362,23 +16200,21 @@
)
(block $do-once$55
(if
- (i32.eqz
- (i32.eq
- (set_local $$148
- (i32.load offset=8
- (get_local $$add$ptr16$i$i)
- )
+ (i32.ne
+ (set_local $$148
+ (i32.load offset=8
+ (get_local $$add$ptr16$i$i)
)
- (set_local $$arrayidx$i$48$i
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx$i$48$i
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr$i$45$i)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr$i$45$i)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -16550,20 +16386,18 @@
)
(loop $while-out$61 $while-in$62
(if
- (i32.eqz
- (i32.eq
- (set_local $$161
- (i32.load
- (set_local $$arrayidx103$i$i
- (i32.add
- (get_local $$R$1$i$i)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$161
+ (i32.load
+ (set_local $$arrayidx103$i$i
+ (i32.add
+ (get_local $$R$1$i$i)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i$i
@@ -16623,7 +16457,6 @@
(set_local $$R$3$i$i
(get_local $$R$1$i$i$lcssa)
)
- (br $do-once$59)
)
)
)
@@ -16640,18 +16473,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk82$i$i
- (i32.add
- (get_local $$156)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk82$i$i
+ (i32.add
+ (get_local $$156)
+ (i32.const 12)
)
)
- (get_local $$add$ptr16$i$i)
)
+ (get_local $$add$ptr16$i$i)
)
(call_import $_abort)
)
@@ -16679,7 +16510,6 @@
(set_local $$R$3$i$i
(get_local $$155)
)
- (br $do-once$59)
)
(call_import $_abort)
)
@@ -16718,11 +16548,9 @@
(get_local $$R$3$i$i)
)
(br_if $do-once$63
- (i32.eqz
- (i32.eq
- (get_local $$R$3$i$i)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$R$3$i$i)
+ (i32.const 0)
)
)
(i32.store
@@ -16797,39 +16625,34 @@
(get_local $$R$3$i$i)
(get_local $$154)
)
- (block $do-once$65
- (if
- (i32.eqz
- (i32.eq
- (set_local $$169
- (i32.load
- (set_local $$child166$i$i
- (i32.add
- (get_local $$add$ptr16$i$i)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$169
+ (i32.load
+ (set_local $$child166$i$i
+ (i32.add
+ (get_local $$add$ptr16$i$i)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$169)
+ (get_local $$168)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i$i)
(get_local $$169)
- (get_local $$168)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i$i)
- (get_local $$169)
- )
- (i32.store offset=24
- (get_local $$169)
- (get_local $$R$3$i$i)
- )
- (br $do-once$65)
+ (i32.store offset=24
+ (get_local $$169)
+ (get_local $$R$3$i$i)
)
)
)
@@ -16861,7 +16684,6 @@
(get_local $$170)
(get_local $$R$3$i$i)
)
- (br $label$break$L331)
)
)
)
@@ -16982,21 +16804,19 @@
)
(block
(if
- (i32.eqz
- (i32.lt_u
- (set_local $$175
- (i32.load
- (set_local $$174
- (i32.add
- (get_local $$arrayidx223$i$i)
- (i32.const 8)
- )
+ (i32.ge_u
+ (set_local $$175
+ (i32.load
+ (set_local $$174
+ (i32.add
+ (get_local $$arrayidx223$i$i)
+ (i32.const 8)
)
)
)
- (i32.load
- (i32.const 192)
- )
+ )
+ (i32.load
+ (i32.const 192)
)
)
(block
@@ -17352,7 +17172,6 @@
(get_local $$add$ptr17$i$i)
(get_local $$add$ptr17$i$i)
)
- (br $do-once$52)
)
)
(if
@@ -17405,7 +17224,6 @@
(get_local $$add$ptr17$i$i)
(i32.const 0)
)
- (br $do-once$52)
)
(call_import $_abort)
)
@@ -17428,15 +17246,13 @@
)
(loop $while-out$73 $while-in$74
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$185
- (i32.load
- (get_local $$sp$0$i$i$i)
- )
+ (i32.le_u
+ (set_local $$185
+ (i32.load
+ (get_local $$sp$0$i$i$i)
)
- (get_local $$119)
)
+ (get_local $$119)
)
(if
(i32.gt_u
@@ -17683,11 +17499,9 @@
(br $while-in$76)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond13$i$i)
- (get_local $$119)
- )
+ (i32.ne
+ (get_local $$cond13$i$i)
+ (get_local $$119)
)
(block
(i32.store
@@ -18130,7 +17944,6 @@
(get_local $$119)
(get_local $$119)
)
- (br $do-once$44)
)
)
(if
@@ -18183,7 +17996,6 @@
(get_local $$119)
(i32.const 0)
)
- (br $do-once$44)
)
(call_import $_abort)
)
@@ -18488,23 +18300,21 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (set_local $$27
- (i32.load
- (set_local $$head209
- (i32.add
- (get_local $$add$ptr6)
- (i32.const 4)
- )
+ (i32.ne
+ (i32.and
+ (set_local $$27
+ (i32.load
+ (set_local $$head209
+ (i32.add
+ (get_local $$add$ptr6)
+ (i32.const 4)
)
)
)
- (i32.const 3)
)
(i32.const 3)
)
+ (i32.const 3)
)
(block
(set_local $$p$1
@@ -18562,23 +18372,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$4
- (i32.load offset=8
- (get_local $$add$ptr16)
- )
+ (i32.ne
+ (set_local $$4
+ (i32.load offset=8
+ (get_local $$add$ptr16)
)
- (set_local $$arrayidx
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -18592,13 +18400,11 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load offset=12
- (get_local $$4)
- )
- (get_local $$add$ptr16)
+ (i32.ne
+ (i32.load offset=12
+ (get_local $$4)
)
+ (get_local $$add$ptr16)
)
(call_import $_abort)
)
@@ -18759,20 +18565,18 @@
)
(loop $while-out$4 $while-in$5
(if
- (i32.eqz
- (i32.eq
- (set_local $$16
- (i32.load
- (set_local $$arrayidx108
- (i32.add
- (get_local $$R$1)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$16
+ (i32.load
+ (set_local $$arrayidx108
+ (i32.add
+ (get_local $$R$1)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1
@@ -18832,7 +18636,6 @@
(set_local $$R$3
(get_local $$R$1$lcssa)
)
- (br $do-once$2)
)
)
)
@@ -18849,18 +18652,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk82
- (i32.add
- (get_local $$11)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk82
+ (i32.add
+ (get_local $$11)
+ (i32.const 12)
)
)
- (get_local $$add$ptr16)
)
+ (get_local $$add$ptr16)
)
(call_import $_abort)
)
@@ -18888,7 +18689,6 @@
(set_local $$R$3
(get_local $$10)
)
- (br $do-once$2)
)
(call_import $_abort)
)
@@ -19027,39 +18827,34 @@
(get_local $$R$3)
(get_local $$9)
)
- (block $do-once$6
- (if
- (i32.eqz
- (i32.eq
- (set_local $$24
- (i32.load
- (set_local $$child171
- (i32.add
- (get_local $$add$ptr16)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$24
+ (i32.load
+ (set_local $$child171
+ (i32.add
+ (get_local $$add$ptr16)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$24)
+ (get_local $$23)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3)
(get_local $$24)
- (get_local $$23)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3)
- (get_local $$24)
- )
- (i32.store offset=24
- (get_local $$24)
- (get_local $$R$3)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $$24)
+ (get_local $$R$3)
)
)
)
@@ -19104,7 +18899,6 @@
(set_local $$psize$1
(get_local $$add17)
)
- (br $do-once$0)
)
)
)
@@ -19122,11 +18916,9 @@
)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$p$1)
- (get_local $$add$ptr6)
- )
+ (i32.ge_u
+ (get_local $$p$1)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19189,12 +18981,10 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$p$1)
- (i32.load
- (i32.const 196)
- )
+ (i32.ne
+ (get_local $$p$1)
+ (i32.load
+ (i32.const 196)
)
)
(return)
@@ -19278,23 +19068,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$34
- (i32.load offset=8
- (get_local $$add$ptr6)
- )
+ (i32.ne
+ (set_local $$34
+ (i32.load offset=8
+ (get_local $$add$ptr6)
)
- (set_local $$arrayidx279
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx279
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr268)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr268)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -19310,13 +19098,11 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load offset=12
- (get_local $$34)
- )
- (get_local $$add$ptr6)
+ (i32.ne
+ (i32.load offset=12
+ (get_local $$34)
)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19466,20 +19252,18 @@
)
(loop $while-out$12 $while-in$13
(if
- (i32.eqz
- (i32.eq
- (set_local $$49
- (i32.load
- (set_local $$arrayidx374
- (i32.add
- (get_local $$R332$1)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$49
+ (i32.load
+ (set_local $$arrayidx374
+ (i32.add
+ (get_local $$R332$1)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R332$1
@@ -19541,7 +19325,6 @@
(set_local $$R332$3
(get_local $$R332$1$lcssa)
)
- (br $do-once$10)
)
)
)
@@ -19560,18 +19343,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk343
- (i32.add
- (get_local $$43)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk343
+ (i32.add
+ (get_local $$43)
+ (i32.const 12)
)
)
- (get_local $$add$ptr6)
)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19599,7 +19380,6 @@
(set_local $$R332$3
(get_local $$42)
)
- (br $do-once$10)
)
(call_import $_abort)
)
@@ -19607,11 +19387,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$41)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$41)
+ (i32.const 0)
)
(block
(if
@@ -19717,53 +19495,46 @@
(get_local $$R332$3)
(get_local $$41)
)
- (block $do-once$14
- (if
- (i32.eqz
- (i32.eq
- (set_local $$58
- (i32.load
- (set_local $$child443
- (i32.add
- (get_local $$add$ptr6)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$58
+ (i32.load
+ (set_local $$child443
+ (i32.add
+ (get_local $$add$ptr6)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$58)
+ (get_local $$57)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R332$3)
(get_local $$58)
- (get_local $$57)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R332$3)
- (get_local $$58)
- )
- (i32.store offset=24
- (get_local $$58)
- (get_local $$R332$3)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $$58)
+ (get_local $$R332$3)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$59
- (i32.load offset=4
- (get_local $$child443)
- )
+ (i32.ne
+ (set_local $$59
+ (i32.load offset=4
+ (get_local $$child443)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -19782,7 +19553,6 @@
(get_local $$59)
(get_local $$R332$3)
)
- (br $do-once$8)
)
)
)
@@ -20086,243 +19856,239 @@
(get_local $$p$1)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.eq
- (i32.and
- (set_local $$66
- (i32.load
- (i32.const 180)
- )
- )
- (set_local $$shl573
- (i32.shl
- (i32.const 1)
- (get_local $$I534$0)
- )
+ (if
+ (i32.eq
+ (i32.and
+ (set_local $$66
+ (i32.load
+ (i32.const 180)
)
)
- (i32.const 0)
- )
- (block
- (i32.store
- (i32.const 180)
- (i32.or
- (get_local $$66)
- (get_local $$shl573)
+ (set_local $$shl573
+ (i32.shl
+ (i32.const 1)
+ (get_local $$I534$0)
)
)
- (i32.store
- (get_local $$arrayidx567)
- (get_local $$p$1)
+ )
+ (i32.const 0)
+ )
+ (block
+ (i32.store
+ (i32.const 180)
+ (i32.or
+ (get_local $$66)
+ (get_local $$shl573)
)
- (i32.store offset=24
- (get_local $$p$1)
+ )
+ (i32.store
+ (get_local $$arrayidx567)
+ (get_local $$p$1)
+ )
+ (i32.store offset=24
+ (get_local $$p$1)
+ (get_local $$arrayidx567)
+ )
+ (i32.store offset=12
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ (i32.store offset=8
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ )
+ (block
+ (set_local $$67
+ (i32.load
(get_local $$arrayidx567)
)
- (i32.store offset=12
- (get_local $$p$1)
- (get_local $$p$1)
- )
- (i32.store offset=8
- (get_local $$p$1)
- (get_local $$p$1)
+ )
+ (set_local $$sub589
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
+ (get_local $$I534$0)
+ (i32.const 1)
+ )
)
)
- (block
- (set_local $$67
- (i32.load
- (get_local $$arrayidx567)
+ (set_local $$cond
+ (if
+ (i32.eq
+ (get_local $$I534$0)
+ (i32.const 31)
)
+ (i32.const 0)
+ (get_local $$sub589)
)
- (set_local $$sub589
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $$I534$0)
- (i32.const 1)
+ )
+ (set_local $$K583$0
+ (i32.shl
+ (get_local $$psize$2)
+ (get_local $$cond)
+ )
+ )
+ (set_local $$T$0
+ (get_local $$67)
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
+ (get_local $$T$0)
+ )
+ (i32.const -8)
)
+ (get_local $$psize$2)
)
- )
- (set_local $$cond
- (if
- (i32.eq
- (get_local $$I534$0)
- (i32.const 31)
+ (block
+ (set_local $$T$0$lcssa
+ (get_local $$T$0)
)
- (i32.const 0)
- (get_local $$sub589)
+ (set_local $label
+ (i32.const 130)
+ )
+ (br $while-out$18)
)
)
- (set_local $$K583$0
+ (set_local $$shl600
(i32.shl
- (get_local $$psize$2)
- (get_local $$cond)
+ (get_local $$K583$0)
+ (i32.const 1)
)
)
- (set_local $$T$0
- (get_local $$67)
- )
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $$T$0)
+ (if
+ (i32.eq
+ (set_local $$69
+ (i32.load
+ (set_local $$arrayidx599
+ (i32.add
+ (i32.add
+ (get_local $$T$0)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $$K583$0)
+ (i32.const 31)
+ )
+ (i32.const 2)
+ )
+ )
)
- (i32.const -8)
)
- (get_local $$psize$2)
)
- (block
- (set_local $$T$0$lcssa
- (get_local $$T$0)
- )
- (set_local $label
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const 0)
+ )
+ (block
+ (set_local $$T$0$lcssa319
+ (get_local $$T$0)
)
+ (set_local $$arrayidx599$lcssa
+ (get_local $$arrayidx599)
+ )
+ (set_local $label
+ (i32.const 127)
+ )
+ (br $while-out$18)
)
- (set_local $$shl600
- (i32.shl
- (get_local $$K583$0)
- (i32.const 1)
+ (block
+ (set_local $$K583$0
+ (get_local $$shl600)
+ )
+ (set_local $$T$0
+ (get_local $$69)
)
)
- (if
- (i32.eq
- (set_local $$69
- (i32.load
- (set_local $$arrayidx599
- (i32.add
- (i32.add
- (get_local $$T$0)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $$K583$0)
- (i32.const 31)
- )
- (i32.const 2)
- )
- )
- )
- )
- )
- (i32.const 0)
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$arrayidx599$lcssa)
+ (i32.load
+ (i32.const 192)
)
- (block
- (set_local $$T$0$lcssa319
- (get_local $$T$0)
- )
- (set_local $$arrayidx599$lcssa
- (get_local $$arrayidx599)
- )
- (set_local $label
- (i32.const 127)
- )
- (br $while-out$18)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (get_local $$arrayidx599$lcssa)
+ (get_local $$p$1)
)
- (block
- (set_local $$K583$0
- (get_local $$shl600)
- )
- (set_local $$T$0
- (get_local $$69)
- )
+ (i32.store offset=24
+ (get_local $$p$1)
+ (get_local $$T$0$lcssa319)
+ )
+ (i32.store offset=12
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ (i32.store offset=8
+ (get_local $$p$1)
+ (get_local $$p$1)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $label)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $$arrayidx599$lcssa)
- (i32.load
- (i32.const 192)
+ (i32.and
+ (i32.ge_u
+ (set_local $$71
+ (i32.load
+ (set_local $$fd620
+ (i32.add
+ (get_local $$T$0$lcssa)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $$72
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $$T$0$lcssa)
+ (get_local $$72)
)
)
- (call_import $_abort)
(block
+ (i32.store offset=12
+ (get_local $$71)
+ (get_local $$p$1)
+ )
(i32.store
- (get_local $$arrayidx599$lcssa)
+ (get_local $$fd620)
(get_local $$p$1)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $$p$1)
- (get_local $$T$0$lcssa319)
+ (get_local $$71)
)
(i32.store offset=12
(get_local $$p$1)
- (get_local $$p$1)
+ (get_local $$T$0$lcssa)
)
- (i32.store offset=8
- (get_local $$p$1)
+ (i32.store offset=24
(get_local $$p$1)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $label)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $$71
- (i32.load
- (set_local $$fd620
- (i32.add
- (get_local $$T$0$lcssa)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $$72
- (i32.load
- (i32.const 192)
- )
- )
- )
- (i32.ge_u
- (get_local $$T$0$lcssa)
- (get_local $$72)
- )
- )
- (block
- (i32.store offset=12
- (get_local $$71)
- (get_local $$p$1)
- )
- (i32.store
- (get_local $$fd620)
- (get_local $$p$1)
- )
- (i32.store offset=8
- (get_local $$p$1)
- (get_local $$71)
- )
- (i32.store offset=12
- (get_local $$p$1)
- (get_local $$T$0$lcssa)
- )
- (i32.store offset=24
- (get_local $$p$1)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index 71a0412b7..4ada9b367 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -764,14 +764,12 @@
(get_local $$tio)
)
(if
- (i32.eqz
- (i32.eq
- (call_import $___syscall54
- (i32.const 54)
- (get_local $$vararg_buffer)
- )
- (i32.const 0)
+ (i32.ne
+ (call_import $___syscall54
+ (i32.const 54)
+ (get_local $$vararg_buffer)
)
+ (i32.const 0)
)
(i32.store8 offset=75
(get_local $$f)
@@ -988,11 +986,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond19)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$cond19)
+ (i32.const 0)
)
(call $___unlockfile
(get_local $$f$addr$022)
@@ -1035,13 +1031,11 @@
)
(block
(if
- (i32.eqz
- (i32.gt_s
- (i32.load offset=76
- (get_local $$f)
- )
- (i32.const -1)
+ (i32.le_s
+ (i32.load offset=76
+ (get_local $$f)
)
+ (i32.const -1)
)
(block
(set_local $$retval$0
@@ -1916,11 +1910,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$cond)
+ (i32.const 0)
)
(call $___unlockfile
(get_local $$f)
@@ -2524,7 +2516,6 @@
(set_local $$retval$0
(i32.const 4)
)
- (br $do-once$0)
)
(block
(i32.store
@@ -2534,7 +2525,6 @@
(set_local $$retval$0
(i32.const -1)
)
- (br $do-once$0)
)
)
)
@@ -2844,20 +2834,18 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.xor
- (i32.and
- (get_local $$xor)
- (i32.const -2139062144)
- )
+ (i32.ne
+ (i32.and
+ (i32.xor
+ (i32.and
+ (get_local $$xor)
(i32.const -2139062144)
)
- (get_local $$sub)
+ (i32.const -2139062144)
)
- (i32.const 0)
+ (get_local $$sub)
)
+ (i32.const 0)
)
(block
(set_local $$n$addr$133$lcssa
@@ -3857,44 +3845,38 @@
(i32.const 0)
)
(loop $label$break$L1 $label$continue$L1
- (block $do-once$0
+ (if
+ (i32.gt_s
+ (get_local $$cnt$0)
+ (i32.const -1)
+ )
(if
(i32.gt_s
- (get_local $$cnt$0)
- (i32.const -1)
- )
- (if
- (i32.gt_s
- (get_local $$l$0)
- (i32.sub
- (i32.const 2147483647)
- (get_local $$cnt$0)
- )
+ (get_local $$l$0)
+ (i32.sub
+ (i32.const 2147483647)
+ (get_local $$cnt$0)
)
- (block
- (i32.store
- (call $___errno_location)
- (i32.const 75)
- )
- (set_local $$cnt$1
- (i32.const -1)
- )
- (br $do-once$0)
+ )
+ (block
+ (i32.store
+ (call $___errno_location)
+ (i32.const 75)
)
- (block
- (set_local $$cnt$1
- (i32.add
- (get_local $$l$0)
- (get_local $$cnt$0)
- )
- )
- (br $do-once$0)
+ (set_local $$cnt$1
+ (i32.const -1)
)
)
(set_local $$cnt$1
- (get_local $$cnt$0)
+ (i32.add
+ (get_local $$l$0)
+ (get_local $$cnt$0)
+ )
)
)
+ (set_local $$cnt$1
+ (get_local $$cnt$0)
+ )
)
(if
(i32.eq
@@ -3961,7 +3943,6 @@
(i32.const 9)
)
(br $label$break$L9)
- (br $switch$2)
)
(set_local $$incdec$ptr169276$lcssa
(get_local $$incdec$ptr169274)
@@ -3970,7 +3951,6 @@
(get_local $$incdec$ptr169274)
)
(br $label$break$L9)
- (br $switch$2)
)
)
)
@@ -4000,19 +3980,17 @@
(i32.const 0)
)
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s offset=1
- (get_local $$incdec$ptr169276301)
- )
- (i32.const 24)
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s offset=1
+ (get_local $$incdec$ptr169276301)
)
(i32.const 24)
)
- (i32.const 37)
+ (i32.const 24)
)
+ (i32.const 37)
)
(block
(set_local $$incdec$ptr169276$lcssa
@@ -4099,11 +4077,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$z$0$lcssa)
- (get_local $$incdec$ptr169275)
- )
+ (i32.ne
+ (get_local $$z$0$lcssa)
+ (get_local $$incdec$ptr169275)
)
(block
(set_local $$cnt$0
@@ -4479,11 +4455,9 @@
(i32.const 0)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$l10n$1)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$l10n$1)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -4743,26 +4717,24 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (set_local $$32
- (i32.load8_s
- (set_local $$arrayidx114
- (i32.add
- (get_local $$incdec$ptr169269)
- (i32.const 1)
- )
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (set_local $$32
+ (i32.load8_s
+ (set_local $$arrayidx114
+ (i32.add
+ (get_local $$incdec$ptr169269)
+ (i32.const 1)
)
)
)
- (i32.const 24)
)
(i32.const 24)
)
- (i32.const 42)
+ (i32.const 24)
)
+ (i32.const 42)
)
(block
(if
@@ -4948,11 +4920,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$l10n$3)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$l10n$3)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -5392,7 +5362,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(i32.load
@@ -5413,7 +5382,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(set_local $$76
@@ -5449,7 +5417,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store16
(i32.load
@@ -5473,7 +5440,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store8
(i32.load
@@ -5497,7 +5463,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(i32.load
@@ -5518,7 +5483,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(i32.store
(set_local $$86
@@ -5554,7 +5518,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$25)
)
(set_local $$cnt$0
(get_local $$cnt$1)
@@ -6249,107 +6212,99 @@
(i32.const 2)
)
)
- (block $do-once$58
- (if
- (i32.or
- (i32.gt_u
- (get_local $$p$0)
- (i32.const 11)
- )
- (i32.eq
- (set_local $$sub74$i
- (i32.sub
- (i32.const 12)
- (get_local $$p$0)
- )
+ (if
+ (i32.or
+ (i32.gt_u
+ (get_local $$p$0)
+ (i32.const 11)
+ )
+ (i32.eq
+ (set_local $$sub74$i
+ (i32.sub
+ (i32.const 12)
+ (get_local $$p$0)
)
- (i32.const 0)
)
+ (i32.const 0)
)
- (set_local $$y$addr$1$i
- (get_local $$mul$i$240)
+ )
+ (set_local $$y$addr$1$i
+ (get_local $$mul$i$240)
+ )
+ (block
+ (set_local $$re$1482$i
+ (get_local $$sub74$i)
)
- (block
- (set_local $$re$1482$i
- (get_local $$sub74$i)
- )
- (set_local $$round$0481$i
- (f64.const 8)
+ (set_local $$round$0481$i
+ (f64.const 8)
+ )
+ (loop $while-out$60 $while-in$61
+ (set_local $$mul80$i
+ (f64.mul
+ (get_local $$round$0481$i)
+ (f64.const 16)
+ )
)
- (loop $while-out$60 $while-in$61
- (set_local $$mul80$i
- (f64.mul
- (get_local $$round$0481$i)
- (f64.const 16)
+ (if
+ (i32.eq
+ (set_local $$dec78$i
+ (i32.add
+ (get_local $$re$1482$i)
+ (i32.const -1)
+ )
)
+ (i32.const 0)
)
- (if
- (i32.eq
- (set_local $$dec78$i
- (i32.add
- (get_local $$re$1482$i)
- (i32.const -1)
- )
- )
- (i32.const 0)
+ (block
+ (set_local $$mul80$i$lcssa
+ (get_local $$mul80$i)
)
- (block
- (set_local $$mul80$i$lcssa
- (get_local $$mul80$i)
- )
- (br $while-out$60)
+ (br $while-out$60)
+ )
+ (block
+ (set_local $$re$1482$i
+ (get_local $$dec78$i)
)
- (block
- (set_local $$re$1482$i
- (get_local $$dec78$i)
- )
- (set_local $$round$0481$i
- (get_local $$mul80$i)
- )
+ (set_local $$round$0481$i
+ (get_local $$mul80$i)
)
)
- (br $while-in$61)
)
- (if
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s
- (get_local $$prefix$0$add$ptr65$i)
- )
- (i32.const 24)
+ (br $while-in$61)
+ )
+ (if
+ (i32.eq
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s
+ (get_local $$prefix$0$add$ptr65$i)
)
(i32.const 24)
)
- (i32.const 45)
- )
- (block
- (set_local $$y$addr$1$i
- (f64.neg
- (f64.add
- (get_local $$mul80$i$lcssa)
- (f64.sub
- (f64.neg
- (get_local $$mul$i$240)
- )
- (get_local $$mul80$i$lcssa)
- )
- )
- )
- )
- (br $do-once$58)
+ (i32.const 24)
)
- (block
- (set_local $$y$addr$1$i
+ (i32.const 45)
+ )
+ (set_local $$y$addr$1$i
+ (f64.neg
+ (f64.add
+ (get_local $$mul80$i$lcssa)
(f64.sub
- (f64.add
+ (f64.neg
(get_local $$mul$i$240)
- (get_local $$mul80$i$lcssa)
)
(get_local $$mul80$i$lcssa)
)
)
- (br $do-once$58)
+ )
+ )
+ (set_local $$y$addr$1$i
+ (f64.sub
+ (f64.add
+ (get_local $$mul$i$240)
+ (get_local $$mul80$i$lcssa)
+ )
+ (get_local $$mul80$i$lcssa)
)
)
)
@@ -6998,11 +6953,9 @@
)
(loop $while-out$74 $while-in$75
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$z$2$i)
- (get_local $$a$2$ph$i)
- )
+ (i32.le_u
+ (get_local $$z$2$i)
+ (get_local $$a$2$ph$i)
)
(block
(set_local $$z$2$i$lcssa
@@ -7708,19 +7661,17 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.shr_s
- (i32.shl
- (i32.load8_s
- (get_local $$prefix$0$i)
- )
- (i32.const 24)
+ (i32.ne
+ (i32.shr_s
+ (i32.shl
+ (i32.load8_s
+ (get_local $$prefix$0$i)
)
(i32.const 24)
)
- (i32.const 45)
+ (i32.const 24)
)
+ (i32.const 45)
)
(block
(set_local $$round377$1$i
@@ -7755,14 +7706,12 @@
)
)
(if
- (i32.eqz
- (f64.ne
- (f64.add
- (get_local $$round377$1$i)
- (get_local $$small$1$i)
- )
+ (f64.eq
+ (f64.add
(get_local $$round377$1$i)
+ (get_local $$small$1$i)
)
+ (get_local $$round377$1$i)
)
(block
(set_local $$a$8$i
@@ -8010,11 +7959,9 @@
)
(loop $while-out$96 $while-in$97
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$z$7$i)
- (get_local $$a$9$ph$i)
- )
+ (i32.le_u
+ (get_local $$z$7$i)
+ (get_local $$a$9$ph$i)
)
(block
(set_local $$cmp450$lcssa$i
@@ -8112,16 +8059,14 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$and483$i
- (i32.and
- (get_local $$fl$1$and219)
- (i32.const 8)
- )
+ (i32.ne
+ (set_local $$and483$i
+ (i32.and
+ (get_local $$fl$1$and219)
+ (i32.const 8)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$and610$pre$phi$iZ2D
@@ -8289,7 +8234,6 @@
(set_local $$t$addr$1$i
(get_local $$t$addr$0$i)
)
- (br $do-once$98)
)
(block
(set_local $$$sub562$i
@@ -8329,7 +8273,6 @@
(set_local $$t$addr$1$i
(get_local $$t$addr$0$i)
)
- (br $do-once$98)
)
)
)
@@ -8589,11 +8532,9 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (get_local $$249)
- (get_local $$add$ptr671$i)
- )
+ (i32.ne
+ (get_local $$249)
+ (get_local $$add$ptr671$i)
)
(block
(set_local $$s668$1$i
@@ -8699,24 +8640,20 @@
)
(block $do-once$114
(if
- (i32.eqz
- (i32.eq
- (get_local $$239)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$239)
+ (i32.const 0)
)
(block
(br_if $do-once$114
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
)
(call $___fwritex
@@ -8982,16 +8919,14 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
(block
(set_local $$s753$2$i
@@ -9143,16 +9078,14 @@
(i32.const 0)
)
(br_if $do-once$106
- (i32.eqz
- (i32.eq
- (i32.and
- (i32.load
- (get_local $$f)
- )
- (i32.const 32)
+ (i32.ne
+ (i32.and
+ (i32.load
+ (get_local $$f)
)
- (i32.const 0)
+ (i32.const 32)
)
+ (i32.const 0)
)
)
(call $___fwritex
@@ -9326,7 +9259,6 @@
(get_local $$l10n$3)
)
(br $label$continue$L1)
- (br $switch$24)
)
(set_local $$a$2
(get_local $$incdec$ptr169275)
@@ -10272,19 +10204,17 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (i32.add
- (get_local $$nl_type)
- (i32.shl
- (get_local $$i$3296)
- (i32.const 2)
- )
+ (i32.ne
+ (i32.load
+ (i32.add
+ (get_local $$nl_type)
+ (i32.shl
+ (get_local $$i$3296)
+ (i32.const 2)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$retval$0
@@ -10370,11 +10300,9 @@
)
(block $label$break$L1
(if
- (i32.eqz
- (i32.gt_u
- (get_local $$type)
- (i32.const 20)
- )
+ (i32.le_u
+ (get_local $$type)
+ (i32.const 20)
)
(block $switch$3
(block $switch-default$14
@@ -10438,7 +10366,6 @@
(get_local $$6)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$13
(i32.load
@@ -10497,7 +10424,6 @@
)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$26
(i32.load
@@ -10547,7 +10473,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$39
(i32.load
@@ -10604,7 +10529,6 @@
(get_local $$42)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$53
(i32.load
@@ -10677,7 +10601,6 @@
(get_local $$56)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$67
(i32.load
@@ -10730,7 +10653,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$78
(i32.load
@@ -10803,7 +10725,6 @@
(get_local $$81)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$92
(i32.load
@@ -10856,7 +10777,6 @@
(i32.const 0)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$103
(f64.load
@@ -10900,7 +10820,6 @@
(get_local $$103)
)
(br $label$break$L1)
- (br $switch$3)
)
(set_local $$110
(f64.load
@@ -10943,10 +10862,7 @@
(get_local $$arg)
(get_local $$110)
)
- (br $label$break$L1)
- (br $switch$3)
)
- (br $label$break$L1)
)
)
)
@@ -11883,23 +11799,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (set_local $$shr3
- (i32.shr_u
- (set_local $$0
- (i32.load
- (i32.const 176)
- )
+ (i32.ne
+ (i32.and
+ (set_local $$shr3
+ (i32.shr_u
+ (set_local $$0
+ (i32.load
+ (i32.const 176)
)
- (get_local $$shr)
)
+ (get_local $$shr)
)
- (i32.const 3)
)
- (i32.const 0)
+ (i32.const 3)
)
+ (i32.const 0)
)
(block
(set_local $$3
@@ -11943,60 +11857,57 @@
)
)
)
- (block $do-once$2
- (if
- (i32.eq
- (get_local $$arrayidx)
- (get_local $$3)
- )
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $$0)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $$add8)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $$arrayidx)
+ (get_local $$3)
+ )
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $$0)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $$add8)
)
+ (i32.const -1)
)
)
- (block
- (if
- (i32.lt_u
- (get_local $$3)
- (i32.load
- (i32.const 192)
- )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $$3)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $$bk
- (i32.add
- (get_local $$3)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $$bk
+ (i32.add
+ (get_local $$3)
+ (i32.const 12)
)
)
- (get_local $$2)
)
- (block
- (i32.store
- (get_local $$bk)
- (get_local $$arrayidx)
- )
- (i32.store
- (get_local $$1)
- (get_local $$3)
- )
- (br $do-once$2)
+ (get_local $$2)
+ )
+ (block
+ (i32.store
+ (get_local $$bk)
+ (get_local $$arrayidx)
+ )
+ (i32.store
+ (get_local $$1)
+ (get_local $$3)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
@@ -12048,11 +11959,9 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (get_local $$shr3)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$shr3)
+ (i32.const 0)
)
(block
(set_local $$sub
@@ -12202,70 +12111,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.eq
- (get_local $$arrayidx66)
- (get_local $$10)
- )
- (block
- (i32.store
- (i32.const 176)
- (i32.and
- (get_local $$0)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $$add64)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $$arrayidx66)
+ (get_local $$10)
+ )
+ (block
+ (i32.store
+ (i32.const 176)
+ (i32.and
+ (get_local $$0)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $$add64)
)
+ (i32.const -1)
)
)
- (set_local $$13
- (get_local $$7)
- )
)
- (block
- (if
- (i32.lt_u
- (get_local $$10)
- (i32.load
- (i32.const 192)
- )
+ (set_local $$13
+ (get_local $$7)
+ )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $$10)
+ (i32.load
+ (i32.const 192)
)
- (call_import $_abort)
)
- (if
- (i32.eq
- (i32.load
- (set_local $$bk78
- (i32.add
- (get_local $$10)
- (i32.const 12)
- )
+ (call_import $_abort)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $$bk78
+ (i32.add
+ (get_local $$10)
+ (i32.const 12)
)
)
- (get_local $$9)
)
- (block
- (i32.store
- (get_local $$bk78)
- (get_local $$arrayidx66)
- )
- (i32.store
- (get_local $$8)
- (get_local $$10)
- )
- (set_local $$13
- (i32.load
- (i32.const 184)
- )
+ (get_local $$9)
+ )
+ (block
+ (i32.store
+ (get_local $$bk78)
+ (get_local $$arrayidx66)
+ )
+ (i32.store
+ (get_local $$8)
+ (get_local $$10)
+ )
+ (set_local $$13
+ (i32.load
+ (i32.const 184)
)
- (br $do-once$4)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
@@ -12304,11 +12210,9 @@
(get_local $$sub91)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$13)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$13)
+ (i32.const 0)
)
(block
(set_local $$14
@@ -12641,14 +12545,12 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$v$0$i$lcssa)
- (set_local $$add$ptr$i
- (i32.add
- (get_local $$v$0$i$lcssa)
- (get_local $$cond)
- )
+ (i32.ge_u
+ (get_local $$v$0$i$lcssa)
+ (set_local $$add$ptr$i
+ (i32.add
+ (get_local $$v$0$i$lcssa)
+ (get_local $$cond)
)
)
)
@@ -12724,20 +12626,18 @@
)
(loop $while-out$10 $while-in$11
(if
- (i32.eqz
- (i32.eq
- (set_local $$33
- (i32.load
- (set_local $$arrayidx71$i
- (i32.add
- (get_local $$R$1$i)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$33
+ (i32.load
+ (set_local $$arrayidx71$i
+ (i32.add
+ (get_local $$R$1$i)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i
@@ -12797,7 +12697,6 @@
(set_local $$R$3$i
(get_local $$R$1$i$lcssa)
)
- (br $do-once$8)
)
)
)
@@ -12814,18 +12713,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk47$i
- (i32.add
- (get_local $$28)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk47$i
+ (i32.add
+ (get_local $$28)
+ (i32.const 12)
)
)
- (get_local $$v$0$i$lcssa)
)
+ (get_local $$v$0$i$lcssa)
)
(call_import $_abort)
)
@@ -12853,7 +12750,6 @@
(set_local $$R$3$i
(get_local $$27)
)
- (br $do-once$8)
)
(call_import $_abort)
)
@@ -12862,11 +12758,9 @@
)
(block $do-once$12
(if
- (i32.eqz
- (i32.eq
- (get_local $$26)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$26)
+ (i32.const 0)
)
(block
(if
@@ -12972,48 +12866,41 @@
(get_local $$R$3$i)
(get_local $$26)
)
- (block $do-once$14
- (if
- (i32.eqz
- (i32.eq
- (set_local $$41
- (i32.load offset=16
- (get_local $$v$0$i$lcssa)
- )
- )
- (i32.const 0)
+ (if
+ (i32.ne
+ (set_local $$41
+ (i32.load offset=16
+ (get_local $$v$0$i$lcssa)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$41)
+ (get_local $$40)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i)
(get_local $$41)
- (get_local $$40)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i)
- (get_local $$41)
- )
- (i32.store offset=24
- (get_local $$41)
- (get_local $$R$3$i)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $$41)
+ (get_local $$R$3$i)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$42
- (i32.load offset=20
- (get_local $$v$0$i$lcssa)
- )
+ (i32.ne
+ (set_local $$42
+ (i32.load offset=20
+ (get_local $$v$0$i$lcssa)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -13032,7 +12919,6 @@
(get_local $$42)
(get_local $$R$3$i)
)
- (br $do-once$12)
)
)
)
@@ -13101,15 +12987,13 @@
(get_local $$rsize$0$i$lcssa)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$45
- (i32.load
- (i32.const 184)
- )
+ (i32.ne
+ (set_local $$45
+ (i32.load
+ (i32.const 184)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$46
@@ -13821,15 +13705,13 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$59
- (i32.load offset=16
- (get_local $$t$48$i)
- )
+ (i32.ne
+ (set_local $$59
+ (i32.load offset=16
+ (get_local $$t$48$i)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$rsize$49$i
@@ -13914,14 +13796,12 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$v$4$lcssa$i)
- (set_local $$add$ptr$i$161
- (i32.add
- (get_local $$v$4$lcssa$i)
- (get_local $$and145)
- )
+ (i32.ge_u
+ (get_local $$v$4$lcssa$i)
+ (set_local $$add$ptr$i$161
+ (i32.add
+ (get_local $$v$4$lcssa$i)
+ (get_local $$and145)
)
)
)
@@ -13997,20 +13877,18 @@
)
(loop $while-out$23 $while-in$24
(if
- (i32.eqz
- (i32.eq
- (set_local $$70
- (i32.load
- (set_local $$arrayidx161$i
- (i32.add
- (get_local $$R$1$i$168)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$70
+ (i32.load
+ (set_local $$arrayidx161$i
+ (i32.add
+ (get_local $$R$1$i$168)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i$168
@@ -14070,7 +13948,6 @@
(set_local $$R$3$i$171
(get_local $$R$1$i$168$lcssa)
)
- (br $do-once$21)
)
)
)
@@ -14087,18 +13964,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk136$i
- (i32.add
- (get_local $$65)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk136$i
+ (i32.add
+ (get_local $$65)
+ (i32.const 12)
)
)
- (get_local $$v$4$lcssa$i)
)
+ (get_local $$v$4$lcssa$i)
)
(call_import $_abort)
)
@@ -14126,7 +14001,6 @@
(set_local $$R$3$i$171
(get_local $$64)
)
- (br $do-once$21)
)
(call_import $_abort)
)
@@ -14135,11 +14009,9 @@
)
(block $do-once$25
(if
- (i32.eqz
- (i32.eq
- (get_local $$63)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$63)
+ (i32.const 0)
)
(block
(if
@@ -14245,48 +14117,41 @@
(get_local $$R$3$i$171)
(get_local $$63)
)
- (block $do-once$27
- (if
- (i32.eqz
- (i32.eq
- (set_local $$78
- (i32.load offset=16
- (get_local $$v$4$lcssa$i)
- )
- )
- (i32.const 0)
+ (if
+ (i32.ne
+ (set_local $$78
+ (i32.load offset=16
+ (get_local $$v$4$lcssa$i)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$78)
+ (get_local $$77)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i$171)
(get_local $$78)
- (get_local $$77)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i$171)
- (get_local $$78)
- )
- (i32.store offset=24
- (get_local $$78)
- (get_local $$R$3$i$171)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $$78)
+ (get_local $$R$3$i$171)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$79
- (i32.load offset=20
- (get_local $$v$4$lcssa$i)
- )
+ (i32.ne
+ (set_local $$79
+ (i32.load offset=20
+ (get_local $$v$4$lcssa$i)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -14305,7 +14170,6 @@
(get_local $$79)
(get_local $$R$3$i$171)
)
- (br $do-once$25)
)
)
)
@@ -14794,7 +14658,6 @@
(get_local $$add$ptr$i$161)
(get_local $$add$ptr$i$161)
)
- (br $do-once$29)
)
)
(if
@@ -14847,7 +14710,6 @@
(get_local $$add$ptr$i$161)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $_abort)
)
@@ -14875,15 +14737,13 @@
)
)
(if
- (i32.eqz
- (i32.lt_u
- (set_local $$94
- (i32.load
- (i32.const 184)
- )
+ (i32.ge_u
+ (set_local $$94
+ (i32.load
+ (i32.const 184)
)
- (get_local $$nb$0)
)
+ (get_local $$nb$0)
)
(block
(set_local $$95
@@ -15037,70 +14897,67 @@
)
)
)
- (block $do-once$33
+ (if
+ (i32.eq
+ (i32.load
+ (i32.const 648)
+ )
+ (i32.const 0)
+ )
(if
(i32.eq
- (i32.load
- (i32.const 648)
- )
- (i32.const 0)
- )
- (if
- (i32.eq
- (i32.and
- (i32.add
- (set_local $$call$i$i
- (call_import $_sysconf
- (i32.const 30)
- )
+ (i32.and
+ (i32.add
+ (set_local $$call$i$i
+ (call_import $_sysconf
+ (i32.const 30)
)
- (i32.const -1)
)
- (get_local $$call$i$i)
+ (i32.const -1)
)
+ (get_local $$call$i$i)
+ )
+ (i32.const 0)
+ )
+ (block
+ (i32.store
+ (i32.const 656)
+ (get_local $$call$i$i)
+ )
+ (i32.store
+ (i32.const 652)
+ (get_local $$call$i$i)
+ )
+ (i32.store
+ (i32.const 660)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 664)
+ (i32.const -1)
+ )
+ (i32.store
+ (i32.const 668)
(i32.const 0)
)
- (block
- (i32.store
- (i32.const 656)
- (get_local $$call$i$i)
- )
- (i32.store
- (i32.const 652)
- (get_local $$call$i$i)
- )
- (i32.store
- (i32.const 660)
- (i32.const -1)
- )
- (i32.store
- (i32.const 664)
- (i32.const -1)
- )
- (i32.store
- (i32.const 668)
- (i32.const 0)
- )
- (i32.store
- (i32.const 620)
- (i32.const 0)
- )
- (i32.store
- (i32.const 648)
- (i32.xor
- (i32.and
- (call_import $_time
- (i32.const 0)
- )
- (i32.const -16)
+ (i32.store
+ (i32.const 620)
+ (i32.const 0)
+ )
+ (i32.store
+ (i32.const 648)
+ (i32.xor
+ (i32.and
+ (call_import $_time
+ (i32.const 0)
)
- (i32.const 1431655768)
+ (i32.const -16)
)
+ (i32.const 1431655768)
)
- (br $do-once$33)
)
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
(set_local $$add$i$180
@@ -15110,50 +14967,46 @@
)
)
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$and11$i
- (i32.and
- (set_local $$add9$i
- (i32.add
- (set_local $$100
- (i32.load
- (i32.const 656)
- )
+ (i32.le_u
+ (set_local $$and11$i
+ (i32.and
+ (set_local $$add9$i
+ (i32.add
+ (set_local $$100
+ (i32.load
+ (i32.const 656)
)
- (set_local $$sub$i$181
- (i32.add
- (get_local $$nb$0)
- (i32.const 47)
- )
+ )
+ (set_local $$sub$i$181
+ (i32.add
+ (get_local $$nb$0)
+ (i32.const 47)
)
)
)
- (set_local $$neg$i$182
- (i32.sub
- (i32.const 0)
- (get_local $$100)
- )
+ )
+ (set_local $$neg$i$182
+ (i32.sub
+ (i32.const 0)
+ (get_local $$100)
)
)
)
- (get_local $$nb$0)
)
+ (get_local $$nb$0)
)
(return
(i32.const 0)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$101
- (i32.load
- (i32.const 616)
- )
+ (i32.ne
+ (set_local $$101
+ (i32.load
+ (i32.const 616)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.or
@@ -15211,15 +15064,13 @@
)
(loop $while-out$37 $while-in$38
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$105
- (i32.load
- (get_local $$sp$0$i$i)
- )
+ (i32.le_u
+ (set_local $$105
+ (i32.load
+ (get_local $$sp$0$i$i)
)
- (get_local $$104)
)
+ (get_local $$104)
)
(if
(i32.gt_u
@@ -15300,11 +15151,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$call83$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$call83$i)
+ (i32.const -1)
)
(block
(set_local $$tbase$796$i
@@ -15342,15 +15191,13 @@
(i32.const 173)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$call37$i
- (call_import $_sbrk
- (i32.const 0)
- )
+ (i32.ne
+ (set_local $$call37$i
+ (call_import $_sbrk
+ (i32.const 0)
)
- (i32.const -1)
)
+ (i32.const -1)
)
(block
(if
@@ -15417,15 +15264,13 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (set_local $$111
- (i32.load
- (i32.const 616)
- )
+ (i32.ne
+ (set_local $$111
+ (i32.load
+ (i32.const 616)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(br_if $do-once$39
(i32.or
@@ -15492,85 +15337,78 @@
(get_local $$ssize$2$ph$i)
)
)
- (block $do-once$42
- (if
+ (if
+ (i32.and
+ (i32.gt_u
+ (get_local $$add$i$180)
+ (get_local $$ssize$2$ph$i)
+ )
(i32.and
- (i32.gt_u
- (get_local $$add$i$180)
+ (i32.lt_u
(get_local $$ssize$2$ph$i)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $$ssize$2$ph$i)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $$br$2$ph$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$br$2$ph$i)
+ (i32.const -1)
)
)
- (if
- (i32.lt_u
- (set_local $$and104$i
- (i32.and
- (i32.add
- (i32.sub
- (get_local $$sub$i$181)
- (get_local $$ssize$2$ph$i)
- )
- (set_local $$115
- (i32.load
- (i32.const 656)
- )
- )
- )
+ )
+ (if
+ (i32.lt_u
+ (set_local $$and104$i
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $$115)
+ (get_local $$sub$i$181)
+ (get_local $$ssize$2$ph$i)
+ )
+ (set_local $$115
+ (i32.load
+ (i32.const 656)
+ )
)
)
- )
- (i32.const 2147483647)
- )
- (if
- (i32.eq
- (call_import $_sbrk
- (get_local $$and104$i)
+ (i32.sub
+ (i32.const 0)
+ (get_local $$115)
)
- (i32.const -1)
)
- (block
- (call_import $_sbrk
- (get_local $$sub112$i)
- )
- (br $label$break$L279)
+ )
+ (i32.const 2147483647)
+ )
+ (if
+ (i32.eq
+ (call_import $_sbrk
+ (get_local $$and104$i)
)
- (block
- (set_local $$ssize$5$i
- (i32.add
- (get_local $$and104$i)
- (get_local $$ssize$2$ph$i)
- )
- )
- (br $do-once$42)
+ (i32.const -1)
+ )
+ (block
+ (call_import $_sbrk
+ (get_local $$sub112$i)
)
+ (br $label$break$L279)
)
(set_local $$ssize$5$i
- (get_local $$ssize$2$ph$i)
+ (i32.add
+ (get_local $$and104$i)
+ (get_local $$ssize$2$ph$i)
+ )
)
)
(set_local $$ssize$5$i
(get_local $$ssize$2$ph$i)
)
)
+ (set_local $$ssize$5$i
+ (get_local $$ssize$2$ph$i)
+ )
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$br$2$ph$i)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $$br$2$ph$i)
+ (i32.const -1)
)
(block
(set_local $$tbase$796$i
@@ -16360,23 +16198,21 @@
)
(block $do-once$55
(if
- (i32.eqz
- (i32.eq
- (set_local $$148
- (i32.load offset=8
- (get_local $$add$ptr16$i$i)
- )
+ (i32.ne
+ (set_local $$148
+ (i32.load offset=8
+ (get_local $$add$ptr16$i$i)
)
- (set_local $$arrayidx$i$48$i
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx$i$48$i
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr$i$45$i)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr$i$45$i)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -16548,20 +16384,18 @@
)
(loop $while-out$61 $while-in$62
(if
- (i32.eqz
- (i32.eq
- (set_local $$161
- (i32.load
- (set_local $$arrayidx103$i$i
- (i32.add
- (get_local $$R$1$i$i)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$161
+ (i32.load
+ (set_local $$arrayidx103$i$i
+ (i32.add
+ (get_local $$R$1$i$i)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1$i$i
@@ -16621,7 +16455,6 @@
(set_local $$R$3$i$i
(get_local $$R$1$i$i$lcssa)
)
- (br $do-once$59)
)
)
)
@@ -16638,18 +16471,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk82$i$i
- (i32.add
- (get_local $$156)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk82$i$i
+ (i32.add
+ (get_local $$156)
+ (i32.const 12)
)
)
- (get_local $$add$ptr16$i$i)
)
+ (get_local $$add$ptr16$i$i)
)
(call_import $_abort)
)
@@ -16677,7 +16508,6 @@
(set_local $$R$3$i$i
(get_local $$155)
)
- (br $do-once$59)
)
(call_import $_abort)
)
@@ -16716,11 +16546,9 @@
(get_local $$R$3$i$i)
)
(br_if $do-once$63
- (i32.eqz
- (i32.eq
- (get_local $$R$3$i$i)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$R$3$i$i)
+ (i32.const 0)
)
)
(i32.store
@@ -16795,39 +16623,34 @@
(get_local $$R$3$i$i)
(get_local $$154)
)
- (block $do-once$65
- (if
- (i32.eqz
- (i32.eq
- (set_local $$169
- (i32.load
- (set_local $$child166$i$i
- (i32.add
- (get_local $$add$ptr16$i$i)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$169
+ (i32.load
+ (set_local $$child166$i$i
+ (i32.add
+ (get_local $$add$ptr16$i$i)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$169)
+ (get_local $$168)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3$i$i)
(get_local $$169)
- (get_local $$168)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3$i$i)
- (get_local $$169)
- )
- (i32.store offset=24
- (get_local $$169)
- (get_local $$R$3$i$i)
- )
- (br $do-once$65)
+ (i32.store offset=24
+ (get_local $$169)
+ (get_local $$R$3$i$i)
)
)
)
@@ -16859,7 +16682,6 @@
(get_local $$170)
(get_local $$R$3$i$i)
)
- (br $label$break$L331)
)
)
)
@@ -16980,21 +16802,19 @@
)
(block
(if
- (i32.eqz
- (i32.lt_u
- (set_local $$175
- (i32.load
- (set_local $$174
- (i32.add
- (get_local $$arrayidx223$i$i)
- (i32.const 8)
- )
+ (i32.ge_u
+ (set_local $$175
+ (i32.load
+ (set_local $$174
+ (i32.add
+ (get_local $$arrayidx223$i$i)
+ (i32.const 8)
)
)
)
- (i32.load
- (i32.const 192)
- )
+ )
+ (i32.load
+ (i32.const 192)
)
)
(block
@@ -17350,7 +17170,6 @@
(get_local $$add$ptr17$i$i)
(get_local $$add$ptr17$i$i)
)
- (br $do-once$52)
)
)
(if
@@ -17403,7 +17222,6 @@
(get_local $$add$ptr17$i$i)
(i32.const 0)
)
- (br $do-once$52)
)
(call_import $_abort)
)
@@ -17426,15 +17244,13 @@
)
(loop $while-out$73 $while-in$74
(if
- (i32.eqz
- (i32.gt_u
- (set_local $$185
- (i32.load
- (get_local $$sp$0$i$i$i)
- )
+ (i32.le_u
+ (set_local $$185
+ (i32.load
+ (get_local $$sp$0$i$i$i)
)
- (get_local $$119)
)
+ (get_local $$119)
)
(if
(i32.gt_u
@@ -17681,11 +17497,9 @@
(br $while-in$76)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$cond13$i$i)
- (get_local $$119)
- )
+ (i32.ne
+ (get_local $$cond13$i$i)
+ (get_local $$119)
)
(block
(i32.store
@@ -18128,7 +17942,6 @@
(get_local $$119)
(get_local $$119)
)
- (br $do-once$44)
)
)
(if
@@ -18181,7 +17994,6 @@
(get_local $$119)
(i32.const 0)
)
- (br $do-once$44)
)
(call_import $_abort)
)
@@ -18486,23 +18298,21 @@
)
(block
(if
- (i32.eqz
- (i32.eq
- (i32.and
- (set_local $$27
- (i32.load
- (set_local $$head209
- (i32.add
- (get_local $$add$ptr6)
- (i32.const 4)
- )
+ (i32.ne
+ (i32.and
+ (set_local $$27
+ (i32.load
+ (set_local $$head209
+ (i32.add
+ (get_local $$add$ptr6)
+ (i32.const 4)
)
)
)
- (i32.const 3)
)
(i32.const 3)
)
+ (i32.const 3)
)
(block
(set_local $$p$1
@@ -18560,23 +18370,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$4
- (i32.load offset=8
- (get_local $$add$ptr16)
- )
+ (i32.ne
+ (set_local $$4
+ (i32.load offset=8
+ (get_local $$add$ptr16)
)
- (set_local $$arrayidx
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -18590,13 +18398,11 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load offset=12
- (get_local $$4)
- )
- (get_local $$add$ptr16)
+ (i32.ne
+ (i32.load offset=12
+ (get_local $$4)
)
+ (get_local $$add$ptr16)
)
(call_import $_abort)
)
@@ -18757,20 +18563,18 @@
)
(loop $while-out$4 $while-in$5
(if
- (i32.eqz
- (i32.eq
- (set_local $$16
- (i32.load
- (set_local $$arrayidx108
- (i32.add
- (get_local $$R$1)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$16
+ (i32.load
+ (set_local $$arrayidx108
+ (i32.add
+ (get_local $$R$1)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R$1
@@ -18830,7 +18634,6 @@
(set_local $$R$3
(get_local $$R$1$lcssa)
)
- (br $do-once$2)
)
)
)
@@ -18847,18 +18650,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk82
- (i32.add
- (get_local $$11)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk82
+ (i32.add
+ (get_local $$11)
+ (i32.const 12)
)
)
- (get_local $$add$ptr16)
)
+ (get_local $$add$ptr16)
)
(call_import $_abort)
)
@@ -18886,7 +18687,6 @@
(set_local $$R$3
(get_local $$10)
)
- (br $do-once$2)
)
(call_import $_abort)
)
@@ -19025,39 +18825,34 @@
(get_local $$R$3)
(get_local $$9)
)
- (block $do-once$6
- (if
- (i32.eqz
- (i32.eq
- (set_local $$24
- (i32.load
- (set_local $$child171
- (i32.add
- (get_local $$add$ptr16)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$24
+ (i32.load
+ (set_local $$child171
+ (i32.add
+ (get_local $$add$ptr16)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$24)
+ (get_local $$23)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R$3)
(get_local $$24)
- (get_local $$23)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R$3)
- (get_local $$24)
- )
- (i32.store offset=24
- (get_local $$24)
- (get_local $$R$3)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $$24)
+ (get_local $$R$3)
)
)
)
@@ -19102,7 +18897,6 @@
(set_local $$psize$1
(get_local $$add17)
)
- (br $do-once$0)
)
)
)
@@ -19120,11 +18914,9 @@
)
)
(if
- (i32.eqz
- (i32.lt_u
- (get_local $$p$1)
- (get_local $$add$ptr6)
- )
+ (i32.ge_u
+ (get_local $$p$1)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19187,12 +18979,10 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$p$1)
- (i32.load
- (i32.const 196)
- )
+ (i32.ne
+ (get_local $$p$1)
+ (i32.load
+ (i32.const 196)
)
)
(return)
@@ -19276,23 +19066,21 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$34
- (i32.load offset=8
- (get_local $$add$ptr6)
- )
+ (i32.ne
+ (set_local $$34
+ (i32.load offset=8
+ (get_local $$add$ptr6)
)
- (set_local $$arrayidx279
- (i32.add
- (i32.const 216)
+ )
+ (set_local $$arrayidx279
+ (i32.add
+ (i32.const 216)
+ (i32.shl
(i32.shl
- (i32.shl
- (get_local $$shr268)
- (i32.const 1)
- )
- (i32.const 2)
+ (get_local $$shr268)
+ (i32.const 1)
)
+ (i32.const 2)
)
)
)
@@ -19308,13 +19096,11 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load offset=12
- (get_local $$34)
- )
- (get_local $$add$ptr6)
+ (i32.ne
+ (i32.load offset=12
+ (get_local $$34)
)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19464,20 +19250,18 @@
)
(loop $while-out$12 $while-in$13
(if
- (i32.eqz
- (i32.eq
- (set_local $$49
- (i32.load
- (set_local $$arrayidx374
- (i32.add
- (get_local $$R332$1)
- (i32.const 20)
- )
+ (i32.ne
+ (set_local $$49
+ (i32.load
+ (set_local $$arrayidx374
+ (i32.add
+ (get_local $$R332$1)
+ (i32.const 20)
)
)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(block
(set_local $$R332$1
@@ -19539,7 +19323,6 @@
(set_local $$R332$3
(get_local $$R332$1$lcssa)
)
- (br $do-once$10)
)
)
)
@@ -19558,18 +19341,16 @@
(call_import $_abort)
)
(if
- (i32.eqz
- (i32.eq
- (i32.load
- (set_local $$bk343
- (i32.add
- (get_local $$43)
- (i32.const 12)
- )
+ (i32.ne
+ (i32.load
+ (set_local $$bk343
+ (i32.add
+ (get_local $$43)
+ (i32.const 12)
)
)
- (get_local $$add$ptr6)
)
+ (get_local $$add$ptr6)
)
(call_import $_abort)
)
@@ -19597,7 +19378,6 @@
(set_local $$R332$3
(get_local $$42)
)
- (br $do-once$10)
)
(call_import $_abort)
)
@@ -19605,11 +19385,9 @@
)
)
(if
- (i32.eqz
- (i32.eq
- (get_local $$41)
- (i32.const 0)
- )
+ (i32.ne
+ (get_local $$41)
+ (i32.const 0)
)
(block
(if
@@ -19715,53 +19493,46 @@
(get_local $$R332$3)
(get_local $$41)
)
- (block $do-once$14
- (if
- (i32.eqz
- (i32.eq
- (set_local $$58
- (i32.load
- (set_local $$child443
- (i32.add
- (get_local $$add$ptr6)
- (i32.const 16)
- )
- )
+ (if
+ (i32.ne
+ (set_local $$58
+ (i32.load
+ (set_local $$child443
+ (i32.add
+ (get_local $$add$ptr6)
+ (i32.const 16)
)
)
- (i32.const 0)
)
)
- (if
- (i32.lt_u
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$58)
+ (get_local $$57)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store offset=16
+ (get_local $$R332$3)
(get_local $$58)
- (get_local $$57)
)
- (call_import $_abort)
- (block
- (i32.store offset=16
- (get_local $$R332$3)
- (get_local $$58)
- )
- (i32.store offset=24
- (get_local $$58)
- (get_local $$R332$3)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $$58)
+ (get_local $$R332$3)
)
)
)
)
(if
- (i32.eqz
- (i32.eq
- (set_local $$59
- (i32.load offset=4
- (get_local $$child443)
- )
+ (i32.ne
+ (set_local $$59
+ (i32.load offset=4
+ (get_local $$child443)
)
- (i32.const 0)
)
+ (i32.const 0)
)
(if
(i32.lt_u
@@ -19780,7 +19551,6 @@
(get_local $$59)
(get_local $$R332$3)
)
- (br $do-once$8)
)
)
)
@@ -20084,243 +19854,239 @@
(get_local $$p$1)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.eq
- (i32.and
- (set_local $$66
- (i32.load
- (i32.const 180)
- )
- )
- (set_local $$shl573
- (i32.shl
- (i32.const 1)
- (get_local $$I534$0)
- )
+ (if
+ (i32.eq
+ (i32.and
+ (set_local $$66
+ (i32.load
+ (i32.const 180)
)
)
- (i32.const 0)
- )
- (block
- (i32.store
- (i32.const 180)
- (i32.or
- (get_local $$66)
- (get_local $$shl573)
+ (set_local $$shl573
+ (i32.shl
+ (i32.const 1)
+ (get_local $$I534$0)
)
)
- (i32.store
- (get_local $$arrayidx567)
- (get_local $$p$1)
+ )
+ (i32.const 0)
+ )
+ (block
+ (i32.store
+ (i32.const 180)
+ (i32.or
+ (get_local $$66)
+ (get_local $$shl573)
)
- (i32.store offset=24
- (get_local $$p$1)
+ )
+ (i32.store
+ (get_local $$arrayidx567)
+ (get_local $$p$1)
+ )
+ (i32.store offset=24
+ (get_local $$p$1)
+ (get_local $$arrayidx567)
+ )
+ (i32.store offset=12
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ (i32.store offset=8
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ )
+ (block
+ (set_local $$67
+ (i32.load
(get_local $$arrayidx567)
)
- (i32.store offset=12
- (get_local $$p$1)
- (get_local $$p$1)
- )
- (i32.store offset=8
- (get_local $$p$1)
- (get_local $$p$1)
+ )
+ (set_local $$sub589
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
+ (get_local $$I534$0)
+ (i32.const 1)
+ )
)
)
- (block
- (set_local $$67
- (i32.load
- (get_local $$arrayidx567)
+ (set_local $$cond
+ (if
+ (i32.eq
+ (get_local $$I534$0)
+ (i32.const 31)
)
+ (i32.const 0)
+ (get_local $$sub589)
)
- (set_local $$sub589
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $$I534$0)
- (i32.const 1)
+ )
+ (set_local $$K583$0
+ (i32.shl
+ (get_local $$psize$2)
+ (get_local $$cond)
+ )
+ )
+ (set_local $$T$0
+ (get_local $$67)
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
+ (get_local $$T$0)
+ )
+ (i32.const -8)
)
+ (get_local $$psize$2)
)
- )
- (set_local $$cond
- (if
- (i32.eq
- (get_local $$I534$0)
- (i32.const 31)
+ (block
+ (set_local $$T$0$lcssa
+ (get_local $$T$0)
)
- (i32.const 0)
- (get_local $$sub589)
+ (set_local $label
+ (i32.const 130)
+ )
+ (br $while-out$18)
)
)
- (set_local $$K583$0
+ (set_local $$shl600
(i32.shl
- (get_local $$psize$2)
- (get_local $$cond)
+ (get_local $$K583$0)
+ (i32.const 1)
)
)
- (set_local $$T$0
- (get_local $$67)
- )
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $$T$0)
+ (if
+ (i32.eq
+ (set_local $$69
+ (i32.load
+ (set_local $$arrayidx599
+ (i32.add
+ (i32.add
+ (get_local $$T$0)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $$K583$0)
+ (i32.const 31)
+ )
+ (i32.const 2)
+ )
+ )
)
- (i32.const -8)
)
- (get_local $$psize$2)
)
- (block
- (set_local $$T$0$lcssa
- (get_local $$T$0)
- )
- (set_local $label
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const 0)
+ )
+ (block
+ (set_local $$T$0$lcssa319
+ (get_local $$T$0)
)
+ (set_local $$arrayidx599$lcssa
+ (get_local $$arrayidx599)
+ )
+ (set_local $label
+ (i32.const 127)
+ )
+ (br $while-out$18)
)
- (set_local $$shl600
- (i32.shl
- (get_local $$K583$0)
- (i32.const 1)
+ (block
+ (set_local $$K583$0
+ (get_local $$shl600)
+ )
+ (set_local $$T$0
+ (get_local $$69)
)
)
- (if
- (i32.eq
- (set_local $$69
- (i32.load
- (set_local $$arrayidx599
- (i32.add
- (i32.add
- (get_local $$T$0)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $$K583$0)
- (i32.const 31)
- )
- (i32.const 2)
- )
- )
- )
- )
- )
- (i32.const 0)
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $$arrayidx599$lcssa)
+ (i32.load
+ (i32.const 192)
)
- (block
- (set_local $$T$0$lcssa319
- (get_local $$T$0)
- )
- (set_local $$arrayidx599$lcssa
- (get_local $$arrayidx599)
- )
- (set_local $label
- (i32.const 127)
- )
- (br $while-out$18)
+ )
+ (call_import $_abort)
+ (block
+ (i32.store
+ (get_local $$arrayidx599$lcssa)
+ (get_local $$p$1)
)
- (block
- (set_local $$K583$0
- (get_local $$shl600)
- )
- (set_local $$T$0
- (get_local $$69)
- )
+ (i32.store offset=24
+ (get_local $$p$1)
+ (get_local $$T$0$lcssa319)
+ )
+ (i32.store offset=12
+ (get_local $$p$1)
+ (get_local $$p$1)
+ )
+ (i32.store offset=8
+ (get_local $$p$1)
+ (get_local $$p$1)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $label)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $$arrayidx599$lcssa)
- (i32.load
- (i32.const 192)
+ (i32.and
+ (i32.ge_u
+ (set_local $$71
+ (i32.load
+ (set_local $$fd620
+ (i32.add
+ (get_local $$T$0$lcssa)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $$72
+ (i32.load
+ (i32.const 192)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $$T$0$lcssa)
+ (get_local $$72)
)
)
- (call_import $_abort)
(block
+ (i32.store offset=12
+ (get_local $$71)
+ (get_local $$p$1)
+ )
(i32.store
- (get_local $$arrayidx599$lcssa)
+ (get_local $$fd620)
(get_local $$p$1)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $$p$1)
- (get_local $$T$0$lcssa319)
+ (get_local $$71)
)
(i32.store offset=12
(get_local $$p$1)
- (get_local $$p$1)
+ (get_local $$T$0$lcssa)
)
- (i32.store offset=8
- (get_local $$p$1)
+ (i32.store offset=24
(get_local $$p$1)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $label)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $$71
- (i32.load
- (set_local $$fd620
- (i32.add
- (get_local $$T$0$lcssa)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $$72
- (i32.load
- (i32.const 192)
- )
- )
- )
- (i32.ge_u
- (get_local $$T$0$lcssa)
- (get_local $$72)
- )
- )
- (block
- (i32.store offset=12
- (get_local $$71)
- (get_local $$p$1)
- )
- (i32.store
- (get_local $$fd620)
- (get_local $$p$1)
- )
- (i32.store offset=8
- (get_local $$p$1)
- (get_local $$71)
- )
- (i32.store offset=12
- (get_local $$p$1)
- (get_local $$T$0$lcssa)
- )
- (i32.store offset=24
- (get_local $$p$1)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $_abort)
)
+ (call_import $_abort)
)
)
)
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index dac188a60..e2bb3354e 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -234,60 +234,57 @@
)
)
)
- (block $do-once$2
- (if
- (i32.eq
- (get_local $i)
- (get_local $n)
- )
- (i32.store
- (i32.const 1208)
- (i32.and
- (get_local $f)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $h)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $i)
+ (get_local $n)
+ )
+ (i32.store
+ (i32.const 1208)
+ (i32.and
+ (get_local $f)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $h)
)
+ (i32.const -1)
)
)
- (block
- (if
- (i32.lt_u
- (get_local $n)
- (i32.load
- (i32.const 1224)
- )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $n)
+ (i32.load
+ (i32.const 1224)
)
- (call_import $qa)
)
- (if
- (i32.eq
- (i32.load
- (set_local $o
- (i32.add
- (get_local $n)
- (i32.const 12)
- )
+ (call_import $qa)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $o
+ (i32.add
+ (get_local $n)
+ (i32.const 12)
)
)
- (get_local $l)
)
- (block
- (i32.store
- (get_local $o)
- (get_local $i)
- )
- (i32.store
- (get_local $j)
- (get_local $n)
- )
- (br $do-once$2)
+ (get_local $l)
+ )
+ (block
+ (i32.store
+ (get_local $o)
+ (get_local $i)
+ )
+ (i32.store
+ (get_local $j)
+ (get_local $n)
)
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
@@ -483,70 +480,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.eq
- (get_local $s)
- (get_local $i)
- )
- (block
- (i32.store
- (i32.const 1208)
- (i32.and
- (get_local $f)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $u)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $s)
+ (get_local $i)
+ )
+ (block
+ (i32.store
+ (i32.const 1208)
+ (i32.and
+ (get_local $f)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $u)
)
+ (i32.const -1)
)
)
- (set_local $v
- (get_local $j)
- )
)
- (block
- (if
- (i32.lt_u
- (get_local $i)
- (i32.load
- (i32.const 1224)
- )
+ (set_local $v
+ (get_local $j)
+ )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i)
+ (i32.load
+ (i32.const 1224)
)
- (call_import $qa)
)
- (if
- (i32.eq
- (i32.load
- (set_local $n
- (i32.add
- (get_local $i)
- (i32.const 12)
- )
+ (call_import $qa)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $n
+ (i32.add
+ (get_local $i)
+ (i32.const 12)
)
)
- (get_local $q)
)
- (block
- (i32.store
- (get_local $n)
- (get_local $s)
- )
- (i32.store
- (get_local $t)
- (get_local $i)
- )
- (set_local $v
- (i32.load
- (i32.const 1216)
- )
+ (get_local $q)
+ )
+ (block
+ (i32.store
+ (get_local $n)
+ (get_local $s)
+ )
+ (i32.store
+ (get_local $t)
+ (get_local $i)
+ )
+ (set_local $v
+ (i32.load
+ (i32.const 1216)
)
- (br $do-once$4)
)
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
@@ -1043,7 +1037,6 @@
(set_local $C
(get_local $F)
)
- (br $do-once$8)
)
)
)
@@ -1097,7 +1090,6 @@
(set_local $C
(get_local $o)
)
- (br $do-once$8)
)
(call_import $qa)
)
@@ -1209,29 +1201,26 @@
(get_local $C)
(get_local $e)
)
- (block $do-once$14
+ (if
+ (set_local $s
+ (i32.load offset=16
+ (get_local $A)
+ )
+ )
(if
- (set_local $s
- (i32.load offset=16
- (get_local $A)
- )
+ (i32.lt_u
+ (get_local $s)
+ (get_local $o)
)
- (if
- (i32.lt_u
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $C)
(get_local $s)
- (get_local $o)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $C)
- (get_local $s)
- )
- (i32.store offset=24
- (get_local $s)
- (get_local $C)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $s)
+ (get_local $C)
)
)
)
@@ -1259,7 +1248,6 @@
(get_local $s)
(get_local $C)
)
- (br $do-once$12)
)
)
)
@@ -2230,7 +2218,6 @@
(set_local $W
(get_local $Z)
)
- (br $do-once$21)
)
)
)
@@ -2284,7 +2271,6 @@
(set_local $W
(get_local $s)
)
- (br $do-once$21)
)
(call_import $qa)
)
@@ -2396,29 +2382,26 @@
(get_local $W)
(get_local $g)
)
- (block $do-once$27
+ (if
+ (set_local $q
+ (i32.load offset=16
+ (get_local $V)
+ )
+ )
(if
- (set_local $q
- (i32.load offset=16
- (get_local $V)
- )
+ (i32.lt_u
+ (get_local $q)
+ (get_local $s)
)
- (if
- (i32.lt_u
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $W)
(get_local $q)
- (get_local $s)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $W)
- (get_local $q)
- )
- (i32.store offset=24
- (get_local $q)
- (get_local $W)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $q)
+ (get_local $W)
)
)
)
@@ -2446,7 +2429,6 @@
(get_local $q)
(get_local $W)
)
- (br $do-once$25)
)
)
)
@@ -2905,7 +2887,6 @@
(get_local $i)
(get_local $i)
)
- (br $do-once$29)
)
)
(if
@@ -2958,7 +2939,6 @@
(get_local $i)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $qa)
)
@@ -3583,78 +3563,73 @@
(get_local $ka)
)
)
- (block $do-once$40
- (if
+ (if
+ (i32.and
+ (i32.gt_u
+ (get_local $ea)
+ (get_local $ka)
+ )
(i32.and
- (i32.gt_u
- (get_local $ea)
+ (i32.lt_u
(get_local $ka)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $ka)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $ja)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $ja)
+ (i32.const -1)
)
)
- (if
- (i32.lt_u
- (set_local $e
- (i32.and
- (i32.add
- (i32.sub
- (get_local $ca)
- (get_local $ka)
- )
- (set_local $U
- (i32.load
- (i32.const 1688)
- )
- )
- )
+ )
+ (if
+ (i32.lt_u
+ (set_local $e
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $U)
+ (get_local $ca)
+ (get_local $ka)
+ )
+ (set_local $U
+ (i32.load
+ (i32.const 1688)
+ )
)
)
- )
- (i32.const 2147483647)
- )
- (if
- (i32.eq
- (call_import $ta
- (get_local $e)
+ (i32.sub
+ (i32.const 0)
+ (get_local $U)
)
- (i32.const -1)
)
- (block
- (call_import $ta
- (get_local $$)
- )
- (br $label$break$d)
+ )
+ (i32.const 2147483647)
+ )
+ (if
+ (i32.eq
+ (call_import $ta
+ (get_local $e)
)
- (block
- (set_local $ma
- (i32.add
- (get_local $e)
- (get_local $ka)
- )
- )
- (br $do-once$40)
+ (i32.const -1)
+ )
+ (block
+ (call_import $ta
+ (get_local $$)
)
+ (br $label$break$d)
)
(set_local $ma
- (get_local $ka)
+ (i32.add
+ (get_local $e)
+ (get_local $ka)
+ )
)
)
(set_local $ma
(get_local $ka)
)
)
+ (set_local $ma
+ (get_local $ka)
+ )
)
(if
(i32.ne
@@ -4487,7 +4462,6 @@
(set_local $ya
(get_local $Ba)
)
- (br $do-once$57)
)
)
)
@@ -4541,7 +4515,6 @@
(set_local $ya
(get_local $e)
)
- (br $do-once$57)
)
(call_import $qa)
)
@@ -4652,34 +4625,31 @@
(get_local $ya)
(get_local $$)
)
- (block $do-once$63
- (if
- (set_local $V
- (i32.load
- (set_local $da
- (i32.add
- (get_local $ma)
- (i32.const 16)
- )
+ (if
+ (set_local $V
+ (i32.load
+ (set_local $da
+ (i32.add
+ (get_local $ma)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $V)
+ (get_local $e)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $ya)
(get_local $V)
- (get_local $e)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $ya)
- (get_local $V)
- )
- (i32.store offset=24
- (get_local $V)
- (get_local $ya)
- )
- (br $do-once$63)
+ (i32.store offset=24
+ (get_local $V)
+ (get_local $ya)
)
)
)
@@ -4710,7 +4680,6 @@
(get_local $V)
(get_local $ya)
)
- (br $label$break$e)
)
)
)
@@ -5171,7 +5140,6 @@
(get_local $ka)
(get_local $ka)
)
- (br $do-once$50)
)
)
(if
@@ -5224,7 +5192,6 @@
(get_local $ka)
(i32.const 0)
)
- (br $do-once$50)
)
(call_import $qa)
)
@@ -5894,7 +5861,6 @@
(get_local $ja)
(get_local $ja)
)
- (br $do-once$42)
)
)
(if
@@ -5947,7 +5913,6 @@
(get_local $ja)
(i32.const 0)
)
- (br $do-once$42)
)
(call_import $qa)
)
@@ -6645,7 +6610,6 @@
(set_local $s
(get_local $v)
)
- (br $do-once$2)
)
)
)
@@ -6699,7 +6663,6 @@
(set_local $s
(get_local $j)
)
- (br $do-once$2)
)
(call_import $qa)
)
@@ -6825,34 +6788,31 @@
(get_local $s)
(get_local $g)
)
- (block $do-once$6
- (if
- (set_local $o
- (i32.load
- (set_local $l
- (i32.add
- (get_local $h)
- (i32.const 16)
- )
+ (if
+ (set_local $o
+ (i32.load
+ (set_local $l
+ (i32.add
+ (get_local $h)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $o)
+ (get_local $j)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $s)
(get_local $o)
- (get_local $j)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $s)
- (get_local $o)
- )
- (i32.store offset=24
- (get_local $o)
- (get_local $s)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $o)
+ (get_local $s)
)
)
)
@@ -6886,7 +6846,6 @@
(set_local $n
(get_local $i)
)
- (br $do-once$0)
)
)
(block
@@ -7331,7 +7290,6 @@
(set_local $y
(get_local $B)
)
- (br $do-once$10)
)
)
)
@@ -7387,7 +7345,6 @@
(set_local $y
(get_local $w)
)
- (br $do-once$10)
)
(call_import $qa)
)
@@ -7498,34 +7455,31 @@
(get_local $y)
(get_local $v)
)
- (block $do-once$14
- (if
- (set_local $h
- (i32.load
- (set_local $i
- (i32.add
- (get_local $f)
- (i32.const 16)
- )
+ (if
+ (set_local $h
+ (i32.load
+ (set_local $i
+ (i32.add
+ (get_local $f)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $h)
+ (get_local $w)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $y)
(get_local $h)
- (get_local $w)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $y)
- (get_local $h)
- )
- (i32.store offset=24
- (get_local $h)
- (get_local $y)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $h)
+ (get_local $y)
)
)
)
@@ -7553,7 +7507,6 @@
(get_local $h)
(get_local $y)
)
- (br $do-once$8)
)
)
)
@@ -7820,228 +7773,224 @@
(get_local $m)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.and
- (set_local $E
- (i32.load
- (i32.const 1212)
- )
+ (if
+ (i32.and
+ (set_local $E
+ (i32.load
+ (i32.const 1212)
)
- (set_local $e
- (i32.shl
- (i32.const 1)
- (get_local $G)
- )
+ )
+ (set_local $e
+ (i32.shl
+ (i32.const 1)
+ (get_local $G)
)
)
- (block
- (set_local $F
- (i32.shl
- (get_local $D)
- (if
- (i32.eq
+ )
+ (block
+ (set_local $F
+ (i32.shl
+ (get_local $D)
+ (if
+ (i32.eq
+ (get_local $G)
+ (i32.const 31)
+ )
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
(get_local $G)
- (i32.const 31)
- )
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $G)
- (i32.const 1)
- )
+ (i32.const 1)
)
)
)
)
- (set_local $b
- (i32.load
- (get_local $s)
- )
+ )
+ (set_local $b
+ (i32.load
+ (get_local $s)
)
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $b)
- )
- (i32.const -8)
- )
- (get_local $D)
- )
- (block
- (set_local $H
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
(get_local $b)
)
- (set_local $I
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const -8)
)
+ (get_local $D)
)
- (if
- (set_local $y
- (i32.load
- (set_local $n
+ (block
+ (set_local $H
+ (get_local $b)
+ )
+ (set_local $I
+ (i32.const 130)
+ )
+ (br $while-out$18)
+ )
+ )
+ (if
+ (set_local $y
+ (i32.load
+ (set_local $n
+ (i32.add
(i32.add
- (i32.add
- (get_local $b)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $F)
- (i32.const 31)
- )
- (i32.const 2)
+ (get_local $b)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $F)
+ (i32.const 31)
)
+ (i32.const 2)
)
)
)
)
- (block
- (set_local $F
- (i32.shl
- (get_local $F)
- (i32.const 1)
- )
- )
- (set_local $b
- (get_local $y)
+ )
+ (block
+ (set_local $F
+ (i32.shl
+ (get_local $F)
+ (i32.const 1)
)
)
- (block
- (set_local $J
- (get_local $n)
- )
- (set_local $K
- (get_local $b)
- )
- (set_local $I
- (i32.const 127)
- )
- (br $while-out$18)
+ (set_local $b
+ (get_local $y)
+ )
+ )
+ (block
+ (set_local $J
+ (get_local $n)
+ )
+ (set_local $K
+ (get_local $b)
+ )
+ (set_local $I
+ (i32.const 127)
+ )
+ (br $while-out$18)
+ )
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $I)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $J)
+ (i32.load
+ (i32.const 1224)
+ )
+ )
+ (call_import $qa)
+ (block
+ (i32.store
+ (get_local $J)
+ (get_local $m)
+ )
+ (i32.store offset=24
+ (get_local $m)
+ (get_local $K)
+ )
+ (i32.store offset=12
+ (get_local $m)
+ (get_local $m)
+ )
+ (i32.store offset=8
+ (get_local $m)
+ (get_local $m)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $I)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $J)
- (i32.load
- (i32.const 1224)
+ (i32.and
+ (i32.ge_u
+ (set_local $F
+ (i32.load
+ (set_local $b
+ (i32.add
+ (get_local $H)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $i
+ (i32.load
+ (i32.const 1224)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $H)
+ (get_local $i)
)
)
- (call_import $qa)
(block
+ (i32.store offset=12
+ (get_local $F)
+ (get_local $m)
+ )
(i32.store
- (get_local $J)
+ (get_local $b)
(get_local $m)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $m)
- (get_local $K)
+ (get_local $F)
)
(i32.store offset=12
(get_local $m)
- (get_local $m)
+ (get_local $H)
)
- (i32.store offset=8
- (get_local $m)
+ (i32.store offset=24
(get_local $m)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $I)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $F
- (i32.load
- (set_local $b
- (i32.add
- (get_local $H)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $i
- (i32.load
- (i32.const 1224)
- )
- )
- )
- (i32.ge_u
- (get_local $H)
- (get_local $i)
- )
- )
- (block
- (i32.store offset=12
- (get_local $F)
- (get_local $m)
- )
- (i32.store
- (get_local $b)
- (get_local $m)
- )
- (i32.store offset=8
- (get_local $m)
- (get_local $F)
- )
- (i32.store offset=12
- (get_local $m)
- (get_local $H)
- )
- (i32.store offset=24
- (get_local $m)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
- (block
- (i32.store
- (i32.const 1212)
- (i32.or
- (get_local $E)
- (get_local $e)
- )
- )
- (i32.store
- (get_local $s)
- (get_local $m)
- )
- (i32.store offset=24
- (get_local $m)
- (get_local $s)
- )
- (i32.store offset=12
- (get_local $m)
- (get_local $m)
- )
- (i32.store offset=8
- (get_local $m)
- (get_local $m)
+ )
+ (block
+ (i32.store
+ (i32.const 1212)
+ (i32.or
+ (get_local $E)
+ (get_local $e)
)
)
+ (i32.store
+ (get_local $s)
+ (get_local $m)
+ )
+ (i32.store offset=24
+ (get_local $m)
+ (get_local $s)
+ )
+ (i32.store offset=12
+ (get_local $m)
+ (get_local $m)
+ )
+ (i32.store offset=8
+ (get_local $m)
+ (get_local $m)
+ )
)
)
(i32.store
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index dac188a60..e2bb3354e 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -234,60 +234,57 @@
)
)
)
- (block $do-once$2
- (if
- (i32.eq
- (get_local $i)
- (get_local $n)
- )
- (i32.store
- (i32.const 1208)
- (i32.and
- (get_local $f)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $h)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $i)
+ (get_local $n)
+ )
+ (i32.store
+ (i32.const 1208)
+ (i32.and
+ (get_local $f)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $h)
)
+ (i32.const -1)
)
)
- (block
- (if
- (i32.lt_u
- (get_local $n)
- (i32.load
- (i32.const 1224)
- )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $n)
+ (i32.load
+ (i32.const 1224)
)
- (call_import $qa)
)
- (if
- (i32.eq
- (i32.load
- (set_local $o
- (i32.add
- (get_local $n)
- (i32.const 12)
- )
+ (call_import $qa)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $o
+ (i32.add
+ (get_local $n)
+ (i32.const 12)
)
)
- (get_local $l)
)
- (block
- (i32.store
- (get_local $o)
- (get_local $i)
- )
- (i32.store
- (get_local $j)
- (get_local $n)
- )
- (br $do-once$2)
+ (get_local $l)
+ )
+ (block
+ (i32.store
+ (get_local $o)
+ (get_local $i)
+ )
+ (i32.store
+ (get_local $j)
+ (get_local $n)
)
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
@@ -483,70 +480,67 @@
)
)
)
- (block $do-once$4
- (if
- (i32.eq
- (get_local $s)
- (get_local $i)
- )
- (block
- (i32.store
- (i32.const 1208)
- (i32.and
- (get_local $f)
- (i32.xor
- (i32.shl
- (i32.const 1)
- (get_local $u)
- )
- (i32.const -1)
+ (if
+ (i32.eq
+ (get_local $s)
+ (get_local $i)
+ )
+ (block
+ (i32.store
+ (i32.const 1208)
+ (i32.and
+ (get_local $f)
+ (i32.xor
+ (i32.shl
+ (i32.const 1)
+ (get_local $u)
)
+ (i32.const -1)
)
)
- (set_local $v
- (get_local $j)
- )
)
- (block
- (if
- (i32.lt_u
- (get_local $i)
- (i32.load
- (i32.const 1224)
- )
+ (set_local $v
+ (get_local $j)
+ )
+ )
+ (block
+ (if
+ (i32.lt_u
+ (get_local $i)
+ (i32.load
+ (i32.const 1224)
)
- (call_import $qa)
)
- (if
- (i32.eq
- (i32.load
- (set_local $n
- (i32.add
- (get_local $i)
- (i32.const 12)
- )
+ (call_import $qa)
+ )
+ (if
+ (i32.eq
+ (i32.load
+ (set_local $n
+ (i32.add
+ (get_local $i)
+ (i32.const 12)
)
)
- (get_local $q)
)
- (block
- (i32.store
- (get_local $n)
- (get_local $s)
- )
- (i32.store
- (get_local $t)
- (get_local $i)
- )
- (set_local $v
- (i32.load
- (i32.const 1216)
- )
+ (get_local $q)
+ )
+ (block
+ (i32.store
+ (get_local $n)
+ (get_local $s)
+ )
+ (i32.store
+ (get_local $t)
+ (get_local $i)
+ )
+ (set_local $v
+ (i32.load
+ (i32.const 1216)
)
- (br $do-once$4)
)
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
@@ -1043,7 +1037,6 @@
(set_local $C
(get_local $F)
)
- (br $do-once$8)
)
)
)
@@ -1097,7 +1090,6 @@
(set_local $C
(get_local $o)
)
- (br $do-once$8)
)
(call_import $qa)
)
@@ -1209,29 +1201,26 @@
(get_local $C)
(get_local $e)
)
- (block $do-once$14
+ (if
+ (set_local $s
+ (i32.load offset=16
+ (get_local $A)
+ )
+ )
(if
- (set_local $s
- (i32.load offset=16
- (get_local $A)
- )
+ (i32.lt_u
+ (get_local $s)
+ (get_local $o)
)
- (if
- (i32.lt_u
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $C)
(get_local $s)
- (get_local $o)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $C)
- (get_local $s)
- )
- (i32.store offset=24
- (get_local $s)
- (get_local $C)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $s)
+ (get_local $C)
)
)
)
@@ -1259,7 +1248,6 @@
(get_local $s)
(get_local $C)
)
- (br $do-once$12)
)
)
)
@@ -2230,7 +2218,6 @@
(set_local $W
(get_local $Z)
)
- (br $do-once$21)
)
)
)
@@ -2284,7 +2271,6 @@
(set_local $W
(get_local $s)
)
- (br $do-once$21)
)
(call_import $qa)
)
@@ -2396,29 +2382,26 @@
(get_local $W)
(get_local $g)
)
- (block $do-once$27
+ (if
+ (set_local $q
+ (i32.load offset=16
+ (get_local $V)
+ )
+ )
(if
- (set_local $q
- (i32.load offset=16
- (get_local $V)
- )
+ (i32.lt_u
+ (get_local $q)
+ (get_local $s)
)
- (if
- (i32.lt_u
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $W)
(get_local $q)
- (get_local $s)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $W)
- (get_local $q)
- )
- (i32.store offset=24
- (get_local $q)
- (get_local $W)
- )
- (br $do-once$27)
+ (i32.store offset=24
+ (get_local $q)
+ (get_local $W)
)
)
)
@@ -2446,7 +2429,6 @@
(get_local $q)
(get_local $W)
)
- (br $do-once$25)
)
)
)
@@ -2905,7 +2887,6 @@
(get_local $i)
(get_local $i)
)
- (br $do-once$29)
)
)
(if
@@ -2958,7 +2939,6 @@
(get_local $i)
(i32.const 0)
)
- (br $do-once$29)
)
(call_import $qa)
)
@@ -3583,78 +3563,73 @@
(get_local $ka)
)
)
- (block $do-once$40
- (if
+ (if
+ (i32.and
+ (i32.gt_u
+ (get_local $ea)
+ (get_local $ka)
+ )
(i32.and
- (i32.gt_u
- (get_local $ea)
+ (i32.lt_u
(get_local $ka)
+ (i32.const 2147483647)
)
- (i32.and
- (i32.lt_u
- (get_local $ka)
- (i32.const 2147483647)
- )
- (i32.ne
- (get_local $ja)
- (i32.const -1)
- )
+ (i32.ne
+ (get_local $ja)
+ (i32.const -1)
)
)
- (if
- (i32.lt_u
- (set_local $e
- (i32.and
- (i32.add
- (i32.sub
- (get_local $ca)
- (get_local $ka)
- )
- (set_local $U
- (i32.load
- (i32.const 1688)
- )
- )
- )
+ )
+ (if
+ (i32.lt_u
+ (set_local $e
+ (i32.and
+ (i32.add
(i32.sub
- (i32.const 0)
- (get_local $U)
+ (get_local $ca)
+ (get_local $ka)
+ )
+ (set_local $U
+ (i32.load
+ (i32.const 1688)
+ )
)
)
- )
- (i32.const 2147483647)
- )
- (if
- (i32.eq
- (call_import $ta
- (get_local $e)
+ (i32.sub
+ (i32.const 0)
+ (get_local $U)
)
- (i32.const -1)
)
- (block
- (call_import $ta
- (get_local $$)
- )
- (br $label$break$d)
+ )
+ (i32.const 2147483647)
+ )
+ (if
+ (i32.eq
+ (call_import $ta
+ (get_local $e)
)
- (block
- (set_local $ma
- (i32.add
- (get_local $e)
- (get_local $ka)
- )
- )
- (br $do-once$40)
+ (i32.const -1)
+ )
+ (block
+ (call_import $ta
+ (get_local $$)
)
+ (br $label$break$d)
)
(set_local $ma
- (get_local $ka)
+ (i32.add
+ (get_local $e)
+ (get_local $ka)
+ )
)
)
(set_local $ma
(get_local $ka)
)
)
+ (set_local $ma
+ (get_local $ka)
+ )
)
(if
(i32.ne
@@ -4487,7 +4462,6 @@
(set_local $ya
(get_local $Ba)
)
- (br $do-once$57)
)
)
)
@@ -4541,7 +4515,6 @@
(set_local $ya
(get_local $e)
)
- (br $do-once$57)
)
(call_import $qa)
)
@@ -4652,34 +4625,31 @@
(get_local $ya)
(get_local $$)
)
- (block $do-once$63
- (if
- (set_local $V
- (i32.load
- (set_local $da
- (i32.add
- (get_local $ma)
- (i32.const 16)
- )
+ (if
+ (set_local $V
+ (i32.load
+ (set_local $da
+ (i32.add
+ (get_local $ma)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $V)
+ (get_local $e)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $ya)
(get_local $V)
- (get_local $e)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $ya)
- (get_local $V)
- )
- (i32.store offset=24
- (get_local $V)
- (get_local $ya)
- )
- (br $do-once$63)
+ (i32.store offset=24
+ (get_local $V)
+ (get_local $ya)
)
)
)
@@ -4710,7 +4680,6 @@
(get_local $V)
(get_local $ya)
)
- (br $label$break$e)
)
)
)
@@ -5171,7 +5140,6 @@
(get_local $ka)
(get_local $ka)
)
- (br $do-once$50)
)
)
(if
@@ -5224,7 +5192,6 @@
(get_local $ka)
(i32.const 0)
)
- (br $do-once$50)
)
(call_import $qa)
)
@@ -5894,7 +5861,6 @@
(get_local $ja)
(get_local $ja)
)
- (br $do-once$42)
)
)
(if
@@ -5947,7 +5913,6 @@
(get_local $ja)
(i32.const 0)
)
- (br $do-once$42)
)
(call_import $qa)
)
@@ -6645,7 +6610,6 @@
(set_local $s
(get_local $v)
)
- (br $do-once$2)
)
)
)
@@ -6699,7 +6663,6 @@
(set_local $s
(get_local $j)
)
- (br $do-once$2)
)
(call_import $qa)
)
@@ -6825,34 +6788,31 @@
(get_local $s)
(get_local $g)
)
- (block $do-once$6
- (if
- (set_local $o
- (i32.load
- (set_local $l
- (i32.add
- (get_local $h)
- (i32.const 16)
- )
+ (if
+ (set_local $o
+ (i32.load
+ (set_local $l
+ (i32.add
+ (get_local $h)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $o)
+ (get_local $j)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $s)
(get_local $o)
- (get_local $j)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $s)
- (get_local $o)
- )
- (i32.store offset=24
- (get_local $o)
- (get_local $s)
- )
- (br $do-once$6)
+ (i32.store offset=24
+ (get_local $o)
+ (get_local $s)
)
)
)
@@ -6886,7 +6846,6 @@
(set_local $n
(get_local $i)
)
- (br $do-once$0)
)
)
(block
@@ -7331,7 +7290,6 @@
(set_local $y
(get_local $B)
)
- (br $do-once$10)
)
)
)
@@ -7387,7 +7345,6 @@
(set_local $y
(get_local $w)
)
- (br $do-once$10)
)
(call_import $qa)
)
@@ -7498,34 +7455,31 @@
(get_local $y)
(get_local $v)
)
- (block $do-once$14
- (if
- (set_local $h
- (i32.load
- (set_local $i
- (i32.add
- (get_local $f)
- (i32.const 16)
- )
+ (if
+ (set_local $h
+ (i32.load
+ (set_local $i
+ (i32.add
+ (get_local $f)
+ (i32.const 16)
)
)
)
- (if
- (i32.lt_u
+ )
+ (if
+ (i32.lt_u
+ (get_local $h)
+ (get_local $w)
+ )
+ (call_import $qa)
+ (block
+ (i32.store offset=16
+ (get_local $y)
(get_local $h)
- (get_local $w)
)
- (call_import $qa)
- (block
- (i32.store offset=16
- (get_local $y)
- (get_local $h)
- )
- (i32.store offset=24
- (get_local $h)
- (get_local $y)
- )
- (br $do-once$14)
+ (i32.store offset=24
+ (get_local $h)
+ (get_local $y)
)
)
)
@@ -7553,7 +7507,6 @@
(get_local $h)
(get_local $y)
)
- (br $do-once$8)
)
)
)
@@ -7820,228 +7773,224 @@
(get_local $m)
(i32.const 0)
)
- (block $do-once$16
- (if
- (i32.and
- (set_local $E
- (i32.load
- (i32.const 1212)
- )
+ (if
+ (i32.and
+ (set_local $E
+ (i32.load
+ (i32.const 1212)
)
- (set_local $e
- (i32.shl
- (i32.const 1)
- (get_local $G)
- )
+ )
+ (set_local $e
+ (i32.shl
+ (i32.const 1)
+ (get_local $G)
)
)
- (block
- (set_local $F
- (i32.shl
- (get_local $D)
- (if
- (i32.eq
+ )
+ (block
+ (set_local $F
+ (i32.shl
+ (get_local $D)
+ (if
+ (i32.eq
+ (get_local $G)
+ (i32.const 31)
+ )
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
(get_local $G)
- (i32.const 31)
- )
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
- (get_local $G)
- (i32.const 1)
- )
+ (i32.const 1)
)
)
)
)
- (set_local $b
- (i32.load
- (get_local $s)
- )
+ )
+ (set_local $b
+ (i32.load
+ (get_local $s)
)
- (loop $while-out$18 $while-in$19
- (if
- (i32.eq
- (i32.and
- (i32.load offset=4
- (get_local $b)
- )
- (i32.const -8)
- )
- (get_local $D)
- )
- (block
- (set_local $H
+ )
+ (loop $while-out$18 $while-in$19
+ (if
+ (i32.eq
+ (i32.and
+ (i32.load offset=4
(get_local $b)
)
- (set_local $I
- (i32.const 130)
- )
- (br $while-out$18)
+ (i32.const -8)
)
+ (get_local $D)
)
- (if
- (set_local $y
- (i32.load
- (set_local $n
+ (block
+ (set_local $H
+ (get_local $b)
+ )
+ (set_local $I
+ (i32.const 130)
+ )
+ (br $while-out$18)
+ )
+ )
+ (if
+ (set_local $y
+ (i32.load
+ (set_local $n
+ (i32.add
(i32.add
- (i32.add
- (get_local $b)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $F)
- (i32.const 31)
- )
- (i32.const 2)
+ (get_local $b)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $F)
+ (i32.const 31)
)
+ (i32.const 2)
)
)
)
)
- (block
- (set_local $F
- (i32.shl
- (get_local $F)
- (i32.const 1)
- )
- )
- (set_local $b
- (get_local $y)
+ )
+ (block
+ (set_local $F
+ (i32.shl
+ (get_local $F)
+ (i32.const 1)
)
)
- (block
- (set_local $J
- (get_local $n)
- )
- (set_local $K
- (get_local $b)
- )
- (set_local $I
- (i32.const 127)
- )
- (br $while-out$18)
+ (set_local $b
+ (get_local $y)
+ )
+ )
+ (block
+ (set_local $J
+ (get_local $n)
+ )
+ (set_local $K
+ (get_local $b)
+ )
+ (set_local $I
+ (i32.const 127)
+ )
+ (br $while-out$18)
+ )
+ )
+ (br $while-in$19)
+ )
+ (if
+ (i32.eq
+ (get_local $I)
+ (i32.const 127)
+ )
+ (if
+ (i32.lt_u
+ (get_local $J)
+ (i32.load
+ (i32.const 1224)
+ )
+ )
+ (call_import $qa)
+ (block
+ (i32.store
+ (get_local $J)
+ (get_local $m)
+ )
+ (i32.store offset=24
+ (get_local $m)
+ (get_local $K)
+ )
+ (i32.store offset=12
+ (get_local $m)
+ (get_local $m)
+ )
+ (i32.store offset=8
+ (get_local $m)
+ (get_local $m)
)
)
- (br $while-in$19)
)
(if
(i32.eq
(get_local $I)
- (i32.const 127)
+ (i32.const 130)
)
(if
- (i32.lt_u
- (get_local $J)
- (i32.load
- (i32.const 1224)
+ (i32.and
+ (i32.ge_u
+ (set_local $F
+ (i32.load
+ (set_local $b
+ (i32.add
+ (get_local $H)
+ (i32.const 8)
+ )
+ )
+ )
+ )
+ (set_local $i
+ (i32.load
+ (i32.const 1224)
+ )
+ )
+ )
+ (i32.ge_u
+ (get_local $H)
+ (get_local $i)
)
)
- (call_import $qa)
(block
+ (i32.store offset=12
+ (get_local $F)
+ (get_local $m)
+ )
(i32.store
- (get_local $J)
+ (get_local $b)
(get_local $m)
)
- (i32.store offset=24
+ (i32.store offset=8
(get_local $m)
- (get_local $K)
+ (get_local $F)
)
(i32.store offset=12
(get_local $m)
- (get_local $m)
+ (get_local $H)
)
- (i32.store offset=8
- (get_local $m)
+ (i32.store offset=24
(get_local $m)
+ (i32.const 0)
)
- (br $do-once$16)
- )
- )
- (if
- (i32.eq
- (get_local $I)
- (i32.const 130)
- )
- (if
- (i32.and
- (i32.ge_u
- (set_local $F
- (i32.load
- (set_local $b
- (i32.add
- (get_local $H)
- (i32.const 8)
- )
- )
- )
- )
- (set_local $i
- (i32.load
- (i32.const 1224)
- )
- )
- )
- (i32.ge_u
- (get_local $H)
- (get_local $i)
- )
- )
- (block
- (i32.store offset=12
- (get_local $F)
- (get_local $m)
- )
- (i32.store
- (get_local $b)
- (get_local $m)
- )
- (i32.store offset=8
- (get_local $m)
- (get_local $F)
- )
- (i32.store offset=12
- (get_local $m)
- (get_local $H)
- )
- (i32.store offset=24
- (get_local $m)
- (i32.const 0)
- )
- (br $do-once$16)
- )
- (call_import $qa)
)
+ (call_import $qa)
)
)
)
- (block
- (i32.store
- (i32.const 1212)
- (i32.or
- (get_local $E)
- (get_local $e)
- )
- )
- (i32.store
- (get_local $s)
- (get_local $m)
- )
- (i32.store offset=24
- (get_local $m)
- (get_local $s)
- )
- (i32.store offset=12
- (get_local $m)
- (get_local $m)
- )
- (i32.store offset=8
- (get_local $m)
- (get_local $m)
+ )
+ (block
+ (i32.store
+ (i32.const 1212)
+ (i32.or
+ (get_local $E)
+ (get_local $e)
)
)
+ (i32.store
+ (get_local $s)
+ (get_local $m)
+ )
+ (i32.store offset=24
+ (get_local $m)
+ (get_local $s)
+ )
+ (i32.store offset=12
+ (get_local $m)
+ (get_local $m)
+ )
+ (i32.store offset=8
+ (get_local $m)
+ (get_local $m)
+ )
)
)
(i32.store
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt
index d4c50563d..226065f3f 100644
--- a/test/passes/remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs.txt
@@ -2,23 +2,27 @@
(memory 256 256)
(func $b0-yes (param $i1 i32)
(block $topmost
+ (nop)
)
)
(func $b1 (param $i1 i32)
(block $topmost
- (i32.const 0)
+ (br $topmost
+ (i32.const 0)
+ )
)
)
(func $b2 (param $i1 i32)
(block $topmost
(block $inner
- (br $topmost)
+ (nop)
)
)
)
(func $b3-yes (param $i1 i32)
(block $topmost
(block $inner
+ (nop)
)
)
)
@@ -34,7 +38,9 @@
(func $b5 (param $i1 i32)
(block $topmost
(block $inner
- (i32.const 0)
+ (br $inner
+ (i32.const 0)
+ )
)
)
)
@@ -97,11 +103,15 @@
(i32.const 1)
(block $block1
(i32.const 12)
- (i32.const 1)
+ (br $topmost
+ (i32.const 1)
+ )
)
(block $block3
(i32.const 27)
- (i32.const 2)
+ (br $topmost
+ (i32.const 2)
+ )
)
)
)
@@ -155,4 +165,77 @@
)
)
)
+ (func $b16
+ (block $a
+ (block $b
+ (block $c
+ (nop)
+ )
+ (nop)
+ )
+ (nop)
+ )
+ (block $a
+ (block $b
+ (block $c
+ (nop)
+ )
+ (nop)
+ )
+ (nop)
+ )
+ (block $a
+ (block $b
+ (block $c
+ (nop)
+ )
+ (nop)
+ )
+ (nop)
+ )
+ )
+ (func $b17
+ (block $a
+ (if
+ (i32.const 0)
+ (block $block1
+ (nop)
+ )
+ (block $block3
+ (nop)
+ )
+ )
+ )
+ (block $a
+ (if
+ (i32.const 0)
+ (i32.const 1)
+ (block $block6
+ (nop)
+ )
+ )
+ )
+ (block $a
+ (if
+ (i32.const 0)
+ (block $block8
+ (nop)
+ )
+ (i32.const 1)
+ )
+ )
+ (block $c
+ (block $b
+ (if
+ (i32.const 0)
+ (block $block11
+ (nop)
+ )
+ (block $block13
+ (nop)
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast
index 8e1a557ef..2b3fb14d3 100644
--- a/test/passes/remove-unused-brs.wast
+++ b/test/passes/remove-unused-brs.wast
@@ -157,5 +157,78 @@
)
)
)
+ (func $b16
+ (block $a
+ (block $b
+ (block $c
+ (br $a)
+ )
+ (br $a)
+ )
+ (br $a)
+ )
+ (block $a
+ (block $b
+ (block $c
+ (br $c)
+ )
+ (br $b)
+ )
+ (br $a)
+ )
+ (block $a
+ (block $b
+ (block $c
+ (br $b)
+ )
+ (br $a)
+ )
+ (br $a)
+ )
+ )
+ (func $b17
+ (block $a
+ (if
+ (i32.const 0)
+ (block
+ (br $a)
+ )
+ (block
+ (br $a)
+ )
+ )
+ )
+ (block $a
+ (if
+ (i32.const 0)
+ (i32.const 1)
+ (block
+ (br $a)
+ )
+ )
+ )
+ (block $a
+ (if
+ (i32.const 0)
+ (block
+ (br $a)
+ )
+ (i32.const 1)
+ )
+ )
+ (block $c
+ (block $b
+ (if
+ (i32.const 0)
+ (block
+ (br $b)
+ )
+ (block
+ (br $c)
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index bb76b2d82..d604cfa08 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -4,5 +4,28 @@
(i32.const 50)
(i32.const 51)
(i32.const 52)
+ (block $waka1
+ (i32.const 53)
+ (br $waka1)
+ )
+ (block $waka2
+ (br $waka2)
+ )
+ (block $waka3
+ (br_table $waka3 $waka3 $waka3
+ (i32.const 57)
+ )
+ )
+ (if
+ (i32.eqz
+ (i32.const 100)
+ )
+ (i32.const 101)
+ )
+ (if
+ (i32.const 102)
+ (i32.const 103)
+ )
+ (i32.const 104)
)
)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index 24dc32bcb..28125b969 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -7,6 +7,37 @@
(nop)
(nop)
(i32.const 52)
+ (block $waka1
+ (i32.const 53)
+ (br $waka1)
+ (i32.const 54)
+ )
+ (block $waka2
+ (nop)
+ (br $waka2)
+ (i32.const 56)
+ )
+ (block $waka3
+ (br_table $waka3 $waka3 $waka3
+ (i32.const 57)
+ )
+ (i32.const 58)
+ )
+ (if
+ (i32.const 100)
+ (nop)
+ (i32.const 101)
+ )
+ (if
+ (i32.const 102)
+ (i32.const 103)
+ (nop)
+ )
+ (if
+ (i32.const 104)
+ (nop)
+ (nop)
+ )
)
)
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 0b43f14fc..f3d978c88 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -222,15 +222,12 @@
)
(loop $while-out$10 $while-in$11
(br $while-out$10)
- (br $while-in$11)
)
(br $label$break$Lout)
)
(loop $while-out$13 $while-in$14
(br $label$break$Lout)
- (br $while-in$14)
)
- (br $label$break$Lout)
)
)
(loop $label$break$L1 $label$continue$L1
@@ -249,13 +246,11 @@
)
)
(br $label$break$L1)
- (br $switch$17)
)
(i32.const 1)
(br $switch$17)
)
(br $label$break$L3)
- (br $switch$17)
)
(br $label$break$L1)
)
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index f5ba55d90..5df8aef72 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -216,15 +216,12 @@
)
(loop $while-out$10 $while-in$11
(br $while-out$10)
- (br $while-in$11)
)
(br $label$break$Lout)
)
(loop $while-out$13 $while-in$14
(br $label$break$Lout)
- (br $while-in$14)
)
- (br $label$break$Lout)
)
)
(loop $label$break$L1 $label$continue$L1
@@ -243,13 +240,11 @@
)
)
(br $label$break$L1)
- (br $switch$17)
)
(i32.const 1)
(br $switch$17)
)
(br $label$break$L3)
- (br $switch$17)
)
(br $label$break$L1)
)