summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/passes/SimplifyLocals.cpp72
-rw-r--r--test/emcc_O2_hello_world.fromasm294
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp294
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise382
-rw-r--r--test/emcc_hello_world.fromasm1075
-rw-r--r--test/emcc_hello_world.fromasm.clamp1075
-rw-r--r--test/emcc_hello_world.fromasm.imprecise1075
-rw-r--r--test/memorygrowth.fromasm477
-rw-r--r--test/memorygrowth.fromasm.clamp477
-rw-r--r--test/memorygrowth.fromasm.imprecise477
-rw-r--r--test/passes/inlining-optimizing_optimize-level=3.txt5745
-rw-r--r--test/passes/simplify-locals.txt124
-rw-r--r--test/passes/simplify-locals.wast70
-rw-r--r--test/wasm-only.fromasm38
-rw-r--r--test/wasm-only.fromasm.clamp38
-rw-r--r--test/wasm-only.fromasm.imprecise38
16 files changed, 5927 insertions, 5824 deletions
diff --git a/src/passes/SimplifyLocals.cpp b/src/passes/SimplifyLocals.cpp
index f3645c1f3..75dadfbac 100644
--- a/src/passes/SimplifyLocals.cpp
+++ b/src/passes/SimplifyLocals.cpp
@@ -195,9 +195,7 @@ struct SimplifyLocals : public WalkerPass<LinearExecutionWalker<SimplifyLocals<a
void visitLoop(Loop* curr) {
if (allowStructure) {
- if (canUseLoopReturnValue(curr)) {
- loops.push_back(this->getCurrentPointer());
- }
+ optimizeLoopReturn(curr);
}
}
@@ -335,7 +333,37 @@ struct SimplifyLocals : public WalkerPass<LinearExecutionWalker<SimplifyLocals<a
std::vector<Block*> blocksToEnlarge;
std::vector<If*> ifsToEnlarge;
- std::vector<Expression**> loops;
+ std::vector<Loop*> loopsToEnlarge;
+
+ void optimizeLoopReturn(Loop* loop) {
+ // If there is a sinkable thing in an eligible loop, we can optimize
+ // it in a trivial way to the outside of the loop.
+ if (loop->type != none) return;
+ if (sinkables.empty()) return;
+ Index goodIndex = sinkables.begin()->first;
+ // Ensure we have a place to write the return values for, if not, we
+ // need another cycle.
+ auto* block = loop->body->dynCast<Block>();
+ if (!block || block->name.is() || block->list.size() == 0 || !block->list.back()->is<Nop>()) {
+ loopsToEnlarge.push_back(loop);
+ return;
+ }
+ Builder builder(*this->getModule());
+ auto** item = sinkables.at(goodIndex).item;
+ auto* set = (*item)->template cast<SetLocal>();
+ block->list[block->list.size() - 1] = set->value;
+ *item = builder.makeNop();
+ block->finalize();
+ assert(block->type != none);
+ loop->finalize();
+ set->value = loop;
+ set->finalize();
+ this->replaceCurrent(set);
+ // We moved things around, clear all tracking; we'll do another cycle
+ // anyhow.
+ sinkables.clear();
+ anotherCycle = true;
+ }
void optimizeBlockReturn(Block* block) {
if (!block->name.is() || unoptimizableBlocks.count(block->name) > 0) {
@@ -685,23 +713,18 @@ struct SimplifyLocals : public WalkerPass<LinearExecutionWalker<SimplifyLocals<a
ifsToEnlarge.clear();
anotherCycle = true;
}
- // handle loops. note that a lot happens in this pass, and we can't just modify
- // set_locals when we see a loop - it might be tracked - and we can't also just
- // assume our loop didn't move either (might be in a block now). So we do this
- // when all other work is done - as loop return values are rare, that is fine.
- if (!anotherCycle) {
- for (auto* currp : loops) {
- auto* curr = (*currp)->template cast<Loop>();
- assert(canUseLoopReturnValue(curr));
- auto* set = curr->body->template cast<SetLocal>();
- curr->body = set->value;
- set->value = curr;
- curr->finalize(curr->body->type);
- *currp = set;
- anotherCycle = true;
+ // enlarge loops that were marked, for the next round
+ if (loopsToEnlarge.size() > 0) {
+ for (auto* loop : loopsToEnlarge) {
+ auto block = Builder(*this->getModule()).blockifyWithName(loop->body, Name());
+ loop->body = block;
+ if (block->list.size() == 0 || !block->list.back()->template is<Nop>()) {
+ block->list.push_back(this->getModule()->allocator.template alloc<Nop>());
+ }
}
+ loopsToEnlarge.clear();
+ anotherCycle = true;
}
- loops.clear();
// clean up
sinkables.clear();
blockBreaks.clear();
@@ -847,17 +870,6 @@ struct SimplifyLocals : public WalkerPass<LinearExecutionWalker<SimplifyLocals<a
return eqOpter.anotherCycle || setRemover.anotherCycle;
}
-
- bool canUseLoopReturnValue(Loop* curr) {
- // Optimizing a loop return value is trivial: just see if it contains
- // a set_local, and pull that out.
- if (auto* set = curr->body->template dynCast<SetLocal>()) {
- if (isConcreteType(set->value->type)) {
- return true;
- }
- }
- return false;
- }
};
Pass *createSimplifyLocalsPass() {
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index 9353b7716..ef82ed708 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -1512,81 +1512,83 @@
(set_local $7
(get_local $14)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $0
- (i32.sub
- (tee_local $22
- (i32.and
- (i32.load offset=4
- (get_local $7)
+ (set_local $8
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $0
+ (i32.sub
+ (tee_local $22
+ (i32.and
+ (i32.load offset=4
+ (get_local $7)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $1)
)
- (get_local $1)
)
+ (get_local $10)
)
- (get_local $10)
- )
- (set_local $6
- (if (result i32)
- (i32.eq
- (get_local $1)
- (get_local $22)
- )
- (block
- (set_local $29
- (get_local $0)
+ (set_local $6
+ (if (result i32)
+ (i32.eq
+ (get_local $1)
+ (get_local $22)
)
- (set_local $26
- (get_local $7)
+ (block
+ (set_local $29
+ (get_local $0)
+ )
+ (set_local $26
+ (get_local $7)
+ )
+ (set_local $30
+ (get_local $7)
+ )
+ (set_local $10
+ (i32.const 90)
+ )
+ (br $label$break$L123)
)
- (set_local $30
+ (block (result i32)
+ (set_local $10
+ (get_local $0)
+ )
(get_local $7)
)
- (set_local $10
- (i32.const 90)
- )
- (br $label$break$L123)
- )
- (block (result i32)
- (set_local $10
- (get_local $0)
- )
- (get_local $7)
)
)
)
- )
- (set_local $22
- (select
- (get_local $18)
- (tee_local $0
- (i32.load offset=20
- (get_local $7)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $0)
+ (set_local $22
+ (select
+ (get_local $18)
+ (tee_local $0
+ (i32.load offset=20
+ (get_local $7)
+ )
)
- (i32.eq
- (get_local $0)
- (tee_local $7
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $0)
+ )
+ (i32.eq
+ (get_local $0)
+ (tee_local $7
+ (i32.load
(i32.add
- (get_local $7)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $7)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1594,8 +1596,6 @@
)
)
)
- )
- (set_local $8
(if (result i32)
(tee_local $0
(i32.eqz
@@ -1814,60 +1814,60 @@
(get_local $10)
(i32.const 90)
)
- (loop $while-in16
- (set_local $10
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $6
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $26)
+ (set_local $2
+ (loop $while-in16 (result i32)
+ (set_local $10
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $6
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $26)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $1)
)
- (get_local $1)
)
+ (get_local $29)
)
- (get_local $29)
)
- )
- (set_local $8
- (select
- (get_local $6)
- (get_local $29)
- (get_local $3)
- )
- )
- (set_local $6
- (select
- (get_local $26)
- (get_local $30)
- (get_local $3)
+ (set_local $8
+ (select
+ (get_local $6)
+ (get_local $29)
+ (get_local $3)
+ )
)
- )
- (if
- (tee_local $3
- (i32.load offset=16
+ (set_local $6
+ (select
(get_local $26)
+ (get_local $30)
+ (get_local $3)
)
)
- (block
- (set_local $29
- (get_local $8)
- )
- (set_local $26
- (get_local $3)
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $26)
+ )
)
- (set_local $30
- (get_local $6)
+ (block
+ (set_local $29
+ (get_local $8)
+ )
+ (set_local $26
+ (get_local $3)
+ )
+ (set_local $30
+ (get_local $6)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (set_local $2
(if (result i32)
(tee_local $26
(i32.load offset=20
@@ -6174,29 +6174,29 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $10
- (i32.load
- (tee_local $7
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (set_local $7
+ (loop $while-in (result i32)
+ (if
+ (tee_local $10
+ (i32.load
+ (tee_local $7
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
)
)
)
- )
- (block
- (set_local $0
- (get_local $10)
- )
- (set_local $4
- (get_local $7)
+ (block
+ (set_local $0
+ (get_local $10)
+ )
+ (set_local $4
+ (get_local $7)
+ )
+ (br $while-in)
)
- (br $while-in)
)
- )
- (set_local $7
(if (result i32)
(tee_local $10
(i32.load
@@ -8314,40 +8314,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/emcc_O2_hello_world.fromasm.clamp b/test/emcc_O2_hello_world.fromasm.clamp
index 9353b7716..ef82ed708 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp
+++ b/test/emcc_O2_hello_world.fromasm.clamp
@@ -1512,81 +1512,83 @@
(set_local $7
(get_local $14)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $0
- (i32.sub
- (tee_local $22
- (i32.and
- (i32.load offset=4
- (get_local $7)
+ (set_local $8
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $0
+ (i32.sub
+ (tee_local $22
+ (i32.and
+ (i32.load offset=4
+ (get_local $7)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $1)
)
- (get_local $1)
)
+ (get_local $10)
)
- (get_local $10)
- )
- (set_local $6
- (if (result i32)
- (i32.eq
- (get_local $1)
- (get_local $22)
- )
- (block
- (set_local $29
- (get_local $0)
+ (set_local $6
+ (if (result i32)
+ (i32.eq
+ (get_local $1)
+ (get_local $22)
)
- (set_local $26
- (get_local $7)
+ (block
+ (set_local $29
+ (get_local $0)
+ )
+ (set_local $26
+ (get_local $7)
+ )
+ (set_local $30
+ (get_local $7)
+ )
+ (set_local $10
+ (i32.const 90)
+ )
+ (br $label$break$L123)
)
- (set_local $30
+ (block (result i32)
+ (set_local $10
+ (get_local $0)
+ )
(get_local $7)
)
- (set_local $10
- (i32.const 90)
- )
- (br $label$break$L123)
- )
- (block (result i32)
- (set_local $10
- (get_local $0)
- )
- (get_local $7)
)
)
)
- )
- (set_local $22
- (select
- (get_local $18)
- (tee_local $0
- (i32.load offset=20
- (get_local $7)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $0)
+ (set_local $22
+ (select
+ (get_local $18)
+ (tee_local $0
+ (i32.load offset=20
+ (get_local $7)
+ )
)
- (i32.eq
- (get_local $0)
- (tee_local $7
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $0)
+ )
+ (i32.eq
+ (get_local $0)
+ (tee_local $7
+ (i32.load
(i32.add
- (get_local $7)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $7)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1594,8 +1596,6 @@
)
)
)
- )
- (set_local $8
(if (result i32)
(tee_local $0
(i32.eqz
@@ -1814,60 +1814,60 @@
(get_local $10)
(i32.const 90)
)
- (loop $while-in16
- (set_local $10
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $6
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $26)
+ (set_local $2
+ (loop $while-in16 (result i32)
+ (set_local $10
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $6
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $26)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $1)
)
- (get_local $1)
)
+ (get_local $29)
)
- (get_local $29)
)
- )
- (set_local $8
- (select
- (get_local $6)
- (get_local $29)
- (get_local $3)
- )
- )
- (set_local $6
- (select
- (get_local $26)
- (get_local $30)
- (get_local $3)
+ (set_local $8
+ (select
+ (get_local $6)
+ (get_local $29)
+ (get_local $3)
+ )
)
- )
- (if
- (tee_local $3
- (i32.load offset=16
+ (set_local $6
+ (select
(get_local $26)
+ (get_local $30)
+ (get_local $3)
)
)
- (block
- (set_local $29
- (get_local $8)
- )
- (set_local $26
- (get_local $3)
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $26)
+ )
)
- (set_local $30
- (get_local $6)
+ (block
+ (set_local $29
+ (get_local $8)
+ )
+ (set_local $26
+ (get_local $3)
+ )
+ (set_local $30
+ (get_local $6)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (set_local $2
(if (result i32)
(tee_local $26
(i32.load offset=20
@@ -6174,29 +6174,29 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $10
- (i32.load
- (tee_local $7
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (set_local $7
+ (loop $while-in (result i32)
+ (if
+ (tee_local $10
+ (i32.load
+ (tee_local $7
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
)
)
)
- )
- (block
- (set_local $0
- (get_local $10)
- )
- (set_local $4
- (get_local $7)
+ (block
+ (set_local $0
+ (get_local $10)
+ )
+ (set_local $4
+ (get_local $7)
+ )
+ (br $while-in)
)
- (br $while-in)
)
- )
- (set_local $7
(if (result i32)
(tee_local $10
(i32.load
@@ -8314,40 +8314,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index 50a771da2..a4811773e 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -1511,81 +1511,83 @@
(set_local $7
(get_local $14)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $0
- (i32.sub
- (tee_local $22
- (i32.and
- (i32.load offset=4
- (get_local $7)
+ (set_local $8
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $0
+ (i32.sub
+ (tee_local $22
+ (i32.and
+ (i32.load offset=4
+ (get_local $7)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $1)
)
- (get_local $1)
)
+ (get_local $10)
)
- (get_local $10)
- )
- (set_local $6
- (if (result i32)
- (i32.eq
- (get_local $1)
- (get_local $22)
- )
- (block
- (set_local $29
- (get_local $0)
+ (set_local $6
+ (if (result i32)
+ (i32.eq
+ (get_local $1)
+ (get_local $22)
)
- (set_local $26
- (get_local $7)
+ (block
+ (set_local $29
+ (get_local $0)
+ )
+ (set_local $26
+ (get_local $7)
+ )
+ (set_local $30
+ (get_local $7)
+ )
+ (set_local $10
+ (i32.const 90)
+ )
+ (br $label$break$L123)
)
- (set_local $30
+ (block (result i32)
+ (set_local $10
+ (get_local $0)
+ )
(get_local $7)
)
- (set_local $10
- (i32.const 90)
- )
- (br $label$break$L123)
- )
- (block (result i32)
- (set_local $10
- (get_local $0)
- )
- (get_local $7)
)
)
)
- )
- (set_local $22
- (select
- (get_local $18)
- (tee_local $0
- (i32.load offset=20
- (get_local $7)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $0)
+ (set_local $22
+ (select
+ (get_local $18)
+ (tee_local $0
+ (i32.load offset=20
+ (get_local $7)
+ )
)
- (i32.eq
- (get_local $0)
- (tee_local $7
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $0)
+ )
+ (i32.eq
+ (get_local $0)
+ (tee_local $7
+ (i32.load
(i32.add
- (get_local $7)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $7)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1593,8 +1595,6 @@
)
)
)
- )
- (set_local $8
(if (result i32)
(tee_local $0
(i32.eqz
@@ -1808,99 +1808,101 @@
)
)
)
- (if
- (i32.eq
- (get_local $10)
- (i32.const 90)
- )
- (loop $while-in16
- (set_local $10
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $6
- (i32.sub
- (i32.and
- (i32.load offset=4
+ (if (result i32)
+ (select
+ (block (result i32)
+ (if
+ (i32.eq
+ (get_local $10)
+ (i32.const 90)
+ )
+ (set_local $2
+ (loop $while-in16 (result i32)
+ (set_local $10
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $6
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $26)
+ )
+ (i32.const -8)
+ )
+ (get_local $1)
+ )
+ )
+ (get_local $29)
+ )
+ )
+ (set_local $8
+ (select
+ (get_local $6)
+ (get_local $29)
+ (get_local $3)
+ )
+ )
+ (set_local $6
+ (select
(get_local $26)
+ (get_local $30)
+ (get_local $3)
+ )
+ )
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $26)
+ )
+ )
+ (block
+ (set_local $29
+ (get_local $8)
+ )
+ (set_local $26
+ (get_local $3)
+ )
+ (set_local $30
+ (get_local $6)
+ )
+ (br $while-in16)
+ )
+ )
+ (if (result i32)
+ (tee_local $26
+ (i32.load offset=20
+ (get_local $26)
+ )
+ )
+ (block
+ (set_local $29
+ (get_local $8)
+ )
+ (set_local $30
+ (get_local $6)
+ )
+ (br $while-in16)
+ )
+ (block (result i32)
+ (set_local $12
+ (get_local $6)
+ )
+ (get_local $8)
)
- (i32.const -8)
)
- (get_local $1)
)
)
- (get_local $29)
- )
- )
- (set_local $8
- (select
- (get_local $6)
- (get_local $29)
- (get_local $3)
- )
- )
- (set_local $6
- (select
- (get_local $26)
- (get_local $30)
- (get_local $3)
- )
- )
- (if
- (tee_local $3
- (i32.load offset=16
- (get_local $26)
- )
- )
- (block
- (set_local $29
- (get_local $8)
- )
- (set_local $26
- (get_local $3)
- )
- (set_local $30
- (get_local $6)
- )
- (br $while-in16)
)
- )
- (set_local $2
- (if (result i32)
- (tee_local $26
- (i32.load offset=20
- (get_local $26)
- )
- )
- (block
- (set_local $29
- (get_local $8)
- )
- (set_local $30
- (get_local $6)
- )
- (br $while-in16)
- )
- (block (result i32)
- (set_local $12
- (get_local $6)
+ (i32.lt_u
+ (get_local $2)
+ (i32.sub
+ (i32.load
+ (i32.const 184)
)
- (get_local $8)
- )
- )
- )
- )
- )
- (if (result i32)
- (select
- (i32.lt_u
- (get_local $2)
- (i32.sub
- (i32.load
- (i32.const 184)
+ (get_local $1)
)
- (get_local $1)
)
)
(i32.const 0)
@@ -6173,29 +6175,29 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $10
- (i32.load
- (tee_local $7
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (set_local $7
+ (loop $while-in (result i32)
+ (if
+ (tee_local $10
+ (i32.load
+ (tee_local $7
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
)
)
)
- )
- (block
- (set_local $0
- (get_local $10)
- )
- (set_local $4
- (get_local $7)
+ (block
+ (set_local $0
+ (get_local $10)
+ )
+ (set_local $4
+ (get_local $7)
+ )
+ (br $while-in)
)
- (br $while-in)
)
- )
- (set_local $7
(if (result i32)
(tee_local $10
(i32.load
@@ -8305,40 +8307,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index 08d4aa13c..64161ac8c 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -302,14 +302,14 @@
(i32.const 775)
)
(loop $while-in1
- (loop $while-in3
- (set_local $2
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (set_local $0
+ (loop $while-in3 (result i32)
+ (set_local $2
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
- )
- (set_local $0
(if (result i32)
(i32.load8_s
(get_local $0)
@@ -1890,32 +1890,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
)
)
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)
@@ -2568,7 +2568,7 @@
(set_local $11
(i32.const 0)
)
- (loop $while-in4
+ (loop $while-in4 (result i32)
(if
(i32.eqz
(i32.and
@@ -2629,11 +2629,11 @@
(i32.const 32)
)
)
+ (set_local $6
+ (get_local $1)
+ )
+ (get_local $11)
)
- (set_local $6
- (get_local $1)
- )
- (get_local $11)
)
(i32.const 0)
)
@@ -3108,33 +3108,33 @@
(set_local $9
(i32.const 0)
)
- (loop $while-in13
- (if
- (i32.gt_u
- (tee_local $12
- (i32.add
- (i32.load8_s
- (get_local $8)
+ (set_local $19
+ (loop $while-in13 (result i32)
+ (if
+ (i32.gt_u
+ (tee_local $12
+ (i32.add
+ (i32.load8_s
+ (get_local $8)
+ )
+ (i32.const -65)
)
- (i32.const -65)
)
+ (i32.const 57)
)
- (i32.const 57)
- )
- (block
- (set_local $17
- (i32.const -1)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (set_local $10
- (i32.add
- (get_local $8)
- (i32.const 1)
+ (set_local $10
+ (i32.add
+ (get_local $8)
+ (i32.const 1)
+ )
)
- )
- (set_local $19
(if (result i32)
(i32.lt_u
(i32.add
@@ -4619,82 +4619,111 @@
(set_local $5
(get_local $7)
)
- (loop $while-in70
- (set_local $13
- (select
- (i32.const 9)
- (tee_local $7
- (i32.sub
- (i32.const 0)
- (get_local $9)
- )
- )
- (i32.gt_s
- (get_local $7)
+ (set_local $5
+ (loop $while-in70 (result i32)
+ (set_local $13
+ (select
(i32.const 9)
- )
- )
- )
- (if
- (i32.lt_u
- (get_local $6)
- (get_local $5)
- )
- (block $do-once71
- (set_local $12
- (i32.add
- (i32.shl
- (i32.const 1)
- (get_local $13)
+ (tee_local $7
+ (i32.sub
+ (i32.const 0)
+ (get_local $9)
)
- (i32.const -1)
)
- )
- (set_local $37
- (i32.shr_u
- (i32.const 1000000000)
- (get_local $13)
+ (i32.gt_s
+ (get_local $7)
+ (i32.const 9)
)
)
- (set_local $9
- (i32.const 0)
- )
- (set_local $7
+ )
+ (if
+ (i32.lt_u
(get_local $6)
+ (get_local $5)
)
- (loop $while-in74
- (i32.store
- (get_local $7)
+ (block $do-once71
+ (set_local $12
(i32.add
- (get_local $9)
- (i32.shr_u
- (tee_local $9
- (i32.load
- (get_local $7)
- )
- )
+ (i32.shl
+ (i32.const 1)
(get_local $13)
)
+ (i32.const -1)
+ )
+ )
+ (set_local $37
+ (i32.shr_u
+ (i32.const 1000000000)
+ (get_local $13)
)
)
(set_local $9
- (i32.mul
- (i32.and
+ (i32.const 0)
+ )
+ (set_local $7
+ (get_local $6)
+ )
+ (loop $while-in74
+ (i32.store
+ (get_local $7)
+ (i32.add
(get_local $9)
- (get_local $12)
+ (i32.shr_u
+ (tee_local $9
+ (i32.load
+ (get_local $7)
+ )
+ )
+ (get_local $13)
+ )
)
- (get_local $37)
)
- )
- (br_if $while-in74
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (set_local $9
+ (i32.mul
+ (i32.and
+ (get_local $9)
+ (get_local $12)
+ )
+ (get_local $37)
+ )
+ )
+ (br_if $while-in74
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
)
+ (get_local $5)
)
+ )
+ )
+ (set_local $7
+ (select
+ (get_local $6)
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
+ (i32.load
+ (get_local $6)
+ )
+ )
+ )
+ (br_if $do-once71
+ (i32.eqz
+ (get_local $9)
+ )
+ )
+ (i32.store
+ (get_local $5)
+ (get_local $9)
+ )
+ (set_local $5
+ (i32.add
(get_local $5)
+ (i32.const 4)
)
)
)
@@ -4710,75 +4739,46 @@
)
)
)
- (br_if $do-once71
- (i32.eqz
- (get_local $9)
- )
- )
- (i32.store
- (get_local $5)
- (get_local $9)
- )
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 4)
- )
- )
)
- (set_local $7
+ (set_local $12
(select
- (get_local $6)
(i32.add
- (get_local $6)
- (i32.const 4)
- )
- (i32.load
- (get_local $6)
- )
- )
- )
- )
- (set_local $12
- (select
- (i32.add
- (tee_local $6
- (select
- (get_local $8)
- (get_local $7)
- (get_local $31)
+ (tee_local $6
+ (select
+ (get_local $8)
+ (get_local $7)
+ (get_local $31)
+ )
+ )
+ (i32.shl
+ (get_local $21)
+ (i32.const 2)
)
)
- (i32.shl
- (get_local $21)
- (i32.const 2)
- )
- )
- (get_local $5)
- (i32.gt_s
- (i32.shr_s
- (i32.sub
- (get_local $5)
- (get_local $6)
+ (get_local $5)
+ (i32.gt_s
+ (i32.shr_s
+ (i32.sub
+ (get_local $5)
+ (get_local $6)
+ )
+ (i32.const 2)
)
- (i32.const 2)
+ (get_local $21)
)
- (get_local $21)
)
)
- )
- (i32.store
- (get_local $20)
- (tee_local $9
- (i32.add
- (i32.load
- (get_local $20)
+ (i32.store
+ (get_local $20)
+ (tee_local $9
+ (i32.add
+ (i32.load
+ (get_local $20)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
- )
- (set_local $5
(if (result i32)
(i32.lt_s
(get_local $9)
@@ -5800,112 +5800,110 @@
)
)
)
- (if
- (i32.and
- (i32.lt_u
- (get_local $7)
- (get_local $9)
- )
- (i32.gt_s
- (get_local $5)
- (i32.const 0)
- )
- )
- (loop $while-in110
- (if
- (i32.gt_u
- (tee_local $6
- (call $_fmt_u
- (i32.load
- (get_local $7)
- )
- (i32.const 0)
- (get_local $29)
- )
+ (call $_pad
+ (get_local $0)
+ (i32.const 48)
+ (i32.add
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (get_local $7)
+ (get_local $9)
)
- (get_local $23)
- )
- (loop $while-in112
- (i32.store8
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -1)
- )
- )
- (i32.const 48)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 0)
)
- (br_if $while-in112
+ )
+ (loop $while-in110 (result i32)
+ (if
(i32.gt_u
- (get_local $6)
+ (tee_local $6
+ (call $_fmt_u
+ (i32.load
+ (get_local $7)
+ )
+ (i32.const 0)
+ (get_local $29)
+ )
+ )
(get_local $23)
)
- )
- )
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (loop $while-in112
+ (i32.store8
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in112
+ (i32.gt_u
+ (get_local $6)
+ (get_local $23)
+ )
+ )
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $6)
- (select
- (i32.const 9)
- (get_local $5)
- (i32.gt_s
- (get_local $5)
- (i32.const 9)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
)
)
- (get_local $0)
- )
- )
- )
- (set_local $6
- (i32.add
- (get_local $5)
- (i32.const -9)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.and
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (drop
+ (call $___fwritex
+ (get_local $6)
+ (select
+ (i32.const 9)
+ (get_local $5)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
+ (get_local $0)
)
- (get_local $9)
)
- (i32.gt_s
+ )
+ (set_local $6
+ (i32.add
(get_local $5)
- (i32.const 9)
+ (i32.const -9)
)
)
- (block
- (set_local $5
- (get_local $6)
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (get_local $9)
+ )
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
- (br $while-in110)
+ (block
+ (set_local $5
+ (get_local $6)
+ )
+ (br $while-in110)
+ )
+ (get_local $6)
)
- (get_local $6)
)
+ (get_local $5)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (i32.add
- (get_local $5)
(i32.const 9)
)
(i32.const 9)
@@ -5944,7 +5942,7 @@
(set_local $7
(get_local $5)
)
- (loop $while-in114
+ (loop $while-in114 (result i32)
(if
(i32.eq
(tee_local $5
@@ -6102,8 +6100,8 @@
)
)
)
+ (get_local $7)
)
- (get_local $7)
)
(get_local $5)
)
@@ -6300,45 +6298,45 @@
(set_local $8
(get_local $25)
)
- (loop $while-in123
- (i32.store8
- (tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
- )
- )
- (i32.or
- (get_local $9)
- (i32.load8_u
+ (set_local $7
+ (loop $while-in123 (result i32)
+ (i32.store8
+ (tee_local $8
(i32.add
- (i32.and
- (get_local $7)
- (i32.const 15)
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (get_local $9)
+ (i32.load8_u
+ (i32.add
+ (i32.and
+ (get_local $7)
+ (i32.const 15)
+ )
+ (i32.const 4075)
)
- (i32.const 4075)
)
)
)
- )
- (br_if $while-in123
- (i32.or
- (tee_local $7
- (call $_bitshift64Lshr
- (get_local $7)
- (get_local $11)
- (i32.const 4)
+ (br_if $while-in123
+ (i32.or
+ (tee_local $7
+ (call $_bitshift64Lshr
+ (get_local $7)
+ (get_local $11)
+ (i32.const 4)
+ )
+ )
+ (tee_local $11
+ (get_global $tempRet0)
)
- )
- (tee_local $11
- (get_global $tempRet0)
)
)
+ (get_local $8)
)
)
- (set_local $7
- (get_local $8)
- )
(set_local $8
(if (result i32)
(i32.or
@@ -6539,7 +6537,7 @@
(get_local $14)
)
)
- (loop $while-in127
+ (loop $while-in127 (result i32)
(drop
(br_if $__rjti$7
(get_local $5)
@@ -6600,8 +6598,8 @@
(get_local $5)
)
)
+ (get_local $5)
)
- (get_local $5)
)
(i32.const 0)
)
@@ -6798,99 +6796,95 @@
(i32.eqz
(get_local $0)
)
- (if
- (get_local $1)
- (block
- (set_local $0
- (i32.const 1)
- )
- (loop $while-in130
- (if
- (tee_local $1
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (set_local $17
+ (if (result i32)
+ (get_local $1)
+ (block (result i32)
+ (set_local $0
+ (i32.const 1)
+ )
+ (loop $while-in130
+ (if
+ (tee_local $1
+ (i32.load
+ (i32.add
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
- (get_local $4)
)
)
- )
- (block
- (call $_pop_arg_336
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 3)
- )
- (get_local $3)
- )
- (get_local $1)
- (get_local $2)
- )
- (br_if $while-in130
- (i32.lt_s
- (tee_local $0
- (i32.add
+ (block
+ (call $_pop_arg_336
+ (i32.add
+ (i32.shl
(get_local $0)
- (i32.const 1)
+ (i32.const 3)
)
+ (get_local $3)
)
- (i32.const 10)
+ (get_local $1)
+ (get_local $2)
)
- )
- (set_local $17
- (i32.const 1)
- )
- (br $label$break$L343)
- )
- )
- )
- (if
- (i32.lt_s
- (get_local $0)
- (i32.const 10)
- )
- (loop $while-in132
- (if
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (br_if $while-in130
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
)
- (get_local $4)
)
- )
- (block
(set_local $17
- (i32.const -1)
+ (i32.const 1)
)
(br $label$break$L343)
)
)
- (br_if $while-in132
- (i32.lt_s
- (tee_local $0
+ )
+ (if (result i32)
+ (i32.lt_s
+ (get_local $0)
+ (i32.const 10)
+ )
+ (loop $while-in132 (result i32)
+ (if
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 1)
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
)
- (i32.const 10)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L343)
+ )
+ )
+ (br_if $while-in132
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
+ )
)
- )
- (set_local $17
(i32.const 1)
)
- )
- (set_local $17
(i32.const 1)
)
)
- )
- (set_local $17
(i32.const 0)
)
)
@@ -7318,34 +7312,34 @@
(i32.const 0)
)
)
- (loop $while-in
- (i32.store8
- (tee_local $2
- (i32.add
- (get_local $2)
- (i32.const -1)
+ (set_local $0
+ (loop $while-in (result i32)
+ (i32.store8
+ (tee_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (call $___uremdi3
+ (get_local $0)
+ (get_local $1)
+ (i32.const 10)
+ )
+ (i32.const 48)
)
)
- (i32.or
- (call $___uremdi3
+ (set_local $3
+ (call $___udivdi3
(get_local $0)
(get_local $1)
(i32.const 10)
)
- (i32.const 48)
)
- )
- (set_local $3
- (call $___udivdi3
- (get_local $0)
- (get_local $1)
- (i32.const 10)
+ (set_local $4
+ (get_global $tempRet0)
)
- )
- (set_local $4
- (get_global $tempRet0)
- )
- (set_local $0
(if (result i32)
(i32.or
(i32.and
@@ -8944,107 +8938,109 @@
)
(block $__rjto$3
(block $__rjti$3
- (if
- (tee_local $0
- (i32.load offset=480
- (i32.shl
- (get_local $14)
- (i32.const 2)
+ (set_local $0
+ (if (result i32)
+ (tee_local $0
+ (i32.load offset=480
+ (i32.shl
+ (get_local $14)
+ (i32.const 2)
+ )
)
)
- )
- (block
- (set_local $9
- (i32.shl
- (get_local $2)
- (select
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
+ (block (result i32)
+ (set_local $9
+ (i32.shl
+ (get_local $2)
+ (select
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
+ (get_local $14)
+ (i32.const 1)
+ )
+ )
+ (i32.eq
(get_local $14)
- (i32.const 1)
+ (i32.const 31)
)
)
- (i32.eq
- (get_local $14)
- (i32.const 31)
- )
)
)
- )
- (set_local $1
- (i32.const 0)
- )
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (tee_local $12
- (i32.and
- (i32.load offset=4
- (get_local $0)
+ (set_local $1
+ (i32.const 0)
+ )
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (tee_local $12
+ (i32.and
+ (i32.load offset=4
+ (get_local $0)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $3)
)
- (get_local $3)
- )
- (set_local $1
- (if (result i32)
- (i32.eq
- (get_local $2)
- (get_local $12)
- )
- (block
- (set_local $1
- (get_local $4)
+ (set_local $1
+ (if (result i32)
+ (i32.eq
+ (get_local $2)
+ (get_local $12)
)
- (set_local $3
- (get_local $0)
+ (block
+ (set_local $1
+ (get_local $4)
+ )
+ (set_local $3
+ (get_local $0)
+ )
+ (br $__rjti$3)
)
- (br $__rjti$3)
- )
- (block (result i32)
- (set_local $3
- (get_local $4)
+ (block (result i32)
+ (set_local $3
+ (get_local $4)
+ )
+ (get_local $0)
)
- (get_local $0)
)
)
)
- )
- (set_local $0
- (select
- (get_local $5)
- (tee_local $4
- (i32.load offset=20
- (get_local $0)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $4)
+ (set_local $0
+ (select
+ (get_local $5)
+ (tee_local $4
+ (i32.load offset=20
+ (get_local $0)
+ )
)
- (i32.eq
- (get_local $4)
- (tee_local $12
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $4)
+ )
+ (i32.eq
+ (get_local $4)
+ (tee_local $12
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $9)
- (i32.const 31)
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $9)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -9052,21 +9048,19 @@
)
)
)
- )
- (set_local $4
- (i32.shl
- (get_local $9)
- (i32.xor
- (tee_local $5
- (i32.eqz
- (get_local $12)
+ (set_local $4
+ (i32.shl
+ (get_local $9)
+ (i32.xor
+ (tee_local $5
+ (i32.eqz
+ (get_local $12)
+ )
)
+ (i32.const 1)
)
- (i32.const 1)
)
)
- )
- (set_local $0
(if (result i32)
(get_local $5)
(block (result i32)
@@ -9090,12 +9084,10 @@
)
)
)
- )
- (block
- (set_local $4
- (i32.const 0)
- )
- (set_local $0
+ (block (result i32)
+ (set_local $4
+ (i32.const 0)
+ )
(i32.const 0)
)
)
@@ -9248,64 +9240,64 @@
)
(br $__rjto$3)
)
- (loop $while-in16
- (set_local $12
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $3)
+ (set_local $3
+ (loop $while-in16 (result i32)
+ (set_local $12
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $3)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $1)
)
- (get_local $1)
)
- )
- (set_local $1
- (select
- (get_local $4)
- (get_local $1)
- (get_local $12)
- )
- )
- (set_local $0
- (select
- (get_local $3)
- (get_local $0)
- (get_local $12)
+ (set_local $1
+ (select
+ (get_local $4)
+ (get_local $1)
+ (get_local $12)
+ )
)
- )
- (if
- (tee_local $4
- (i32.load offset=16
+ (set_local $0
+ (select
(get_local $3)
+ (get_local $0)
+ (get_local $12)
)
)
- (block
- (set_local $3
- (get_local $4)
+ (if
+ (tee_local $4
+ (i32.load offset=16
+ (get_local $3)
+ )
+ )
+ (block
+ (set_local $3
+ (get_local $4)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (br_if $while-in16
- (tee_local $3
- (i32.load offset=20
- (get_local $3)
+ (br_if $while-in16
+ (tee_local $3
+ (i32.load offset=20
+ (get_local $3)
+ )
)
)
+ (set_local $4
+ (get_local $0)
+ )
+ (get_local $1)
)
)
- (set_local $4
- (get_local $0)
- )
- (set_local $3
- (get_local $1)
- )
)
(if (result i32)
(get_local $4)
@@ -10968,37 +10960,36 @@
(set_local $2
(i32.const 624)
)
- (block $__rjto$11
- (block $__rjti$11
- (loop $while-in47
- (if
- (i32.eq
- (i32.load
- (get_local $2)
- )
- (get_local $10)
- )
- (block
- (set_local $6
- (get_local $2)
+ (set_local $4
+ (block $__rjto$11 (result i32)
+ (block $__rjti$11
+ (br $__rjto$11
+ (loop $while-in47 (result i32)
+ (if
+ (i32.eq
+ (i32.load
+ (get_local $2)
+ )
+ (get_local $10)
+ )
+ (block
+ (set_local $6
+ (get_local $2)
+ )
+ (br $__rjti$11)
+ )
)
- (br $__rjti$11)
- )
- )
- (br_if $while-in47
- (tee_local $2
- (i32.load offset=8
- (get_local $2)
+ (br_if $while-in47
+ (tee_local $2
+ (i32.load offset=8
+ (get_local $2)
+ )
+ )
)
+ (i32.const 624)
)
)
)
- (set_local $4
- (i32.const 624)
- )
- (br $__rjto$11)
- )
- (set_local $4
(if (result i32)
(i32.and
(i32.load offset=12
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index 21785eb27..f0c3e8018 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -300,14 +300,14 @@
(i32.const 775)
)
(loop $while-in1
- (loop $while-in3
- (set_local $2
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (set_local $0
+ (loop $while-in3 (result i32)
+ (set_local $2
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
- )
- (set_local $0
(if (result i32)
(i32.load8_s
(get_local $0)
@@ -1888,32 +1888,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
)
)
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)
@@ -2618,7 +2618,7 @@
(set_local $11
(i32.const 0)
)
- (loop $while-in4
+ (loop $while-in4 (result i32)
(if
(i32.eqz
(i32.and
@@ -2679,11 +2679,11 @@
(i32.const 32)
)
)
+ (set_local $6
+ (get_local $1)
+ )
+ (get_local $11)
)
- (set_local $6
- (get_local $1)
- )
- (get_local $11)
)
(i32.const 0)
)
@@ -3158,33 +3158,33 @@
(set_local $9
(i32.const 0)
)
- (loop $while-in13
- (if
- (i32.gt_u
- (tee_local $12
- (i32.add
- (i32.load8_s
- (get_local $8)
+ (set_local $19
+ (loop $while-in13 (result i32)
+ (if
+ (i32.gt_u
+ (tee_local $12
+ (i32.add
+ (i32.load8_s
+ (get_local $8)
+ )
+ (i32.const -65)
)
- (i32.const -65)
)
+ (i32.const 57)
)
- (i32.const 57)
- )
- (block
- (set_local $17
- (i32.const -1)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (set_local $10
- (i32.add
- (get_local $8)
- (i32.const 1)
+ (set_local $10
+ (i32.add
+ (get_local $8)
+ (i32.const 1)
+ )
)
- )
- (set_local $19
(if (result i32)
(i32.lt_u
(i32.add
@@ -4669,82 +4669,111 @@
(set_local $5
(get_local $7)
)
- (loop $while-in70
- (set_local $13
- (select
- (i32.const 9)
- (tee_local $7
- (i32.sub
- (i32.const 0)
- (get_local $9)
- )
- )
- (i32.gt_s
- (get_local $7)
+ (set_local $5
+ (loop $while-in70 (result i32)
+ (set_local $13
+ (select
(i32.const 9)
- )
- )
- )
- (if
- (i32.lt_u
- (get_local $6)
- (get_local $5)
- )
- (block $do-once71
- (set_local $12
- (i32.add
- (i32.shl
- (i32.const 1)
- (get_local $13)
+ (tee_local $7
+ (i32.sub
+ (i32.const 0)
+ (get_local $9)
)
- (i32.const -1)
)
- )
- (set_local $37
- (i32.shr_u
- (i32.const 1000000000)
- (get_local $13)
+ (i32.gt_s
+ (get_local $7)
+ (i32.const 9)
)
)
- (set_local $9
- (i32.const 0)
- )
- (set_local $7
+ )
+ (if
+ (i32.lt_u
(get_local $6)
+ (get_local $5)
)
- (loop $while-in74
- (i32.store
- (get_local $7)
+ (block $do-once71
+ (set_local $12
(i32.add
- (get_local $9)
- (i32.shr_u
- (tee_local $9
- (i32.load
- (get_local $7)
- )
- )
+ (i32.shl
+ (i32.const 1)
(get_local $13)
)
+ (i32.const -1)
+ )
+ )
+ (set_local $37
+ (i32.shr_u
+ (i32.const 1000000000)
+ (get_local $13)
)
)
(set_local $9
- (i32.mul
- (i32.and
+ (i32.const 0)
+ )
+ (set_local $7
+ (get_local $6)
+ )
+ (loop $while-in74
+ (i32.store
+ (get_local $7)
+ (i32.add
(get_local $9)
- (get_local $12)
+ (i32.shr_u
+ (tee_local $9
+ (i32.load
+ (get_local $7)
+ )
+ )
+ (get_local $13)
+ )
)
- (get_local $37)
)
- )
- (br_if $while-in74
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (set_local $9
+ (i32.mul
+ (i32.and
+ (get_local $9)
+ (get_local $12)
+ )
+ (get_local $37)
+ )
+ )
+ (br_if $while-in74
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
)
+ (get_local $5)
)
+ )
+ )
+ (set_local $7
+ (select
+ (get_local $6)
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
+ (i32.load
+ (get_local $6)
+ )
+ )
+ )
+ (br_if $do-once71
+ (i32.eqz
+ (get_local $9)
+ )
+ )
+ (i32.store
+ (get_local $5)
+ (get_local $9)
+ )
+ (set_local $5
+ (i32.add
(get_local $5)
+ (i32.const 4)
)
)
)
@@ -4760,75 +4789,46 @@
)
)
)
- (br_if $do-once71
- (i32.eqz
- (get_local $9)
- )
- )
- (i32.store
- (get_local $5)
- (get_local $9)
- )
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 4)
- )
- )
)
- (set_local $7
+ (set_local $12
(select
- (get_local $6)
(i32.add
- (get_local $6)
- (i32.const 4)
- )
- (i32.load
- (get_local $6)
- )
- )
- )
- )
- (set_local $12
- (select
- (i32.add
- (tee_local $6
- (select
- (get_local $8)
- (get_local $7)
- (get_local $31)
+ (tee_local $6
+ (select
+ (get_local $8)
+ (get_local $7)
+ (get_local $31)
+ )
+ )
+ (i32.shl
+ (get_local $21)
+ (i32.const 2)
)
)
- (i32.shl
- (get_local $21)
- (i32.const 2)
- )
- )
- (get_local $5)
- (i32.gt_s
- (i32.shr_s
- (i32.sub
- (get_local $5)
- (get_local $6)
+ (get_local $5)
+ (i32.gt_s
+ (i32.shr_s
+ (i32.sub
+ (get_local $5)
+ (get_local $6)
+ )
+ (i32.const 2)
)
- (i32.const 2)
+ (get_local $21)
)
- (get_local $21)
)
)
- )
- (i32.store
- (get_local $20)
- (tee_local $9
- (i32.add
- (i32.load
- (get_local $20)
+ (i32.store
+ (get_local $20)
+ (tee_local $9
+ (i32.add
+ (i32.load
+ (get_local $20)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
- )
- (set_local $5
(if (result i32)
(i32.lt_s
(get_local $9)
@@ -5850,112 +5850,110 @@
)
)
)
- (if
- (i32.and
- (i32.lt_u
- (get_local $7)
- (get_local $9)
- )
- (i32.gt_s
- (get_local $5)
- (i32.const 0)
- )
- )
- (loop $while-in110
- (if
- (i32.gt_u
- (tee_local $6
- (call $_fmt_u
- (i32.load
- (get_local $7)
- )
- (i32.const 0)
- (get_local $29)
- )
+ (call $_pad
+ (get_local $0)
+ (i32.const 48)
+ (i32.add
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (get_local $7)
+ (get_local $9)
)
- (get_local $23)
- )
- (loop $while-in112
- (i32.store8
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -1)
- )
- )
- (i32.const 48)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 0)
)
- (br_if $while-in112
+ )
+ (loop $while-in110 (result i32)
+ (if
(i32.gt_u
- (get_local $6)
+ (tee_local $6
+ (call $_fmt_u
+ (i32.load
+ (get_local $7)
+ )
+ (i32.const 0)
+ (get_local $29)
+ )
+ )
(get_local $23)
)
- )
- )
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (loop $while-in112
+ (i32.store8
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in112
+ (i32.gt_u
+ (get_local $6)
+ (get_local $23)
+ )
+ )
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $6)
- (select
- (i32.const 9)
- (get_local $5)
- (i32.gt_s
- (get_local $5)
- (i32.const 9)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
)
)
- (get_local $0)
- )
- )
- )
- (set_local $6
- (i32.add
- (get_local $5)
- (i32.const -9)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.and
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (drop
+ (call $___fwritex
+ (get_local $6)
+ (select
+ (i32.const 9)
+ (get_local $5)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
+ (get_local $0)
)
- (get_local $9)
)
- (i32.gt_s
+ )
+ (set_local $6
+ (i32.add
(get_local $5)
- (i32.const 9)
+ (i32.const -9)
)
)
- (block
- (set_local $5
- (get_local $6)
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (get_local $9)
+ )
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
- (br $while-in110)
+ (block
+ (set_local $5
+ (get_local $6)
+ )
+ (br $while-in110)
+ )
+ (get_local $6)
)
- (get_local $6)
)
+ (get_local $5)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (i32.add
- (get_local $5)
(i32.const 9)
)
(i32.const 9)
@@ -5994,7 +5992,7 @@
(set_local $7
(get_local $5)
)
- (loop $while-in114
+ (loop $while-in114 (result i32)
(if
(i32.eq
(tee_local $5
@@ -6152,8 +6150,8 @@
)
)
)
+ (get_local $7)
)
- (get_local $7)
)
(get_local $5)
)
@@ -6350,45 +6348,45 @@
(set_local $8
(get_local $25)
)
- (loop $while-in123
- (i32.store8
- (tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
- )
- )
- (i32.or
- (get_local $9)
- (i32.load8_u
+ (set_local $7
+ (loop $while-in123 (result i32)
+ (i32.store8
+ (tee_local $8
(i32.add
- (i32.and
- (get_local $7)
- (i32.const 15)
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (get_local $9)
+ (i32.load8_u
+ (i32.add
+ (i32.and
+ (get_local $7)
+ (i32.const 15)
+ )
+ (i32.const 4075)
)
- (i32.const 4075)
)
)
)
- )
- (br_if $while-in123
- (i32.or
- (tee_local $7
- (call $_bitshift64Lshr
- (get_local $7)
- (get_local $11)
- (i32.const 4)
+ (br_if $while-in123
+ (i32.or
+ (tee_local $7
+ (call $_bitshift64Lshr
+ (get_local $7)
+ (get_local $11)
+ (i32.const 4)
+ )
+ )
+ (tee_local $11
+ (get_global $tempRet0)
)
- )
- (tee_local $11
- (get_global $tempRet0)
)
)
+ (get_local $8)
)
)
- (set_local $7
- (get_local $8)
- )
(set_local $8
(if (result i32)
(i32.or
@@ -6589,7 +6587,7 @@
(get_local $14)
)
)
- (loop $while-in127
+ (loop $while-in127 (result i32)
(drop
(br_if $__rjti$7
(get_local $5)
@@ -6650,8 +6648,8 @@
(get_local $5)
)
)
+ (get_local $5)
)
- (get_local $5)
)
(i32.const 0)
)
@@ -6848,99 +6846,95 @@
(i32.eqz
(get_local $0)
)
- (if
- (get_local $1)
- (block
- (set_local $0
- (i32.const 1)
- )
- (loop $while-in130
- (if
- (tee_local $1
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (set_local $17
+ (if (result i32)
+ (get_local $1)
+ (block (result i32)
+ (set_local $0
+ (i32.const 1)
+ )
+ (loop $while-in130
+ (if
+ (tee_local $1
+ (i32.load
+ (i32.add
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
- (get_local $4)
)
)
- )
- (block
- (call $_pop_arg_336
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 3)
- )
- (get_local $3)
- )
- (get_local $1)
- (get_local $2)
- )
- (br_if $while-in130
- (i32.lt_s
- (tee_local $0
- (i32.add
+ (block
+ (call $_pop_arg_336
+ (i32.add
+ (i32.shl
(get_local $0)
- (i32.const 1)
+ (i32.const 3)
)
+ (get_local $3)
)
- (i32.const 10)
+ (get_local $1)
+ (get_local $2)
)
- )
- (set_local $17
- (i32.const 1)
- )
- (br $label$break$L343)
- )
- )
- )
- (if
- (i32.lt_s
- (get_local $0)
- (i32.const 10)
- )
- (loop $while-in132
- (if
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (br_if $while-in130
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
)
- (get_local $4)
)
- )
- (block
(set_local $17
- (i32.const -1)
+ (i32.const 1)
)
(br $label$break$L343)
)
)
- (br_if $while-in132
- (i32.lt_s
- (tee_local $0
+ )
+ (if (result i32)
+ (i32.lt_s
+ (get_local $0)
+ (i32.const 10)
+ )
+ (loop $while-in132 (result i32)
+ (if
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 1)
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
)
- (i32.const 10)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L343)
+ )
+ )
+ (br_if $while-in132
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
+ )
)
- )
- (set_local $17
(i32.const 1)
)
- )
- (set_local $17
(i32.const 1)
)
)
- )
- (set_local $17
(i32.const 0)
)
)
@@ -7368,34 +7362,34 @@
(i32.const 0)
)
)
- (loop $while-in
- (i32.store8
- (tee_local $2
- (i32.add
- (get_local $2)
- (i32.const -1)
+ (set_local $0
+ (loop $while-in (result i32)
+ (i32.store8
+ (tee_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (call $___uremdi3
+ (get_local $0)
+ (get_local $1)
+ (i32.const 10)
+ )
+ (i32.const 48)
)
)
- (i32.or
- (call $___uremdi3
+ (set_local $3
+ (call $___udivdi3
(get_local $0)
(get_local $1)
(i32.const 10)
)
- (i32.const 48)
)
- )
- (set_local $3
- (call $___udivdi3
- (get_local $0)
- (get_local $1)
- (i32.const 10)
+ (set_local $4
+ (get_global $tempRet0)
)
- )
- (set_local $4
- (get_global $tempRet0)
- )
- (set_local $0
(if (result i32)
(i32.or
(i32.and
@@ -8994,107 +8988,109 @@
)
(block $__rjto$3
(block $__rjti$3
- (if
- (tee_local $0
- (i32.load offset=480
- (i32.shl
- (get_local $14)
- (i32.const 2)
+ (set_local $0
+ (if (result i32)
+ (tee_local $0
+ (i32.load offset=480
+ (i32.shl
+ (get_local $14)
+ (i32.const 2)
+ )
)
)
- )
- (block
- (set_local $9
- (i32.shl
- (get_local $2)
- (select
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
+ (block (result i32)
+ (set_local $9
+ (i32.shl
+ (get_local $2)
+ (select
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
+ (get_local $14)
+ (i32.const 1)
+ )
+ )
+ (i32.eq
(get_local $14)
- (i32.const 1)
+ (i32.const 31)
)
)
- (i32.eq
- (get_local $14)
- (i32.const 31)
- )
)
)
- )
- (set_local $1
- (i32.const 0)
- )
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (tee_local $12
- (i32.and
- (i32.load offset=4
- (get_local $0)
+ (set_local $1
+ (i32.const 0)
+ )
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (tee_local $12
+ (i32.and
+ (i32.load offset=4
+ (get_local $0)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $3)
)
- (get_local $3)
- )
- (set_local $1
- (if (result i32)
- (i32.eq
- (get_local $2)
- (get_local $12)
- )
- (block
- (set_local $1
- (get_local $4)
+ (set_local $1
+ (if (result i32)
+ (i32.eq
+ (get_local $2)
+ (get_local $12)
)
- (set_local $3
- (get_local $0)
+ (block
+ (set_local $1
+ (get_local $4)
+ )
+ (set_local $3
+ (get_local $0)
+ )
+ (br $__rjti$3)
)
- (br $__rjti$3)
- )
- (block (result i32)
- (set_local $3
- (get_local $4)
+ (block (result i32)
+ (set_local $3
+ (get_local $4)
+ )
+ (get_local $0)
)
- (get_local $0)
)
)
)
- )
- (set_local $0
- (select
- (get_local $5)
- (tee_local $4
- (i32.load offset=20
- (get_local $0)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $4)
+ (set_local $0
+ (select
+ (get_local $5)
+ (tee_local $4
+ (i32.load offset=20
+ (get_local $0)
+ )
)
- (i32.eq
- (get_local $4)
- (tee_local $12
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $4)
+ )
+ (i32.eq
+ (get_local $4)
+ (tee_local $12
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $9)
- (i32.const 31)
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $9)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -9102,21 +9098,19 @@
)
)
)
- )
- (set_local $4
- (i32.shl
- (get_local $9)
- (i32.xor
- (tee_local $5
- (i32.eqz
- (get_local $12)
+ (set_local $4
+ (i32.shl
+ (get_local $9)
+ (i32.xor
+ (tee_local $5
+ (i32.eqz
+ (get_local $12)
+ )
)
+ (i32.const 1)
)
- (i32.const 1)
)
)
- )
- (set_local $0
(if (result i32)
(get_local $5)
(block (result i32)
@@ -9140,12 +9134,10 @@
)
)
)
- )
- (block
- (set_local $4
- (i32.const 0)
- )
- (set_local $0
+ (block (result i32)
+ (set_local $4
+ (i32.const 0)
+ )
(i32.const 0)
)
)
@@ -9298,64 +9290,64 @@
)
(br $__rjto$3)
)
- (loop $while-in16
- (set_local $12
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $3)
+ (set_local $3
+ (loop $while-in16 (result i32)
+ (set_local $12
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $3)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $1)
)
- (get_local $1)
)
- )
- (set_local $1
- (select
- (get_local $4)
- (get_local $1)
- (get_local $12)
- )
- )
- (set_local $0
- (select
- (get_local $3)
- (get_local $0)
- (get_local $12)
+ (set_local $1
+ (select
+ (get_local $4)
+ (get_local $1)
+ (get_local $12)
+ )
)
- )
- (if
- (tee_local $4
- (i32.load offset=16
+ (set_local $0
+ (select
(get_local $3)
+ (get_local $0)
+ (get_local $12)
)
)
- (block
- (set_local $3
- (get_local $4)
+ (if
+ (tee_local $4
+ (i32.load offset=16
+ (get_local $3)
+ )
+ )
+ (block
+ (set_local $3
+ (get_local $4)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (br_if $while-in16
- (tee_local $3
- (i32.load offset=20
- (get_local $3)
+ (br_if $while-in16
+ (tee_local $3
+ (i32.load offset=20
+ (get_local $3)
+ )
)
)
+ (set_local $4
+ (get_local $0)
+ )
+ (get_local $1)
)
)
- (set_local $4
- (get_local $0)
- )
- (set_local $3
- (get_local $1)
- )
)
(if (result i32)
(get_local $4)
@@ -11018,37 +11010,36 @@
(set_local $2
(i32.const 624)
)
- (block $__rjto$11
- (block $__rjti$11
- (loop $while-in47
- (if
- (i32.eq
- (i32.load
- (get_local $2)
- )
- (get_local $10)
- )
- (block
- (set_local $6
- (get_local $2)
+ (set_local $4
+ (block $__rjto$11 (result i32)
+ (block $__rjti$11
+ (br $__rjto$11
+ (loop $while-in47 (result i32)
+ (if
+ (i32.eq
+ (i32.load
+ (get_local $2)
+ )
+ (get_local $10)
+ )
+ (block
+ (set_local $6
+ (get_local $2)
+ )
+ (br $__rjti$11)
+ )
)
- (br $__rjti$11)
- )
- )
- (br_if $while-in47
- (tee_local $2
- (i32.load offset=8
- (get_local $2)
+ (br_if $while-in47
+ (tee_local $2
+ (i32.load offset=8
+ (get_local $2)
+ )
+ )
)
+ (i32.const 624)
)
)
)
- (set_local $4
- (i32.const 624)
- )
- (br $__rjto$11)
- )
- (set_local $4
(if (result i32)
(i32.and
(i32.load offset=12
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index d8b8ea78b..bc92bd892 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -299,14 +299,14 @@
(i32.const 775)
)
(loop $while-in1
- (loop $while-in3
- (set_local $2
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (set_local $0
+ (loop $while-in3 (result i32)
+ (set_local $2
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
- )
- (set_local $0
(if (result i32)
(i32.load8_s
(get_local $0)
@@ -1877,32 +1877,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
)
)
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)
@@ -2507,7 +2507,7 @@
(set_local $11
(i32.const 0)
)
- (loop $while-in4
+ (loop $while-in4 (result i32)
(if
(i32.eqz
(i32.and
@@ -2568,11 +2568,11 @@
(i32.const 32)
)
)
+ (set_local $6
+ (get_local $1)
+ )
+ (get_local $11)
)
- (set_local $6
- (get_local $1)
- )
- (get_local $11)
)
(i32.const 0)
)
@@ -3049,33 +3049,33 @@
(set_local $9
(i32.const 0)
)
- (loop $while-in13
- (if
- (i32.gt_u
- (tee_local $12
- (i32.add
- (i32.load8_s
- (get_local $8)
+ (set_local $19
+ (loop $while-in13 (result i32)
+ (if
+ (i32.gt_u
+ (tee_local $12
+ (i32.add
+ (i32.load8_s
+ (get_local $8)
+ )
+ (i32.const -65)
)
- (i32.const -65)
)
+ (i32.const 57)
)
- (i32.const 57)
- )
- (block
- (set_local $17
- (i32.const -1)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (set_local $10
- (i32.add
- (get_local $8)
- (i32.const 1)
+ (set_local $10
+ (i32.add
+ (get_local $8)
+ (i32.const 1)
+ )
)
- )
- (set_local $19
(if (result i32)
(i32.lt_u
(i32.add
@@ -4540,82 +4540,111 @@
(set_local $5
(get_local $7)
)
- (loop $while-in70
- (set_local $13
- (select
- (i32.const 9)
- (tee_local $7
- (i32.sub
- (i32.const 0)
- (get_local $9)
- )
- )
- (i32.gt_s
- (get_local $7)
+ (set_local $5
+ (loop $while-in70 (result i32)
+ (set_local $13
+ (select
(i32.const 9)
- )
- )
- )
- (if
- (i32.lt_u
- (get_local $6)
- (get_local $5)
- )
- (block $do-once71
- (set_local $12
- (i32.add
- (i32.shl
- (i32.const 1)
- (get_local $13)
+ (tee_local $7
+ (i32.sub
+ (i32.const 0)
+ (get_local $9)
)
- (i32.const -1)
)
- )
- (set_local $37
- (i32.shr_u
- (i32.const 1000000000)
- (get_local $13)
+ (i32.gt_s
+ (get_local $7)
+ (i32.const 9)
)
)
- (set_local $9
- (i32.const 0)
- )
- (set_local $7
+ )
+ (if
+ (i32.lt_u
(get_local $6)
+ (get_local $5)
)
- (loop $while-in74
- (i32.store
- (get_local $7)
+ (block $do-once71
+ (set_local $12
(i32.add
- (get_local $9)
- (i32.shr_u
- (tee_local $9
- (i32.load
- (get_local $7)
- )
- )
+ (i32.shl
+ (i32.const 1)
(get_local $13)
)
+ (i32.const -1)
+ )
+ )
+ (set_local $37
+ (i32.shr_u
+ (i32.const 1000000000)
+ (get_local $13)
)
)
(set_local $9
- (i32.mul
- (i32.and
+ (i32.const 0)
+ )
+ (set_local $7
+ (get_local $6)
+ )
+ (loop $while-in74
+ (i32.store
+ (get_local $7)
+ (i32.add
(get_local $9)
- (get_local $12)
+ (i32.shr_u
+ (tee_local $9
+ (i32.load
+ (get_local $7)
+ )
+ )
+ (get_local $13)
+ )
)
- (get_local $37)
)
- )
- (br_if $while-in74
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (set_local $9
+ (i32.mul
+ (i32.and
+ (get_local $9)
+ (get_local $12)
+ )
+ (get_local $37)
+ )
+ )
+ (br_if $while-in74
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
)
+ (get_local $5)
)
+ )
+ )
+ (set_local $7
+ (select
+ (get_local $6)
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
+ (i32.load
+ (get_local $6)
+ )
+ )
+ )
+ (br_if $do-once71
+ (i32.eqz
+ (get_local $9)
+ )
+ )
+ (i32.store
+ (get_local $5)
+ (get_local $9)
+ )
+ (set_local $5
+ (i32.add
(get_local $5)
+ (i32.const 4)
)
)
)
@@ -4631,75 +4660,46 @@
)
)
)
- (br_if $do-once71
- (i32.eqz
- (get_local $9)
- )
- )
- (i32.store
- (get_local $5)
- (get_local $9)
- )
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 4)
- )
- )
)
- (set_local $7
+ (set_local $12
(select
- (get_local $6)
(i32.add
- (get_local $6)
- (i32.const 4)
- )
- (i32.load
- (get_local $6)
- )
- )
- )
- )
- (set_local $12
- (select
- (i32.add
- (tee_local $6
- (select
- (get_local $8)
- (get_local $7)
- (get_local $31)
+ (tee_local $6
+ (select
+ (get_local $8)
+ (get_local $7)
+ (get_local $31)
+ )
+ )
+ (i32.shl
+ (get_local $21)
+ (i32.const 2)
)
)
- (i32.shl
- (get_local $21)
- (i32.const 2)
- )
- )
- (get_local $5)
- (i32.gt_s
- (i32.shr_s
- (i32.sub
- (get_local $5)
- (get_local $6)
+ (get_local $5)
+ (i32.gt_s
+ (i32.shr_s
+ (i32.sub
+ (get_local $5)
+ (get_local $6)
+ )
+ (i32.const 2)
)
- (i32.const 2)
+ (get_local $21)
)
- (get_local $21)
)
)
- )
- (i32.store
- (get_local $20)
- (tee_local $9
- (i32.add
- (i32.load
- (get_local $20)
+ (i32.store
+ (get_local $20)
+ (tee_local $9
+ (i32.add
+ (i32.load
+ (get_local $20)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
- )
- (set_local $5
(if (result i32)
(i32.lt_s
(get_local $9)
@@ -5715,112 +5715,110 @@
)
)
)
- (if
- (i32.and
- (i32.lt_u
- (get_local $7)
- (get_local $9)
- )
- (i32.gt_s
- (get_local $5)
- (i32.const 0)
- )
- )
- (loop $while-in110
- (if
- (i32.gt_u
- (tee_local $6
- (call $_fmt_u
- (i32.load
- (get_local $7)
- )
- (i32.const 0)
- (get_local $29)
- )
+ (call $_pad
+ (get_local $0)
+ (i32.const 48)
+ (i32.add
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (get_local $7)
+ (get_local $9)
)
- (get_local $23)
- )
- (loop $while-in112
- (i32.store8
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -1)
- )
- )
- (i32.const 48)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 0)
)
- (br_if $while-in112
+ )
+ (loop $while-in110 (result i32)
+ (if
(i32.gt_u
- (get_local $6)
+ (tee_local $6
+ (call $_fmt_u
+ (i32.load
+ (get_local $7)
+ )
+ (i32.const 0)
+ (get_local $29)
+ )
+ )
(get_local $23)
)
- )
- )
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (loop $while-in112
+ (i32.store8
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in112
+ (i32.gt_u
+ (get_local $6)
+ (get_local $23)
+ )
+ )
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $6)
- (select
- (i32.const 9)
- (get_local $5)
- (i32.gt_s
- (get_local $5)
- (i32.const 9)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
)
)
- (get_local $0)
- )
- )
- )
- (set_local $6
- (i32.add
- (get_local $5)
- (i32.const -9)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.and
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
+ (drop
+ (call $___fwritex
+ (get_local $6)
+ (select
+ (i32.const 9)
+ (get_local $5)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
+ (get_local $0)
)
- (get_local $9)
)
- (i32.gt_s
+ )
+ (set_local $6
+ (i32.add
(get_local $5)
- (i32.const 9)
+ (i32.const -9)
)
)
- (block
- (set_local $5
- (get_local $6)
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (get_local $9)
+ )
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
)
- (br $while-in110)
+ (block
+ (set_local $5
+ (get_local $6)
+ )
+ (br $while-in110)
+ )
+ (get_local $6)
)
- (get_local $6)
)
+ (get_local $5)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (i32.add
- (get_local $5)
(i32.const 9)
)
(i32.const 9)
@@ -5859,7 +5857,7 @@
(set_local $7
(get_local $5)
)
- (loop $while-in114
+ (loop $while-in114 (result i32)
(if
(i32.eq
(tee_local $5
@@ -6017,8 +6015,8 @@
)
)
)
+ (get_local $7)
)
- (get_local $7)
)
(get_local $5)
)
@@ -6215,45 +6213,45 @@
(set_local $8
(get_local $25)
)
- (loop $while-in123
- (i32.store8
- (tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
- )
- )
- (i32.or
- (get_local $9)
- (i32.load8_u
+ (set_local $7
+ (loop $while-in123 (result i32)
+ (i32.store8
+ (tee_local $8
(i32.add
- (i32.and
- (get_local $7)
- (i32.const 15)
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (get_local $9)
+ (i32.load8_u
+ (i32.add
+ (i32.and
+ (get_local $7)
+ (i32.const 15)
+ )
+ (i32.const 4075)
)
- (i32.const 4075)
)
)
)
- )
- (br_if $while-in123
- (i32.or
- (tee_local $7
- (call $_bitshift64Lshr
- (get_local $7)
- (get_local $11)
- (i32.const 4)
+ (br_if $while-in123
+ (i32.or
+ (tee_local $7
+ (call $_bitshift64Lshr
+ (get_local $7)
+ (get_local $11)
+ (i32.const 4)
+ )
+ )
+ (tee_local $11
+ (get_global $tempRet0)
)
- )
- (tee_local $11
- (get_global $tempRet0)
)
)
+ (get_local $8)
)
)
- (set_local $7
- (get_local $8)
- )
(set_local $8
(if (result i32)
(i32.or
@@ -6454,7 +6452,7 @@
(get_local $14)
)
)
- (loop $while-in127
+ (loop $while-in127 (result i32)
(drop
(br_if $__rjti$7
(get_local $5)
@@ -6515,8 +6513,8 @@
(get_local $5)
)
)
+ (get_local $5)
)
- (get_local $5)
)
(i32.const 0)
)
@@ -6713,99 +6711,95 @@
(i32.eqz
(get_local $0)
)
- (if
- (get_local $1)
- (block
- (set_local $0
- (i32.const 1)
- )
- (loop $while-in130
- (if
- (tee_local $1
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (set_local $17
+ (if (result i32)
+ (get_local $1)
+ (block (result i32)
+ (set_local $0
+ (i32.const 1)
+ )
+ (loop $while-in130
+ (if
+ (tee_local $1
+ (i32.load
+ (i32.add
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
- (get_local $4)
)
)
- )
- (block
- (call $_pop_arg_336
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 3)
- )
- (get_local $3)
- )
- (get_local $1)
- (get_local $2)
- )
- (br_if $while-in130
- (i32.lt_s
- (tee_local $0
- (i32.add
+ (block
+ (call $_pop_arg_336
+ (i32.add
+ (i32.shl
(get_local $0)
- (i32.const 1)
+ (i32.const 3)
)
+ (get_local $3)
)
- (i32.const 10)
+ (get_local $1)
+ (get_local $2)
)
- )
- (set_local $17
- (i32.const 1)
- )
- (br $label$break$L343)
- )
- )
- )
- (if
- (i32.lt_s
- (get_local $0)
- (i32.const 10)
- )
- (loop $while-in132
- (if
- (i32.load
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (br_if $while-in130
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
)
- (get_local $4)
)
- )
- (block
(set_local $17
- (i32.const -1)
+ (i32.const 1)
)
(br $label$break$L343)
)
)
- (br_if $while-in132
- (i32.lt_s
- (tee_local $0
+ )
+ (if (result i32)
+ (i32.lt_s
+ (get_local $0)
+ (i32.const 10)
+ )
+ (loop $while-in132 (result i32)
+ (if
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 1)
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (get_local $4)
)
)
- (i32.const 10)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L343)
+ )
+ )
+ (br_if $while-in132
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (i32.const 10)
+ )
)
- )
- (set_local $17
(i32.const 1)
)
- )
- (set_local $17
(i32.const 1)
)
)
- )
- (set_local $17
(i32.const 0)
)
)
@@ -7233,34 +7227,34 @@
(i32.const 0)
)
)
- (loop $while-in
- (i32.store8
- (tee_local $2
- (i32.add
- (get_local $2)
- (i32.const -1)
+ (set_local $0
+ (loop $while-in (result i32)
+ (i32.store8
+ (tee_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (call $___uremdi3
+ (get_local $0)
+ (get_local $1)
+ (i32.const 10)
+ )
+ (i32.const 48)
)
)
- (i32.or
- (call $___uremdi3
+ (set_local $3
+ (call $___udivdi3
(get_local $0)
(get_local $1)
(i32.const 10)
)
- (i32.const 48)
)
- )
- (set_local $3
- (call $___udivdi3
- (get_local $0)
- (get_local $1)
- (i32.const 10)
+ (set_local $4
+ (get_global $tempRet0)
)
- )
- (set_local $4
- (get_global $tempRet0)
- )
- (set_local $0
(if (result i32)
(i32.or
(i32.and
@@ -8859,107 +8853,109 @@
)
(block $__rjto$3
(block $__rjti$3
- (if
- (tee_local $0
- (i32.load offset=480
- (i32.shl
- (get_local $14)
- (i32.const 2)
+ (set_local $0
+ (if (result i32)
+ (tee_local $0
+ (i32.load offset=480
+ (i32.shl
+ (get_local $14)
+ (i32.const 2)
+ )
)
)
- )
- (block
- (set_local $9
- (i32.shl
- (get_local $2)
- (select
- (i32.const 0)
- (i32.sub
- (i32.const 25)
- (i32.shr_u
+ (block (result i32)
+ (set_local $9
+ (i32.shl
+ (get_local $2)
+ (select
+ (i32.const 0)
+ (i32.sub
+ (i32.const 25)
+ (i32.shr_u
+ (get_local $14)
+ (i32.const 1)
+ )
+ )
+ (i32.eq
(get_local $14)
- (i32.const 1)
+ (i32.const 31)
)
)
- (i32.eq
- (get_local $14)
- (i32.const 31)
- )
)
)
- )
- (set_local $1
- (i32.const 0)
- )
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (tee_local $12
- (i32.and
- (i32.load offset=4
- (get_local $0)
+ (set_local $1
+ (i32.const 0)
+ )
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (tee_local $12
+ (i32.and
+ (i32.load offset=4
+ (get_local $0)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $3)
)
- (get_local $3)
- )
- (set_local $1
- (if (result i32)
- (i32.eq
- (get_local $2)
- (get_local $12)
- )
- (block
- (set_local $1
- (get_local $4)
+ (set_local $1
+ (if (result i32)
+ (i32.eq
+ (get_local $2)
+ (get_local $12)
)
- (set_local $3
- (get_local $0)
+ (block
+ (set_local $1
+ (get_local $4)
+ )
+ (set_local $3
+ (get_local $0)
+ )
+ (br $__rjti$3)
)
- (br $__rjti$3)
- )
- (block (result i32)
- (set_local $3
- (get_local $4)
+ (block (result i32)
+ (set_local $3
+ (get_local $4)
+ )
+ (get_local $0)
)
- (get_local $0)
)
)
)
- )
- (set_local $0
- (select
- (get_local $5)
- (tee_local $4
- (i32.load offset=20
- (get_local $0)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $4)
+ (set_local $0
+ (select
+ (get_local $5)
+ (tee_local $4
+ (i32.load offset=20
+ (get_local $0)
+ )
)
- (i32.eq
- (get_local $4)
- (tee_local $12
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $4)
+ )
+ (i32.eq
+ (get_local $4)
+ (tee_local $12
+ (i32.load
(i32.add
- (get_local $0)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $9)
- (i32.const 31)
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $9)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -8967,21 +8963,19 @@
)
)
)
- )
- (set_local $4
- (i32.shl
- (get_local $9)
- (i32.xor
- (tee_local $5
- (i32.eqz
- (get_local $12)
+ (set_local $4
+ (i32.shl
+ (get_local $9)
+ (i32.xor
+ (tee_local $5
+ (i32.eqz
+ (get_local $12)
+ )
)
+ (i32.const 1)
)
- (i32.const 1)
)
)
- )
- (set_local $0
(if (result i32)
(get_local $5)
(block (result i32)
@@ -9005,12 +8999,10 @@
)
)
)
- )
- (block
- (set_local $4
- (i32.const 0)
- )
- (set_local $0
+ (block (result i32)
+ (set_local $4
+ (i32.const 0)
+ )
(i32.const 0)
)
)
@@ -9163,64 +9155,64 @@
)
(br $__rjto$3)
)
- (loop $while-in16
- (set_local $12
- (i32.lt_u
- (tee_local $4
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $3)
+ (set_local $3
+ (loop $while-in16 (result i32)
+ (set_local $12
+ (i32.lt_u
+ (tee_local $4
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $3)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $2)
)
- (get_local $2)
)
+ (get_local $1)
)
- (get_local $1)
)
- )
- (set_local $1
- (select
- (get_local $4)
- (get_local $1)
- (get_local $12)
- )
- )
- (set_local $0
- (select
- (get_local $3)
- (get_local $0)
- (get_local $12)
+ (set_local $1
+ (select
+ (get_local $4)
+ (get_local $1)
+ (get_local $12)
+ )
)
- )
- (if
- (tee_local $4
- (i32.load offset=16
+ (set_local $0
+ (select
(get_local $3)
+ (get_local $0)
+ (get_local $12)
)
)
- (block
- (set_local $3
- (get_local $4)
+ (if
+ (tee_local $4
+ (i32.load offset=16
+ (get_local $3)
+ )
+ )
+ (block
+ (set_local $3
+ (get_local $4)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (br_if $while-in16
- (tee_local $3
- (i32.load offset=20
- (get_local $3)
+ (br_if $while-in16
+ (tee_local $3
+ (i32.load offset=20
+ (get_local $3)
+ )
)
)
+ (set_local $4
+ (get_local $0)
+ )
+ (get_local $1)
)
)
- (set_local $4
- (get_local $0)
- )
- (set_local $3
- (get_local $1)
- )
)
(if (result i32)
(get_local $4)
@@ -10883,37 +10875,36 @@
(set_local $2
(i32.const 624)
)
- (block $__rjto$11
- (block $__rjti$11
- (loop $while-in47
- (if
- (i32.eq
- (i32.load
- (get_local $2)
- )
- (get_local $10)
- )
- (block
- (set_local $6
- (get_local $2)
+ (set_local $4
+ (block $__rjto$11 (result i32)
+ (block $__rjti$11
+ (br $__rjto$11
+ (loop $while-in47 (result i32)
+ (if
+ (i32.eq
+ (i32.load
+ (get_local $2)
+ )
+ (get_local $10)
+ )
+ (block
+ (set_local $6
+ (get_local $2)
+ )
+ (br $__rjti$11)
+ )
)
- (br $__rjti$11)
- )
- )
- (br_if $while-in47
- (tee_local $2
- (i32.load offset=8
- (get_local $2)
+ (br_if $while-in47
+ (tee_local $2
+ (i32.load offset=8
+ (get_local $2)
+ )
+ )
)
+ (i32.const 624)
)
)
)
- (set_local $4
- (i32.const 624)
- )
- (br $__rjto$11)
- )
- (set_local $4
(if (result i32)
(i32.and
(i32.load offset=12
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index 3a4f72305..e2eb0c6f1 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -1548,81 +1548,83 @@
(set_local $8
(get_local $13)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $13
- (i32.sub
- (tee_local $2
- (i32.and
- (i32.load offset=4
- (get_local $8)
+ (set_local $6
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $13
+ (i32.sub
+ (tee_local $2
+ (i32.and
+ (i32.load offset=4
+ (get_local $8)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $4)
)
- (get_local $4)
- )
- (set_local $4
- (if (result i32)
- (i32.eq
- (get_local $0)
- (get_local $2)
- )
- (block
- (set_local $30
- (get_local $13)
- )
- (set_local $28
- (get_local $8)
- )
- (set_local $32
- (get_local $8)
+ (set_local $4
+ (if (result i32)
+ (i32.eq
+ (get_local $0)
+ (get_local $2)
)
- (set_local $8
- (i32.const 90)
+ (block
+ (set_local $30
+ (get_local $13)
+ )
+ (set_local $28
+ (get_local $8)
+ )
+ (set_local $32
+ (get_local $8)
+ )
+ (set_local $8
+ (i32.const 90)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
- )
- (block (result i32)
- (set_local $9
- (get_local $8)
+ (block (result i32)
+ (set_local $9
+ (get_local $8)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
)
- )
- (set_local $2
- (select
- (get_local $15)
- (tee_local $13
- (i32.load offset=20
- (get_local $8)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $13)
+ (set_local $2
+ (select
+ (get_local $15)
+ (tee_local $13
+ (i32.load offset=20
+ (get_local $8)
+ )
)
- (i32.eq
- (get_local $13)
- (tee_local $8
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $13)
+ )
+ (i32.eq
+ (get_local $13)
+ (tee_local $8
+ (i32.load
(i32.add
- (get_local $8)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $8)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1630,8 +1632,6 @@
)
)
)
- )
- (set_local $6
(if (result i32)
(tee_local $13
(i32.eqz
@@ -1839,7 +1839,7 @@
)
)
(block
- (set_local $18
+ (set_local $17
(get_local $36)
)
(set_local $11
@@ -1853,60 +1853,60 @@
(get_local $8)
(i32.const 90)
)
- (loop $while-in16
- (set_local $8
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $9
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $28)
+ (set_local $17
+ (loop $while-in16 (result i32)
+ (set_local $8
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $9
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $28)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $30)
)
- (get_local $30)
- )
- )
- (set_local $6
- (select
- (get_local $9)
- (get_local $30)
- (get_local $3)
)
- )
- (set_local $9
- (select
- (get_local $28)
- (get_local $32)
- (get_local $3)
+ (set_local $6
+ (select
+ (get_local $9)
+ (get_local $30)
+ (get_local $3)
+ )
)
- )
- (if
- (tee_local $3
- (i32.load offset=16
+ (set_local $9
+ (select
(get_local $28)
+ (get_local $32)
+ (get_local $3)
)
)
- (block
- (set_local $30
- (get_local $6)
- )
- (set_local $28
- (get_local $3)
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $28)
+ )
)
- (set_local $32
- (get_local $9)
+ (block
+ (set_local $30
+ (get_local $6)
+ )
+ (set_local $28
+ (get_local $3)
+ )
+ (set_local $32
+ (get_local $9)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (set_local $18
(if (result i32)
(tee_local $28
(i32.load offset=20
@@ -1936,7 +1936,7 @@
(get_local $11)
(if (result i32)
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.sub
(i32.load
(i32.const 1216)
@@ -2291,7 +2291,7 @@
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16)
)
(block
@@ -2301,7 +2301,7 @@
(tee_local $6
(i32.add
(get_local $0)
- (get_local $18)
+ (get_local $17)
)
)
(i32.const 3)
@@ -2336,26 +2336,26 @@
(i32.store offset=4
(get_local $9)
(i32.or
- (get_local $18)
+ (get_local $17)
(i32.const 1)
)
)
(i32.store
(i32.add
(get_local $9)
- (get_local $18)
+ (get_local $17)
)
- (get_local $18)
+ (get_local $17)
)
(set_local $10
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 3)
)
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 256)
)
(block
@@ -2453,13 +2453,13 @@
(if (result i32)
(tee_local $6
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 8)
)
)
(if (result i32)
(i32.gt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16777215)
)
(i32.const 31)
@@ -2495,7 +2495,7 @@
(i32.or
(i32.and
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.add
(tee_local $13
(i32.add
@@ -2616,7 +2616,7 @@
)
(set_local $10
(i32.shl
- (get_local $18)
+ (get_local $17)
(select
(i32.const 0)
(i32.sub
@@ -2645,7 +2645,7 @@
(block $while-out27 (result i32)
(if
(i32.eq
- (get_local $18)
+ (get_local $17)
(i32.and
(i32.load offset=4
(get_local $2)
@@ -2654,7 +2654,7 @@
)
)
(block
- (set_local $17
+ (set_local $18
(get_local $2)
)
(br $while-out27
@@ -2748,7 +2748,7 @@
(i32.load
(tee_local $2
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -2761,7 +2761,7 @@
)
)
(i32.ge_u
- (get_local $17)
+ (get_local $18)
(get_local $3)
)
)
@@ -2780,7 +2780,7 @@
)
(i32.store offset=12
(get_local $9)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=24
(get_local $9)
@@ -2832,7 +2832,7 @@
)
(if
(i32.gt_u
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $11)
(get_local $6)
@@ -2852,21 +2852,21 @@
)
(i32.store
(i32.const 1216)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $21)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
(i32.store
(i32.add
- (get_local $17)
+ (get_local $18)
(get_local $21)
)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $16)
@@ -2893,7 +2893,7 @@
)
)
(i32.store
- (tee_local $17
+ (tee_local $18
(i32.add
(i32.add
(get_local $11)
@@ -2904,7 +2904,7 @@
)
(i32.or
(i32.load
- (get_local $17)
+ (get_local $18)
)
(i32.const 1)
)
@@ -2926,7 +2926,7 @@
(block
(i32.store
(i32.const 1220)
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $16)
(get_local $6)
@@ -2949,7 +2949,7 @@
(i32.store offset=4
(get_local $11)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
@@ -3029,7 +3029,7 @@
(i32.const 1688)
)
)
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $6)
(i32.const 47)
@@ -3057,7 +3057,7 @@
)
)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1648)
)
@@ -3079,7 +3079,7 @@
)
(i32.gt_u
(get_local $7)
- (get_local $18)
+ (get_local $17)
)
)
(block
@@ -3105,7 +3105,7 @@
(i32.const 188)
(block $label$break$b (result i32)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1232)
)
@@ -3123,7 +3123,7 @@
(get_local $7)
)
)
- (get_local $18)
+ (get_local $17)
)
(if
(i32.gt_u
@@ -3138,7 +3138,7 @@
)
(get_local $3)
)
- (get_local $18)
+ (get_local $17)
)
(block
(set_local $0
@@ -3240,7 +3240,7 @@
)
(if
(i32.ne
- (tee_local $18
+ (tee_local $17
(call $ta
(i32.const 0)
)
@@ -3252,7 +3252,7 @@
(if (result i32)
(i32.and
(tee_local $0
- (get_local $18)
+ (get_local $17)
)
(tee_local $19
(i32.add
@@ -3328,7 +3328,7 @@
(set_local $1
(if (result i32)
(i32.eq
- (get_local $18)
+ (get_local $17)
(tee_local $19
(call $ta
(get_local $2)
@@ -3337,7 +3337,7 @@
)
(block
(set_local $20
- (get_local $18)
+ (get_local $17)
)
(set_local $26
(get_local $2)
@@ -3397,19 +3397,19 @@
(tee_local $0
(i32.and
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1688)
)
)
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
)
(i32.sub
(i32.const 0)
- (get_local $18)
+ (get_local $17)
)
)
)
@@ -3576,7 +3576,7 @@
(if
(i32.eq
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.load
(tee_local $14
(i32.add
@@ -3602,7 +3602,7 @@
(get_local $14)
)
(set_local $50
- (get_local $17)
+ (get_local $18)
)
(set_local $51
(get_local $1)
@@ -3657,7 +3657,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(i32.and
(i32.sub
@@ -3688,7 +3688,7 @@
)
(i32.sub
(get_local $26)
- (get_local $17)
+ (get_local $18)
)
)
)
@@ -3821,7 +3821,7 @@
)
)
)
- (set_local $17
+ (set_local $18
(i32.add
(select
(i32.and
@@ -3872,20 +3872,20 @@
(set_local $1
(i32.add
(get_local $6)
- (get_local $17)
+ (get_local $18)
)
)
(set_local $16
(i32.sub
(i32.sub
(get_local $4)
- (get_local $17)
+ (get_local $18)
)
(get_local $6)
)
)
(i32.store offset=4
- (get_local $17)
+ (get_local $18)
(i32.or
(get_local $6)
(i32.const 3)
@@ -4130,7 +4130,7 @@
(i32.load
(tee_local $7
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $4)
(i32.const 16)
@@ -4150,14 +4150,14 @@
(if (result i32)
(tee_local $22
(i32.load
- (get_local $18)
+ (get_local $17)
)
)
(block (result i32)
(set_local $2
(get_local $22)
)
- (get_local $18)
+ (get_local $17)
)
(br $do-once51)
)
@@ -4254,7 +4254,7 @@
(i32.eq
(get_local $4)
(i32.load
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $0)
(i32.const 8)
@@ -4268,7 +4268,7 @@
(get_local $0)
)
(i32.store
- (get_local $18)
+ (get_local $17)
(get_local $7)
)
(set_local $24
@@ -4937,7 +4937,7 @@
)
(return
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -4986,7 +4986,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(get_local $12)
(tee_local $1
@@ -4997,7 +4997,7 @@
(i32.const 0)
(tee_local $16
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $0)
(i32.const -47)
@@ -5015,7 +5015,7 @@
(i32.const 7)
)
)
- (get_local $17)
+ (get_local $18)
)
)
(i32.lt_u
@@ -5096,7 +5096,7 @@
(i32.store
(tee_local $7
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 4)
)
)
@@ -5144,7 +5144,7 @@
)
(set_local $1
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 24)
)
)
@@ -5171,7 +5171,7 @@
(if
(i32.ne
(get_local $12)
- (get_local $17)
+ (get_local $18)
)
(block
(i32.store
@@ -5188,7 +5188,7 @@
(i32.or
(tee_local $1
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $12)
)
)
@@ -5196,7 +5196,7 @@
)
)
(i32.store
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
(set_local $4
@@ -6221,61 +6221,60 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (if
+ (i32.lt_u
+ (tee_local $3
+ (loop $while-in (result i32)
+ (if
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
)
)
- )
- )
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- )
- (set_local $3
- (if (result i32)
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
+ (if (result i32)
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
+ )
+ (block (result i32)
+ (set_local $12
(get_local $0)
- (i32.const 16)
)
+ (get_local $4)
)
)
)
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- (block (result i32)
- (set_local $12
- (get_local $0)
- )
- (get_local $4)
- )
)
- )
- )
- (if
- (i32.lt_u
- (get_local $3)
(get_local $14)
)
(call $qa)
@@ -8262,40 +8261,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp
index 3a4f72305..e2eb0c6f1 100644
--- a/test/memorygrowth.fromasm.clamp
+++ b/test/memorygrowth.fromasm.clamp
@@ -1548,81 +1548,83 @@
(set_local $8
(get_local $13)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $13
- (i32.sub
- (tee_local $2
- (i32.and
- (i32.load offset=4
- (get_local $8)
+ (set_local $6
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $13
+ (i32.sub
+ (tee_local $2
+ (i32.and
+ (i32.load offset=4
+ (get_local $8)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $4)
)
- (get_local $4)
- )
- (set_local $4
- (if (result i32)
- (i32.eq
- (get_local $0)
- (get_local $2)
- )
- (block
- (set_local $30
- (get_local $13)
- )
- (set_local $28
- (get_local $8)
- )
- (set_local $32
- (get_local $8)
+ (set_local $4
+ (if (result i32)
+ (i32.eq
+ (get_local $0)
+ (get_local $2)
)
- (set_local $8
- (i32.const 90)
+ (block
+ (set_local $30
+ (get_local $13)
+ )
+ (set_local $28
+ (get_local $8)
+ )
+ (set_local $32
+ (get_local $8)
+ )
+ (set_local $8
+ (i32.const 90)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
- )
- (block (result i32)
- (set_local $9
- (get_local $8)
+ (block (result i32)
+ (set_local $9
+ (get_local $8)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
)
- )
- (set_local $2
- (select
- (get_local $15)
- (tee_local $13
- (i32.load offset=20
- (get_local $8)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $13)
+ (set_local $2
+ (select
+ (get_local $15)
+ (tee_local $13
+ (i32.load offset=20
+ (get_local $8)
+ )
)
- (i32.eq
- (get_local $13)
- (tee_local $8
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $13)
+ )
+ (i32.eq
+ (get_local $13)
+ (tee_local $8
+ (i32.load
(i32.add
- (get_local $8)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $8)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1630,8 +1632,6 @@
)
)
)
- )
- (set_local $6
(if (result i32)
(tee_local $13
(i32.eqz
@@ -1839,7 +1839,7 @@
)
)
(block
- (set_local $18
+ (set_local $17
(get_local $36)
)
(set_local $11
@@ -1853,60 +1853,60 @@
(get_local $8)
(i32.const 90)
)
- (loop $while-in16
- (set_local $8
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $9
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $28)
+ (set_local $17
+ (loop $while-in16 (result i32)
+ (set_local $8
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $9
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $28)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $30)
)
- (get_local $30)
- )
- )
- (set_local $6
- (select
- (get_local $9)
- (get_local $30)
- (get_local $3)
)
- )
- (set_local $9
- (select
- (get_local $28)
- (get_local $32)
- (get_local $3)
+ (set_local $6
+ (select
+ (get_local $9)
+ (get_local $30)
+ (get_local $3)
+ )
)
- )
- (if
- (tee_local $3
- (i32.load offset=16
+ (set_local $9
+ (select
(get_local $28)
+ (get_local $32)
+ (get_local $3)
)
)
- (block
- (set_local $30
- (get_local $6)
- )
- (set_local $28
- (get_local $3)
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $28)
+ )
)
- (set_local $32
- (get_local $9)
+ (block
+ (set_local $30
+ (get_local $6)
+ )
+ (set_local $28
+ (get_local $3)
+ )
+ (set_local $32
+ (get_local $9)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (set_local $18
(if (result i32)
(tee_local $28
(i32.load offset=20
@@ -1936,7 +1936,7 @@
(get_local $11)
(if (result i32)
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.sub
(i32.load
(i32.const 1216)
@@ -2291,7 +2291,7 @@
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16)
)
(block
@@ -2301,7 +2301,7 @@
(tee_local $6
(i32.add
(get_local $0)
- (get_local $18)
+ (get_local $17)
)
)
(i32.const 3)
@@ -2336,26 +2336,26 @@
(i32.store offset=4
(get_local $9)
(i32.or
- (get_local $18)
+ (get_local $17)
(i32.const 1)
)
)
(i32.store
(i32.add
(get_local $9)
- (get_local $18)
+ (get_local $17)
)
- (get_local $18)
+ (get_local $17)
)
(set_local $10
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 3)
)
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 256)
)
(block
@@ -2453,13 +2453,13 @@
(if (result i32)
(tee_local $6
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 8)
)
)
(if (result i32)
(i32.gt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16777215)
)
(i32.const 31)
@@ -2495,7 +2495,7 @@
(i32.or
(i32.and
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.add
(tee_local $13
(i32.add
@@ -2616,7 +2616,7 @@
)
(set_local $10
(i32.shl
- (get_local $18)
+ (get_local $17)
(select
(i32.const 0)
(i32.sub
@@ -2645,7 +2645,7 @@
(block $while-out27 (result i32)
(if
(i32.eq
- (get_local $18)
+ (get_local $17)
(i32.and
(i32.load offset=4
(get_local $2)
@@ -2654,7 +2654,7 @@
)
)
(block
- (set_local $17
+ (set_local $18
(get_local $2)
)
(br $while-out27
@@ -2748,7 +2748,7 @@
(i32.load
(tee_local $2
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -2761,7 +2761,7 @@
)
)
(i32.ge_u
- (get_local $17)
+ (get_local $18)
(get_local $3)
)
)
@@ -2780,7 +2780,7 @@
)
(i32.store offset=12
(get_local $9)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=24
(get_local $9)
@@ -2832,7 +2832,7 @@
)
(if
(i32.gt_u
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $11)
(get_local $6)
@@ -2852,21 +2852,21 @@
)
(i32.store
(i32.const 1216)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $21)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
(i32.store
(i32.add
- (get_local $17)
+ (get_local $18)
(get_local $21)
)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $16)
@@ -2893,7 +2893,7 @@
)
)
(i32.store
- (tee_local $17
+ (tee_local $18
(i32.add
(i32.add
(get_local $11)
@@ -2904,7 +2904,7 @@
)
(i32.or
(i32.load
- (get_local $17)
+ (get_local $18)
)
(i32.const 1)
)
@@ -2926,7 +2926,7 @@
(block
(i32.store
(i32.const 1220)
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $16)
(get_local $6)
@@ -2949,7 +2949,7 @@
(i32.store offset=4
(get_local $11)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
@@ -3029,7 +3029,7 @@
(i32.const 1688)
)
)
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $6)
(i32.const 47)
@@ -3057,7 +3057,7 @@
)
)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1648)
)
@@ -3079,7 +3079,7 @@
)
(i32.gt_u
(get_local $7)
- (get_local $18)
+ (get_local $17)
)
)
(block
@@ -3105,7 +3105,7 @@
(i32.const 188)
(block $label$break$b (result i32)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1232)
)
@@ -3123,7 +3123,7 @@
(get_local $7)
)
)
- (get_local $18)
+ (get_local $17)
)
(if
(i32.gt_u
@@ -3138,7 +3138,7 @@
)
(get_local $3)
)
- (get_local $18)
+ (get_local $17)
)
(block
(set_local $0
@@ -3240,7 +3240,7 @@
)
(if
(i32.ne
- (tee_local $18
+ (tee_local $17
(call $ta
(i32.const 0)
)
@@ -3252,7 +3252,7 @@
(if (result i32)
(i32.and
(tee_local $0
- (get_local $18)
+ (get_local $17)
)
(tee_local $19
(i32.add
@@ -3328,7 +3328,7 @@
(set_local $1
(if (result i32)
(i32.eq
- (get_local $18)
+ (get_local $17)
(tee_local $19
(call $ta
(get_local $2)
@@ -3337,7 +3337,7 @@
)
(block
(set_local $20
- (get_local $18)
+ (get_local $17)
)
(set_local $26
(get_local $2)
@@ -3397,19 +3397,19 @@
(tee_local $0
(i32.and
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1688)
)
)
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
)
(i32.sub
(i32.const 0)
- (get_local $18)
+ (get_local $17)
)
)
)
@@ -3576,7 +3576,7 @@
(if
(i32.eq
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.load
(tee_local $14
(i32.add
@@ -3602,7 +3602,7 @@
(get_local $14)
)
(set_local $50
- (get_local $17)
+ (get_local $18)
)
(set_local $51
(get_local $1)
@@ -3657,7 +3657,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(i32.and
(i32.sub
@@ -3688,7 +3688,7 @@
)
(i32.sub
(get_local $26)
- (get_local $17)
+ (get_local $18)
)
)
)
@@ -3821,7 +3821,7 @@
)
)
)
- (set_local $17
+ (set_local $18
(i32.add
(select
(i32.and
@@ -3872,20 +3872,20 @@
(set_local $1
(i32.add
(get_local $6)
- (get_local $17)
+ (get_local $18)
)
)
(set_local $16
(i32.sub
(i32.sub
(get_local $4)
- (get_local $17)
+ (get_local $18)
)
(get_local $6)
)
)
(i32.store offset=4
- (get_local $17)
+ (get_local $18)
(i32.or
(get_local $6)
(i32.const 3)
@@ -4130,7 +4130,7 @@
(i32.load
(tee_local $7
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $4)
(i32.const 16)
@@ -4150,14 +4150,14 @@
(if (result i32)
(tee_local $22
(i32.load
- (get_local $18)
+ (get_local $17)
)
)
(block (result i32)
(set_local $2
(get_local $22)
)
- (get_local $18)
+ (get_local $17)
)
(br $do-once51)
)
@@ -4254,7 +4254,7 @@
(i32.eq
(get_local $4)
(i32.load
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $0)
(i32.const 8)
@@ -4268,7 +4268,7 @@
(get_local $0)
)
(i32.store
- (get_local $18)
+ (get_local $17)
(get_local $7)
)
(set_local $24
@@ -4937,7 +4937,7 @@
)
(return
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -4986,7 +4986,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(get_local $12)
(tee_local $1
@@ -4997,7 +4997,7 @@
(i32.const 0)
(tee_local $16
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $0)
(i32.const -47)
@@ -5015,7 +5015,7 @@
(i32.const 7)
)
)
- (get_local $17)
+ (get_local $18)
)
)
(i32.lt_u
@@ -5096,7 +5096,7 @@
(i32.store
(tee_local $7
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 4)
)
)
@@ -5144,7 +5144,7 @@
)
(set_local $1
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 24)
)
)
@@ -5171,7 +5171,7 @@
(if
(i32.ne
(get_local $12)
- (get_local $17)
+ (get_local $18)
)
(block
(i32.store
@@ -5188,7 +5188,7 @@
(i32.or
(tee_local $1
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $12)
)
)
@@ -5196,7 +5196,7 @@
)
)
(i32.store
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
(set_local $4
@@ -6221,61 +6221,60 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (if
+ (i32.lt_u
+ (tee_local $3
+ (loop $while-in (result i32)
+ (if
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
)
)
- )
- )
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- )
- (set_local $3
- (if (result i32)
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
+ (if (result i32)
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
+ )
+ (block (result i32)
+ (set_local $12
(get_local $0)
- (i32.const 16)
)
+ (get_local $4)
)
)
)
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- (block (result i32)
- (set_local $12
- (get_local $0)
- )
- (get_local $4)
- )
)
- )
- )
- (if
- (i32.lt_u
- (get_local $3)
(get_local $14)
)
(call $qa)
@@ -8262,40 +8261,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index de91f08d8..a7877fe48 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -1546,81 +1546,83 @@
(set_local $8
(get_local $13)
)
- (loop $while-in14
- (if
- (i32.lt_u
- (tee_local $13
- (i32.sub
- (tee_local $2
- (i32.and
- (i32.load offset=4
- (get_local $8)
+ (set_local $6
+ (loop $while-in14 (result i32)
+ (if
+ (i32.lt_u
+ (tee_local $13
+ (i32.sub
+ (tee_local $2
+ (i32.and
+ (i32.load offset=4
+ (get_local $8)
+ )
+ (i32.const -8)
)
- (i32.const -8)
)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $4)
)
- (get_local $4)
- )
- (set_local $4
- (if (result i32)
- (i32.eq
- (get_local $0)
- (get_local $2)
- )
- (block
- (set_local $30
- (get_local $13)
- )
- (set_local $28
- (get_local $8)
- )
- (set_local $32
- (get_local $8)
+ (set_local $4
+ (if (result i32)
+ (i32.eq
+ (get_local $0)
+ (get_local $2)
)
- (set_local $8
- (i32.const 90)
+ (block
+ (set_local $30
+ (get_local $13)
+ )
+ (set_local $28
+ (get_local $8)
+ )
+ (set_local $32
+ (get_local $8)
+ )
+ (set_local $8
+ (i32.const 90)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
- )
- (block (result i32)
- (set_local $9
- (get_local $8)
+ (block (result i32)
+ (set_local $9
+ (get_local $8)
+ )
+ (get_local $13)
)
- (get_local $13)
)
)
)
- )
- (set_local $2
- (select
- (get_local $15)
- (tee_local $13
- (i32.load offset=20
- (get_local $8)
- )
- )
- (i32.or
- (i32.eqz
- (get_local $13)
+ (set_local $2
+ (select
+ (get_local $15)
+ (tee_local $13
+ (i32.load offset=20
+ (get_local $8)
+ )
)
- (i32.eq
- (get_local $13)
- (tee_local $8
- (i32.load
- (i32.add
+ (i32.or
+ (i32.eqz
+ (get_local $13)
+ )
+ (i32.eq
+ (get_local $13)
+ (tee_local $8
+ (i32.load
(i32.add
- (get_local $8)
- (i32.const 16)
- )
- (i32.shl
- (i32.shr_u
- (get_local $3)
- (i32.const 31)
+ (i32.add
+ (get_local $8)
+ (i32.const 16)
+ )
+ (i32.shl
+ (i32.shr_u
+ (get_local $3)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
- (i32.const 2)
)
)
)
@@ -1628,8 +1630,6 @@
)
)
)
- )
- (set_local $6
(if (result i32)
(tee_local $13
(i32.eqz
@@ -1837,7 +1837,7 @@
)
)
(block
- (set_local $18
+ (set_local $17
(get_local $36)
)
(set_local $11
@@ -1851,60 +1851,60 @@
(get_local $8)
(i32.const 90)
)
- (loop $while-in16
- (set_local $8
- (i32.const 0)
- )
- (set_local $3
- (i32.lt_u
- (tee_local $9
- (i32.sub
- (i32.and
- (i32.load offset=4
- (get_local $28)
+ (set_local $17
+ (loop $while-in16 (result i32)
+ (set_local $8
+ (i32.const 0)
+ )
+ (set_local $3
+ (i32.lt_u
+ (tee_local $9
+ (i32.sub
+ (i32.and
+ (i32.load offset=4
+ (get_local $28)
+ )
+ (i32.const -8)
)
- (i32.const -8)
+ (get_local $0)
)
- (get_local $0)
)
+ (get_local $30)
)
- (get_local $30)
- )
- )
- (set_local $6
- (select
- (get_local $9)
- (get_local $30)
- (get_local $3)
)
- )
- (set_local $9
- (select
- (get_local $28)
- (get_local $32)
- (get_local $3)
+ (set_local $6
+ (select
+ (get_local $9)
+ (get_local $30)
+ (get_local $3)
+ )
)
- )
- (if
- (tee_local $3
- (i32.load offset=16
+ (set_local $9
+ (select
(get_local $28)
+ (get_local $32)
+ (get_local $3)
)
)
- (block
- (set_local $30
- (get_local $6)
- )
- (set_local $28
- (get_local $3)
+ (if
+ (tee_local $3
+ (i32.load offset=16
+ (get_local $28)
+ )
)
- (set_local $32
- (get_local $9)
+ (block
+ (set_local $30
+ (get_local $6)
+ )
+ (set_local $28
+ (get_local $3)
+ )
+ (set_local $32
+ (get_local $9)
+ )
+ (br $while-in16)
)
- (br $while-in16)
)
- )
- (set_local $18
(if (result i32)
(tee_local $28
(i32.load offset=20
@@ -1934,7 +1934,7 @@
(get_local $11)
(if (result i32)
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.sub
(i32.load
(i32.const 1216)
@@ -2289,7 +2289,7 @@
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16)
)
(block
@@ -2299,7 +2299,7 @@
(tee_local $6
(i32.add
(get_local $0)
- (get_local $18)
+ (get_local $17)
)
)
(i32.const 3)
@@ -2334,26 +2334,26 @@
(i32.store offset=4
(get_local $9)
(i32.or
- (get_local $18)
+ (get_local $17)
(i32.const 1)
)
)
(i32.store
(i32.add
(get_local $9)
- (get_local $18)
+ (get_local $17)
)
- (get_local $18)
+ (get_local $17)
)
(set_local $10
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 3)
)
)
(if
(i32.lt_u
- (get_local $18)
+ (get_local $17)
(i32.const 256)
)
(block
@@ -2451,13 +2451,13 @@
(if (result i32)
(tee_local $6
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.const 8)
)
)
(if (result i32)
(i32.gt_u
- (get_local $18)
+ (get_local $17)
(i32.const 16777215)
)
(i32.const 31)
@@ -2493,7 +2493,7 @@
(i32.or
(i32.and
(i32.shr_u
- (get_local $18)
+ (get_local $17)
(i32.add
(tee_local $13
(i32.add
@@ -2614,7 +2614,7 @@
)
(set_local $10
(i32.shl
- (get_local $18)
+ (get_local $17)
(select
(i32.const 0)
(i32.sub
@@ -2643,7 +2643,7 @@
(block $while-out27 (result i32)
(if
(i32.eq
- (get_local $18)
+ (get_local $17)
(i32.and
(i32.load offset=4
(get_local $2)
@@ -2652,7 +2652,7 @@
)
)
(block
- (set_local $17
+ (set_local $18
(get_local $2)
)
(br $while-out27
@@ -2746,7 +2746,7 @@
(i32.load
(tee_local $2
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -2759,7 +2759,7 @@
)
)
(i32.ge_u
- (get_local $17)
+ (get_local $18)
(get_local $3)
)
)
@@ -2778,7 +2778,7 @@
)
(i32.store offset=12
(get_local $9)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=24
(get_local $9)
@@ -2830,7 +2830,7 @@
)
(if
(i32.gt_u
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $11)
(get_local $6)
@@ -2850,21 +2850,21 @@
)
(i32.store
(i32.const 1216)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $21)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
(i32.store
(i32.add
- (get_local $17)
+ (get_local $18)
(get_local $21)
)
- (get_local $17)
+ (get_local $18)
)
(i32.store offset=4
(get_local $16)
@@ -2891,7 +2891,7 @@
)
)
(i32.store
- (tee_local $17
+ (tee_local $18
(i32.add
(i32.add
(get_local $11)
@@ -2902,7 +2902,7 @@
)
(i32.or
(i32.load
- (get_local $17)
+ (get_local $18)
)
(i32.const 1)
)
@@ -2924,7 +2924,7 @@
(block
(i32.store
(i32.const 1220)
- (tee_local $17
+ (tee_local $18
(i32.sub
(get_local $16)
(get_local $6)
@@ -2947,7 +2947,7 @@
(i32.store offset=4
(get_local $11)
(i32.or
- (get_local $17)
+ (get_local $18)
(i32.const 1)
)
)
@@ -3027,7 +3027,7 @@
(i32.const 1688)
)
)
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $6)
(i32.const 47)
@@ -3055,7 +3055,7 @@
)
)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1648)
)
@@ -3077,7 +3077,7 @@
)
(i32.gt_u
(get_local $7)
- (get_local $18)
+ (get_local $17)
)
)
(block
@@ -3103,7 +3103,7 @@
(i32.const 188)
(block $label$break$b (result i32)
(if
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1232)
)
@@ -3121,7 +3121,7 @@
(get_local $7)
)
)
- (get_local $18)
+ (get_local $17)
)
(if
(i32.gt_u
@@ -3136,7 +3136,7 @@
)
(get_local $3)
)
- (get_local $18)
+ (get_local $17)
)
(block
(set_local $0
@@ -3238,7 +3238,7 @@
)
(if
(i32.ne
- (tee_local $18
+ (tee_local $17
(call $ta
(i32.const 0)
)
@@ -3250,7 +3250,7 @@
(if (result i32)
(i32.and
(tee_local $0
- (get_local $18)
+ (get_local $17)
)
(tee_local $19
(i32.add
@@ -3326,7 +3326,7 @@
(set_local $1
(if (result i32)
(i32.eq
- (get_local $18)
+ (get_local $17)
(tee_local $19
(call $ta
(get_local $2)
@@ -3335,7 +3335,7 @@
)
(block
(set_local $20
- (get_local $18)
+ (get_local $17)
)
(set_local $26
(get_local $2)
@@ -3395,19 +3395,19 @@
(tee_local $0
(i32.and
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.load
(i32.const 1688)
)
)
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
)
(i32.sub
(i32.const 0)
- (get_local $18)
+ (get_local $17)
)
)
)
@@ -3574,7 +3574,7 @@
(if
(i32.eq
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.load
(tee_local $14
(i32.add
@@ -3600,7 +3600,7 @@
(get_local $14)
)
(set_local $50
- (get_local $17)
+ (get_local $18)
)
(set_local $51
(get_local $1)
@@ -3655,7 +3655,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(i32.and
(i32.sub
@@ -3686,7 +3686,7 @@
)
(i32.sub
(get_local $26)
- (get_local $17)
+ (get_local $18)
)
)
)
@@ -3819,7 +3819,7 @@
)
)
)
- (set_local $17
+ (set_local $18
(i32.add
(select
(i32.and
@@ -3870,20 +3870,20 @@
(set_local $1
(i32.add
(get_local $6)
- (get_local $17)
+ (get_local $18)
)
)
(set_local $16
(i32.sub
(i32.sub
(get_local $4)
- (get_local $17)
+ (get_local $18)
)
(get_local $6)
)
)
(i32.store offset=4
- (get_local $17)
+ (get_local $18)
(i32.or
(get_local $6)
(i32.const 3)
@@ -4128,7 +4128,7 @@
(i32.load
(tee_local $7
(i32.add
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $4)
(i32.const 16)
@@ -4148,14 +4148,14 @@
(if (result i32)
(tee_local $22
(i32.load
- (get_local $18)
+ (get_local $17)
)
)
(block (result i32)
(set_local $2
(get_local $22)
)
- (get_local $18)
+ (get_local $17)
)
(br $do-once51)
)
@@ -4252,7 +4252,7 @@
(i32.eq
(get_local $4)
(i32.load
- (tee_local $18
+ (tee_local $17
(i32.add
(get_local $0)
(i32.const 8)
@@ -4266,7 +4266,7 @@
(get_local $0)
)
(i32.store
- (get_local $18)
+ (get_local $17)
(get_local $7)
)
(set_local $24
@@ -4935,7 +4935,7 @@
)
(return
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 8)
)
)
@@ -4984,7 +4984,7 @@
)
(set_local $1
(i32.add
- (tee_local $17
+ (tee_local $18
(select
(get_local $12)
(tee_local $1
@@ -4995,7 +4995,7 @@
(i32.const 0)
(tee_local $16
(i32.add
- (tee_local $17
+ (tee_local $18
(i32.add
(get_local $0)
(i32.const -47)
@@ -5013,7 +5013,7 @@
(i32.const 7)
)
)
- (get_local $17)
+ (get_local $18)
)
)
(i32.lt_u
@@ -5094,7 +5094,7 @@
(i32.store
(tee_local $7
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 4)
)
)
@@ -5142,7 +5142,7 @@
)
(set_local $1
(i32.add
- (get_local $17)
+ (get_local $18)
(i32.const 24)
)
)
@@ -5169,7 +5169,7 @@
(if
(i32.ne
(get_local $12)
- (get_local $17)
+ (get_local $18)
)
(block
(i32.store
@@ -5186,7 +5186,7 @@
(i32.or
(tee_local $1
(i32.sub
- (get_local $17)
+ (get_local $18)
(get_local $12)
)
)
@@ -5194,7 +5194,7 @@
)
)
(i32.store
- (get_local $17)
+ (get_local $18)
(get_local $1)
)
(set_local $4
@@ -6219,61 +6219,60 @@
)
)
)
- (loop $while-in
- (if
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
- (get_local $0)
- (i32.const 20)
+ (if
+ (i32.lt_u
+ (tee_local $3
+ (loop $while-in (result i32)
+ (if
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 20)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
)
)
- )
- )
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- )
- (set_local $3
- (if (result i32)
- (tee_local $9
- (i32.load
- (tee_local $3
- (i32.add
+ (if (result i32)
+ (tee_local $9
+ (i32.load
+ (tee_local $3
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $9)
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br $while-in)
+ )
+ (block (result i32)
+ (set_local $12
(get_local $0)
- (i32.const 16)
)
+ (get_local $4)
)
)
)
- (block
- (set_local $0
- (get_local $9)
- )
- (set_local $4
- (get_local $3)
- )
- (br $while-in)
- )
- (block (result i32)
- (set_local $12
- (get_local $0)
- )
- (get_local $4)
- )
)
- )
- )
- (if
- (i32.lt_u
- (get_local $3)
(get_local $14)
)
(call $qa)
@@ -8257,40 +8256,40 @@
(set_local $4
(get_local $3)
)
- (loop $while-in
- (if
- (i32.eqz
- (i32.load8_s
- (get_local $0)
+ (set_local $1
+ (loop $while-in (result i32)
+ (if
+ (i32.eqz
+ (i32.load8_s
+ (get_local $0)
+ )
)
- )
- (block
- (set_local $5
- (get_local $4)
+ (block
+ (set_local $5
+ (get_local $4)
+ )
+ (br $label$break$a)
)
- (br $label$break$a)
)
- )
- (br_if $while-in
- (i32.and
- (tee_local $4
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in
+ (i32.and
+ (tee_local $4
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
)
+ (i32.const 3)
)
- (i32.const 3)
)
+ (set_local $2
+ (i32.const 4)
+ )
+ (get_local $0)
)
)
- (set_local $2
- (i32.const 4)
- )
- (set_local $1
- (get_local $0)
- )
)
(block
(set_local $1
diff --git a/test/passes/inlining-optimizing_optimize-level=3.txt b/test/passes/inlining-optimizing_optimize-level=3.txt
index 1e3c20a57..0e9ca7350 100644
--- a/test/passes/inlining-optimizing_optimize-level=3.txt
+++ b/test/passes/inlining-optimizing_optimize-level=3.txt
@@ -2320,16 +2320,16 @@
(block $label$break$L1
(if
(i32.gt_s
- (get_local $16)
+ (get_local $17)
(i32.const -1)
)
- (set_local $16
+ (set_local $17
(if (result i32)
(i32.gt_s
(get_local $10)
(i32.sub
(i32.const 2147483647)
- (get_local $16)
+ (get_local $17)
)
)
(block (result i32)
@@ -2341,7 +2341,7 @@
)
(i32.add
(get_local $10)
- (get_local $16)
+ (get_local $17)
)
)
)
@@ -2537,103 +2537,100 @@
)
)
)
- (if
- (i32.eq
- (i32.and
- (tee_local $12
- (i32.shr_s
- (i32.shl
- (get_local $6)
+ (set_local $1
+ (if (result i32)
+ (i32.eq
+ (i32.and
+ (tee_local $12
+ (i32.shr_s
+ (i32.shl
+ (get_local $6)
+ (i32.const 24)
+ )
(i32.const 24)
)
- (i32.const 24)
)
+ (i32.const -32)
)
- (i32.const -32)
- )
- (i32.const 32)
- )
- (block $label$break$L25
- (set_local $1
- (get_local $6)
- )
- (set_local $6
- (get_local $12)
- )
- (set_local $12
- (i32.const 0)
+ (i32.const 32)
)
- (loop $while-in4
- (if
- (i32.eqz
- (i32.and
- (i32.shl
- (i32.const 1)
- (i32.add
- (get_local $6)
- (i32.const -32)
+ (block $label$break$L25 (result i32)
+ (set_local $1
+ (get_local $6)
+ )
+ (set_local $6
+ (get_local $12)
+ )
+ (set_local $12
+ (i32.const 0)
+ )
+ (loop $while-in4 (result i32)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.shl
+ (i32.const 1)
+ (i32.add
+ (get_local $6)
+ (i32.const -32)
+ )
)
+ (i32.const 75913)
)
- (i32.const 75913)
)
- )
- (block
- (set_local $6
- (get_local $1)
- )
- (set_local $1
- (get_local $12)
+ (block
+ (set_local $6
+ (get_local $1)
+ )
+ (br $label$break$L25
+ (get_local $12)
+ )
)
- (br $label$break$L25)
)
- )
- (set_local $12
- (i32.or
- (i32.shl
- (i32.const 1)
- (i32.add
- (i32.shr_s
- (i32.shl
- (get_local $1)
+ (set_local $12
+ (i32.or
+ (i32.shl
+ (i32.const 1)
+ (i32.add
+ (i32.shr_s
+ (i32.shl
+ (get_local $1)
+ (i32.const 24)
+ )
(i32.const 24)
)
- (i32.const 24)
+ (i32.const -32)
)
- (i32.const -32)
)
+ (get_local $12)
)
- (get_local $12)
)
- )
- (br_if $while-in4
- (i32.eq
- (i32.and
- (tee_local $6
- (tee_local $1
- (i32.load8_s
- (tee_local $10
- (i32.add
- (get_local $10)
- (i32.const 1)
+ (br_if $while-in4
+ (i32.eq
+ (i32.and
+ (tee_local $6
+ (tee_local $1
+ (i32.load8_s
+ (tee_local $10
+ (i32.add
+ (get_local $10)
+ (i32.const 1)
+ )
)
)
)
)
+ (i32.const -32)
)
- (i32.const -32)
+ (i32.const 32)
)
- (i32.const 32)
)
+ (set_local $6
+ (get_local $1)
+ )
+ (get_local $12)
)
)
- (set_local $6
- (get_local $1)
- )
- (set_local $1
- (get_local $12)
- )
- )
- (set_local $1
(i32.const 0)
)
)
@@ -2707,7 +2704,7 @@
(set_local $8
(i32.const 1)
)
- (set_local $17
+ (set_local $16
(i32.load
(get_local $6)
)
@@ -2722,7 +2719,7 @@
(if
(get_local $8)
(block
- (set_local $16
+ (set_local $17
(i32.const -1)
)
(br $label$break$L1)
@@ -2739,7 +2736,7 @@
(set_local $10
(get_local $6)
)
- (set_local $17
+ (set_local $16
(i32.const 0)
)
(br $do-once5
@@ -2747,7 +2744,7 @@
)
)
)
- (set_local $17
+ (set_local $16
(i32.load
(tee_local $10
(i32.and
@@ -2778,14 +2775,14 @@
(set_local $12
(if (result i32)
(i32.lt_s
- (get_local $17)
+ (get_local $16)
(i32.const 0)
)
(block (result i32)
- (set_local $17
+ (set_local $16
(i32.sub
(i32.const 0)
- (get_local $17)
+ (get_local $16)
)
)
(i32.or
@@ -2862,7 +2859,7 @@
(i32.const 0)
)
(block
- (set_local $16
+ (set_local $17
(i32.const -1)
)
(br $label$break$L1)
@@ -2871,7 +2868,7 @@
(set_local $12
(get_local $1)
)
- (set_local $17
+ (set_local $16
(get_local $6)
)
(get_local $8)
@@ -2882,7 +2879,7 @@
(set_local $12
(get_local $1)
)
- (set_local $17
+ (set_local $16
(i32.const 0)
)
(get_local $8)
@@ -3054,7 +3051,7 @@
(if
(get_local $1)
(block
- (set_local $16
+ (set_local $17
(i32.const -1)
)
(br $label$break$L1)
@@ -3107,33 +3104,33 @@
(set_local $9
(i32.const 0)
)
- (loop $while-in13
- (if
- (i32.gt_u
- (tee_local $11
- (i32.add
- (i32.load8_s
- (get_local $8)
+ (set_local $19
+ (loop $while-in13 (result i32)
+ (if
+ (i32.gt_u
+ (tee_local $11
+ (i32.add
+ (i32.load8_s
+ (get_local $8)
+ )
+ (i32.const -65)
)
- (i32.const -65)
)
+ (i32.const 57)
)
- (i32.const 57)
- )
- (block
- (set_local $16
- (i32.const -1)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L1)
)
- (br $label$break$L1)
)
- )
- (set_local $10
- (i32.add
- (get_local $8)
- (i32.const 1)
+ (set_local $10
+ (i32.add
+ (get_local $8)
+ (i32.const 1)
+ )
)
- )
- (set_local $19
(if (result i32)
(i32.lt_u
(i32.add
@@ -3181,7 +3178,7 @@
)
)
(block
- (set_local $16
+ (set_local $17
(i32.const -1)
)
(br $label$break$L1)
@@ -3206,7 +3203,7 @@
(if
(get_local $8)
(block
- (set_local $16
+ (set_local $17
(i32.const -1)
)
(br $label$break$L1)
@@ -3258,7 +3255,7 @@
(get_local $28)
)
(block
- (set_local $16
+ (set_local $17
(i32.const 0)
)
(br $label$break$L1)
@@ -3316,73 +3313,121 @@
(i32.sub
(block $__rjto$8 (result i32)
(block $__rjti$8
- (block $__rjti$7
- (block $__rjti$6
- (block $__rjti$5
- (block $__rjti$4
- (block $__rjti$3
- (block $switch-default120
- (block $switch-case42
- (block $switch-case41
- (block $switch-case40
- (block $switch-case39
- (block $switch-case38
- (block $switch-case37
- (block $switch-case36
- (block $switch-case34
- (block $switch-case33
- (block $switch-case29
- (block $switch-case28
- (block $switch-case27
- (br_table $switch-case42 $switch-default120 $switch-case40 $switch-default120 $switch-case42 $switch-case42 $switch-case42 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case41 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case29 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case42 $switch-default120 $switch-case37 $switch-case34 $switch-case42 $switch-case42 $switch-case42 $switch-default120 $switch-case34 $switch-default120 $switch-default120 $switch-default120 $switch-case38 $switch-case27 $switch-case33 $switch-case28 $switch-default120 $switch-default120 $switch-case39 $switch-default120 $switch-case36 $switch-default120 $switch-default120 $switch-case29 $switch-default120
- (i32.sub
- (tee_local $19
- (select
- (i32.and
- (tee_local $11
- (i32.load8_s
- (get_local $19)
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (tee_local $7
+ (block $__rjti$7 (result i32)
+ (block $__rjti$6
+ (block $__rjti$5
+ (block $__rjti$4
+ (block $__rjti$3
+ (block $switch-default120
+ (block $switch-case42
+ (block $switch-case41
+ (block $switch-case40
+ (block $switch-case39
+ (block $switch-case38
+ (block $switch-case37
+ (block $switch-case36
+ (block $switch-case34
+ (block $switch-case33
+ (block $switch-case29
+ (block $switch-case28
+ (block $switch-case27
+ (br_table $switch-case42 $switch-default120 $switch-case40 $switch-default120 $switch-case42 $switch-case42 $switch-case42 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case41 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case29 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-default120 $switch-case42 $switch-default120 $switch-case37 $switch-case34 $switch-case42 $switch-case42 $switch-case42 $switch-default120 $switch-case34 $switch-default120 $switch-default120 $switch-default120 $switch-case38 $switch-case27 $switch-case33 $switch-case28 $switch-default120 $switch-default120 $switch-case39 $switch-default120 $switch-case36 $switch-default120 $switch-default120 $switch-case29 $switch-default120
+ (i32.sub
+ (tee_local $19
+ (select
+ (i32.and
+ (tee_local $11
+ (i32.load8_s
+ (get_local $19)
+ )
+ )
+ (i32.const -33)
)
- )
- (i32.const -33)
- )
- (get_local $11)
- (i32.and
- (i32.eq
+ (get_local $11)
(i32.and
- (get_local $11)
- (i32.const 15)
+ (i32.eq
+ (i32.and
+ (get_local $11)
+ (i32.const 15)
+ )
+ (i32.const 3)
+ )
+ (i32.ne
+ (get_local $9)
+ (i32.const 0)
+ )
)
- (i32.const 3)
- )
- (i32.ne
- (get_local $9)
- (i32.const 0)
)
)
+ (i32.const 65)
)
)
- (i32.const 65)
)
- )
- )
- (block $switch-default26
- (block $switch-case25
- (block $switch-case24
- (block $switch-case23
- (block $switch-case22
- (block $switch-case21
- (block $switch-case20
- (block $switch-case19
- (br_table $switch-case19 $switch-case20 $switch-case21 $switch-case22 $switch-case23 $switch-default26 $switch-case24 $switch-case25 $switch-default26
- (get_local $9)
+ (block $switch-default26
+ (block $switch-case25
+ (block $switch-case24
+ (block $switch-case23
+ (block $switch-case22
+ (block $switch-case21
+ (block $switch-case20
+ (block $switch-case19
+ (br_table $switch-case19 $switch-case20 $switch-case21 $switch-case22 $switch-case23 $switch-default26 $switch-case24 $switch-case25 $switch-default26
+ (get_local $9)
+ )
+ )
+ (i32.store
+ (i32.load
+ (get_local $14)
+ )
+ (get_local $17)
+ )
+ (set_local $5
+ (get_local $10)
+ )
+ (set_local $10
+ (get_local $7)
+ )
+ (br $label$continue$L1)
+ )
+ (i32.store
+ (i32.load
+ (get_local $14)
+ )
+ (get_local $17)
)
+ (set_local $5
+ (get_local $10)
+ )
+ (set_local $10
+ (get_local $7)
+ )
+ (br $label$continue$L1)
)
(i32.store
- (i32.load
- (get_local $14)
+ (tee_local $5
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (get_local $17)
+ )
+ (i32.store offset=4
+ (get_local $5)
+ (i32.shr_s
+ (i32.shl
+ (i32.lt_s
+ (get_local $17)
+ (i32.const 0)
+ )
+ (i32.const 31)
+ )
+ (i32.const 31)
)
- (get_local $16)
)
(set_local $5
(get_local $10)
@@ -3392,11 +3437,11 @@
)
(br $label$continue$L1)
)
- (i32.store
+ (i32.store16
(i32.load
(get_local $14)
)
- (get_local $16)
+ (get_local $17)
)
(set_local $5
(get_local $10)
@@ -3406,26 +3451,11 @@
)
(br $label$continue$L1)
)
- (i32.store
- (tee_local $5
- (i32.load
- (get_local $14)
- )
- )
- (get_local $16)
- )
- (i32.store offset=4
- (get_local $5)
- (i32.shr_s
- (i32.shl
- (i32.lt_s
- (get_local $16)
- (i32.const 0)
- )
- (i32.const 31)
- )
- (i32.const 31)
+ (i32.store8
+ (i32.load
+ (get_local $14)
)
+ (get_local $17)
)
(set_local $5
(get_local $10)
@@ -3435,11 +3465,11 @@
)
(br $label$continue$L1)
)
- (i32.store16
+ (i32.store
(i32.load
(get_local $14)
)
- (get_local $16)
+ (get_local $17)
)
(set_local $5
(get_local $10)
@@ -3449,11 +3479,26 @@
)
(br $label$continue$L1)
)
- (i32.store8
- (i32.load
- (get_local $14)
+ (i32.store
+ (tee_local $5
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (get_local $17)
+ )
+ (i32.store offset=4
+ (get_local $5)
+ (i32.shr_s
+ (i32.shl
+ (i32.lt_s
+ (get_local $17)
+ (i32.const 0)
+ )
+ (i32.const 31)
+ )
+ (i32.const 31)
)
- (get_local $16)
)
(set_local $5
(get_local $10)
@@ -3463,12 +3508,6 @@
)
(br $label$continue$L1)
)
- (i32.store
- (i32.load
- (get_local $14)
- )
- (get_local $16)
- )
(set_local $5
(get_local $10)
)
@@ -3477,162 +3516,225 @@
)
(br $label$continue$L1)
)
- (i32.store
- (tee_local $5
- (i32.load
- (get_local $14)
- )
+ (set_local $7
+ (i32.or
+ (get_local $12)
+ (i32.const 8)
)
- (get_local $16)
)
- (i32.store offset=4
- (get_local $5)
- (i32.shr_s
- (i32.shl
- (i32.lt_s
- (get_local $16)
- (i32.const 0)
- )
- (i32.const 31)
+ (set_local $6
+ (select
+ (get_local $6)
+ (i32.const 8)
+ (i32.gt_u
+ (get_local $6)
+ (i32.const 8)
)
- (i32.const 31)
)
)
- (set_local $5
- (get_local $10)
+ (set_local $19
+ (i32.const 120)
)
- (set_local $10
- (get_local $7)
+ (br $__rjti$3)
+ )
+ (set_local $7
+ (get_local $12)
+ )
+ (br $__rjti$3)
+ )
+ (if
+ (i32.or
+ (tee_local $7
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (tee_local $8
+ (i32.load offset=4
+ (get_local $14)
+ )
)
- (br $label$continue$L1)
)
- (set_local $5
- (get_local $10)
+ (block
+ (set_local $5
+ (get_local $7)
+ )
+ (set_local $7
+ (get_local $8)
+ )
+ (set_local $8
+ (get_local $25)
+ )
+ (loop $while-in32
+ (i32.store8
+ (tee_local $8
+ (i32.add
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (i32.and
+ (get_local $5)
+ (i32.const 7)
+ )
+ (i32.const 48)
+ )
+ )
+ (br_if $while-in32
+ (i32.or
+ (tee_local $5
+ (call $_bitshift64Lshr
+ (get_local $5)
+ (get_local $7)
+ (i32.const 3)
+ )
+ )
+ (tee_local $7
+ (get_global $tempRet0)
+ )
+ )
+ )
+ )
)
- (set_local $10
- (get_local $7)
+ (set_local $8
+ (get_local $25)
)
- (br $label$continue$L1)
)
- (set_local $7
- (i32.or
+ (if
+ (i32.and
(get_local $12)
(i32.const 8)
)
- )
- (set_local $6
- (select
- (get_local $6)
- (i32.const 8)
- (i32.gt_u
- (get_local $6)
- (i32.const 8)
+ (block
+ (set_local $7
+ (get_local $12)
+ )
+ (set_local $6
+ (select
+ (tee_local $12
+ (i32.add
+ (i32.sub
+ (get_local $39)
+ (get_local $8)
+ )
+ (i32.const 1)
+ )
+ )
+ (get_local $6)
+ (i32.lt_s
+ (get_local $6)
+ (get_local $12)
+ )
+ )
)
)
- )
- (set_local $19
- (i32.const 120)
- )
- (br $__rjti$3)
- )
- (set_local $7
- (get_local $12)
- )
- (br $__rjti$3)
- )
- (if
- (i32.or
- (tee_local $7
- (i32.load
- (get_local $14)
- )
- )
- (tee_local $8
- (i32.load offset=4
- (get_local $14)
+ (set_local $7
+ (get_local $12)
)
)
- )
- (block
(set_local $5
- (get_local $7)
- )
- (set_local $7
(get_local $8)
)
(set_local $8
- (get_local $25)
+ (i32.const 0)
)
- (loop $while-in32
- (i32.store8
- (tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
- )
+ (set_local $9
+ (i32.const 4091)
+ )
+ (br $__rjti$8)
+ )
+ (set_local $5
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (if
+ (i32.lt_s
+ (tee_local $7
+ (i32.load offset=4
+ (get_local $14)
)
- (i32.or
- (i32.and
+ )
+ (i32.const 0)
+ )
+ (block
+ (set_global $tempRet0
+ (i32.sub
+ (i32.sub
+ (i32.const 0)
+ (get_local $7)
+ )
+ (i32.gt_u
(get_local $5)
- (i32.const 7)
+ (i32.const 0)
)
- (i32.const 48)
)
)
- (br_if $while-in32
- (i32.or
- (tee_local $5
- (call $_bitshift64Lshr
- (get_local $5)
- (get_local $7)
- (i32.const 3)
- )
- )
- (tee_local $7
- (get_global $tempRet0)
+ (i32.store
+ (get_local $14)
+ (tee_local $5
+ (i32.sub
+ (i32.const 0)
+ (get_local $5)
)
)
)
+ (i32.store offset=4
+ (get_local $14)
+ (tee_local $7
+ (get_global $tempRet0)
+ )
+ )
+ (set_local $8
+ (i32.const 1)
+ )
+ (set_local $9
+ (i32.const 4091)
+ )
+ (br $__rjti$4)
)
)
- (set_local $8
- (get_local $25)
- )
- )
- (if
- (i32.and
- (get_local $12)
- (i32.const 8)
- )
- (block
- (set_local $7
- (get_local $12)
- )
- (set_local $6
- (select
- (tee_local $12
- (i32.add
- (i32.sub
- (get_local $39)
- (get_local $8)
+ (set_local $9
+ (if (result i32)
+ (i32.and
+ (get_local $12)
+ (i32.const 2048)
+ )
+ (block (result i32)
+ (set_local $8
+ (i32.const 1)
+ )
+ (i32.const 4092)
+ )
+ (block (result i32)
+ (set_local $8
+ (tee_local $9
+ (i32.and
+ (get_local $12)
+ (i32.const 1)
)
- (i32.const 1)
)
)
- (get_local $6)
- (i32.lt_s
- (get_local $6)
- (get_local $12)
+ (select
+ (i32.const 4093)
+ (i32.const 4091)
+ (get_local $9)
)
)
)
)
- (set_local $7
- (get_local $12)
- )
+ (br $__rjti$4)
)
(set_local $5
- (get_local $8)
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (set_local $7
+ (i32.load offset=4
+ (get_local $14)
+ )
)
(set_local $8
(i32.const 0)
@@ -3640,2417 +3742,2192 @@
(set_local $9
(i32.const 4091)
)
- (br $__rjti$8)
+ (br $__rjti$4)
)
- (set_local $5
- (i32.load
+ (drop
+ (i32.load offset=4
(get_local $14)
)
)
- (if
- (i32.lt_s
- (tee_local $7
- (i32.load offset=4
- (get_local $14)
- )
- )
- (i32.const 0)
- )
- (block
- (set_global $tempRet0
- (i32.sub
- (i32.sub
- (i32.const 0)
- (get_local $7)
- )
- (i32.gt_u
- (get_local $5)
- (i32.const 0)
- )
- )
- )
- (i32.store
- (get_local $14)
- (tee_local $5
- (i32.sub
- (i32.const 0)
- (get_local $5)
- )
- )
- )
- (i32.store offset=4
- (get_local $14)
- (tee_local $7
- (get_global $tempRet0)
- )
- )
- (set_local $8
- (i32.const 1)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjti$4)
+ (i32.store8
+ (get_local $40)
+ (i32.load
+ (get_local $14)
)
)
+ (set_local $7
+ (get_local $40)
+ )
+ (set_local $12
+ (get_local $8)
+ )
+ (set_local $11
+ (i32.const 1)
+ )
+ (set_local $8
+ (i32.const 0)
+ )
(set_local $9
- (if (result i32)
- (i32.and
- (get_local $12)
- (i32.const 2048)
- )
- (block (result i32)
- (set_local $8
- (i32.const 1)
- )
- (i32.const 4092)
- )
- (block (result i32)
- (set_local $8
- (tee_local $9
- (i32.and
- (get_local $12)
- (i32.const 1)
- )
- )
- )
- (select
- (i32.const 4093)
- (i32.const 4091)
- (get_local $9)
- )
- )
- )
+ (i32.const 4091)
)
- (br $__rjti$4)
- )
- (set_local $5
- (i32.load
- (get_local $14)
+ (br $__rjto$8
+ (get_local $25)
)
)
- (set_local $7
- (i32.load offset=4
- (get_local $14)
+ (set_local $5
+ (call $_strerror
+ (i32.load
+ (call $___errno_location)
+ )
)
)
- (set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjti$4)
- )
- (drop
- (i32.load offset=4
- (get_local $14)
- )
+ (br $__rjti$5)
)
- (i32.store8
- (get_local $40)
- (i32.load
- (get_local $14)
+ (set_local $5
+ (select
+ (tee_local $5
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (i32.const 4101)
+ (get_local $5)
)
)
- (set_local $7
- (get_local $40)
- )
- (set_local $12
- (get_local $8)
+ (br $__rjti$5)
+ )
+ (drop
+ (i32.load offset=4
+ (get_local $14)
)
- (set_local $11
- (i32.const 1)
+ )
+ (i32.store
+ (get_local $41)
+ (i32.load
+ (get_local $14)
)
+ )
+ (i32.store
+ (get_local $44)
+ (i32.const 0)
+ )
+ (i32.store
+ (get_local $14)
+ (get_local $41)
+ )
+ (set_local $8
+ (i32.const -1)
+ )
+ (br $__rjti$6)
+ )
+ (if
+ (get_local $6)
+ (block
(set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjto$8
- (get_local $25)
+ (get_local $6)
)
+ (br $__rjti$6)
)
- (set_local $5
- (call $_strerror
- (i32.load
- (call $___errno_location)
- )
+ (block
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (i32.const 0)
+ (get_local $12)
)
- )
- (br $__rjti$5)
- )
- (set_local $5
- (select
- (tee_local $5
- (i32.load
- (get_local $14)
- )
+ (br $__rjti$7
+ (i32.const 0)
)
- (i32.const 4101)
- (get_local $5)
)
)
- (br $__rjti$5)
- )
- (drop
- (i32.load offset=4
- (get_local $14)
- )
)
- (i32.store
- (get_local $41)
- (i32.load
+ (set_local $15
+ (f64.load
(get_local $14)
)
)
(i32.store
- (get_local $44)
+ (get_local $21)
(i32.const 0)
)
- (i32.store
- (get_local $14)
- (get_local $41)
- )
- (set_local $8
- (i32.const -1)
+ (f64.store
+ (get_global $tempDoublePtr)
+ (get_local $15)
)
- (br $__rjti$6)
- )
- (if
- (get_local $6)
- (block
- (set_local $8
- (get_local $6)
- )
- (br $__rjti$6)
- )
- (block
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (i32.const 0)
- (get_local $12)
- )
- (set_local $7
- (i32.const 0)
- )
- (br $__rjti$7)
- )
- )
- )
- (set_local $15
- (f64.load
- (get_local $14)
- )
- )
- (i32.store
- (get_local $21)
- (i32.const 0)
- )
- (f64.store
- (get_global $tempDoublePtr)
- (get_local $15)
- )
- (drop
- (i32.load
- (get_global $tempDoublePtr)
- )
- )
- (set_local $30
- (if (result i32)
- (i32.lt_s
- (i32.load offset=4
+ (drop
+ (i32.load
(get_global $tempDoublePtr)
)
- (i32.const 0)
)
- (block (result i32)
- (set_local $27
- (i32.const 1)
- )
- (set_local $15
- (f64.neg
- (get_local $15)
+ (set_local $30
+ (if (result i32)
+ (i32.lt_s
+ (i32.load offset=4
+ (get_global $tempDoublePtr)
+ )
+ (i32.const 0)
)
- )
- (i32.const 4108)
- )
- (if (result i32)
- (i32.and
- (get_local $12)
- (i32.const 2048)
- )
- (block (result i32)
- (set_local $27
- (i32.const 1)
+ (block (result i32)
+ (set_local $27
+ (i32.const 1)
+ )
+ (set_local $15
+ (f64.neg
+ (get_local $15)
+ )
+ )
+ (i32.const 4108)
)
- (i32.const 4111)
- )
- (block (result i32)
- (set_local $27
- (tee_local $5
- (i32.and
- (get_local $12)
+ (if (result i32)
+ (i32.and
+ (get_local $12)
+ (i32.const 2048)
+ )
+ (block (result i32)
+ (set_local $27
(i32.const 1)
)
+ (i32.const 4111)
)
- )
- (select
- (i32.const 4114)
- (i32.const 4109)
- (get_local $5)
- )
- )
- )
- )
- )
- (f64.store
- (get_global $tempDoublePtr)
- (get_local $15)
- )
- (drop
- (i32.load
- (get_global $tempDoublePtr)
- )
- )
- (set_local $7
- (if (result i32)
- (i32.lt_u
- (i32.and
- (i32.load offset=4
- (get_global $tempDoublePtr)
- )
- (i32.const 2146435072)
- )
- (i32.const 2146435072)
- )
- (block $do-once49 (result i32)
- (if
- (tee_local $5
- (f64.ne
- (tee_local $23
- (f64.mul
- (call $_frexp
- (get_local $15)
- (get_local $21)
+ (block (result i32)
+ (set_local $27
+ (tee_local $5
+ (i32.and
+ (get_local $12)
+ (i32.const 1)
)
- (f64.const 2)
)
)
- (f64.const 0)
- )
- )
- (i32.store
- (get_local $21)
- (i32.add
- (i32.load
- (get_local $21)
+ (select
+ (i32.const 4114)
+ (i32.const 4109)
+ (get_local $5)
)
- (i32.const -1)
)
)
)
- (if
- (i32.eq
- (tee_local $24
- (i32.or
- (get_local $19)
- (i32.const 32)
+ )
+ (f64.store
+ (get_global $tempDoublePtr)
+ (get_local $15)
+ )
+ (drop
+ (i32.load
+ (get_global $tempDoublePtr)
+ )
+ )
+ (set_local $7
+ (if (result i32)
+ (i32.lt_u
+ (i32.and
+ (i32.load offset=4
+ (get_global $tempDoublePtr)
)
+ (i32.const 2146435072)
)
- (i32.const 97)
+ (i32.const 2146435072)
)
- (block
- (set_local $9
- (select
+ (block $do-once49 (result i32)
+ (if
+ (tee_local $5
+ (f64.ne
+ (tee_local $23
+ (f64.mul
+ (call $_frexp
+ (get_local $15)
+ (get_local $21)
+ )
+ (f64.const 2)
+ )
+ )
+ (f64.const 0)
+ )
+ )
+ (i32.store
+ (get_local $21)
(i32.add
- (get_local $30)
- (i32.const 9)
+ (i32.load
+ (get_local $21)
+ )
+ (i32.const -1)
)
- (get_local $30)
- (tee_local $13
- (i32.and
+ )
+ )
+ (if
+ (i32.eq
+ (tee_local $24
+ (i32.or
(get_local $19)
(i32.const 32)
)
)
+ (i32.const 97)
)
- )
- (set_local $15
- (if (result f64)
- (i32.or
- (i32.eqz
- (tee_local $5
- (i32.sub
- (i32.const 12)
- (get_local $6)
+ (block
+ (set_local $9
+ (select
+ (i32.add
+ (get_local $30)
+ (i32.const 9)
+ )
+ (get_local $30)
+ (tee_local $13
+ (i32.and
+ (get_local $19)
+ (i32.const 32)
)
)
)
- (i32.gt_u
- (get_local $6)
- (i32.const 11)
- )
)
- (get_local $23)
- (block (result f64)
- (set_local $15
- (f64.const 8)
- )
- (loop $while-in54
- (set_local $15
- (f64.mul
- (get_local $15)
- (f64.const 16)
- )
- )
- (br_if $while-in54
- (tee_local $5
- (i32.add
- (get_local $5)
- (i32.const -1)
+ (set_local $15
+ (if (result f64)
+ (i32.or
+ (i32.eqz
+ (tee_local $5
+ (i32.sub
+ (i32.const 12)
+ (get_local $6)
+ )
)
)
- )
- )
- (if (result f64)
- (i32.eq
- (i32.load8_s
- (get_local $9)
+ (i32.gt_u
+ (get_local $6)
+ (i32.const 11)
)
- (i32.const 45)
)
- (f64.neg
- (f64.add
- (get_local $15)
+ (get_local $23)
+ (block (result f64)
+ (set_local $15
+ (f64.const 8)
+ )
+ (loop $while-in54
+ (set_local $15
+ (f64.mul
+ (get_local $15)
+ (f64.const 16)
+ )
+ )
+ (br_if $while-in54
+ (tee_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const -1)
+ )
+ )
+ )
+ )
+ (if (result f64)
+ (i32.eq
+ (i32.load8_s
+ (get_local $9)
+ )
+ (i32.const 45)
+ )
+ (f64.neg
+ (f64.add
+ (get_local $15)
+ (f64.sub
+ (f64.neg
+ (get_local $23)
+ )
+ (get_local $15)
+ )
+ )
+ )
(f64.sub
- (f64.neg
+ (f64.add
(get_local $23)
+ (get_local $15)
)
(get_local $15)
)
)
)
- (f64.sub
- (f64.add
- (get_local $23)
- (get_local $15)
- )
- (get_local $15)
- )
)
)
- )
- )
- (set_local $11
- (i32.or
- (get_local $27)
- (i32.const 2)
- )
- )
- (if
- (i32.eq
- (tee_local $5
- (call $_fmt_u
+ (set_local $11
+ (i32.or
+ (get_local $27)
+ (i32.const 2)
+ )
+ )
+ (if
+ (i32.eq
(tee_local $5
- (select
- (i32.sub
- (i32.const 0)
- (tee_local $7
- (i32.load
- (get_local $21)
+ (call $_fmt_u
+ (tee_local $5
+ (select
+ (i32.sub
+ (i32.const 0)
+ (tee_local $7
+ (i32.load
+ (get_local $21)
+ )
+ )
+ )
+ (get_local $7)
+ (i32.lt_s
+ (get_local $7)
+ (i32.const 0)
)
)
)
- (get_local $7)
- (i32.lt_s
- (get_local $7)
- (i32.const 0)
+ (i32.shr_s
+ (i32.shl
+ (i32.lt_s
+ (get_local $5)
+ (i32.const 0)
+ )
+ (i32.const 31)
+ )
+ (i32.const 31)
)
+ (get_local $26)
)
)
- (i32.shr_s
- (i32.shl
- (i32.lt_s
- (get_local $5)
- (i32.const 0)
- )
+ (get_local $26)
+ )
+ (block
+ (i32.store8
+ (get_local $42)
+ (i32.const 48)
+ )
+ (set_local $5
+ (get_local $42)
+ )
+ )
+ )
+ (i32.store8
+ (i32.add
+ (get_local $5)
+ (i32.const -1)
+ )
+ (i32.add
+ (i32.and
+ (i32.shr_s
+ (get_local $7)
(i32.const 31)
)
- (i32.const 31)
+ (i32.const 2)
)
- (get_local $26)
+ (i32.const 43)
)
)
- (get_local $26)
- )
- (block
(i32.store8
- (get_local $42)
- (i32.const 48)
- )
- (set_local $5
- (get_local $42)
+ (tee_local $8
+ (i32.add
+ (get_local $5)
+ (i32.const -2)
+ )
+ )
+ (i32.add
+ (get_local $19)
+ (i32.const 15)
+ )
)
- )
- )
- (i32.store8
- (i32.add
- (get_local $5)
- (i32.const -1)
- )
- (i32.add
- (i32.and
- (i32.shr_s
- (get_local $7)
- (i32.const 31)
+ (set_local $19
+ (i32.lt_s
+ (get_local $6)
+ (i32.const 1)
)
- (i32.const 2)
)
- (i32.const 43)
- )
- )
- (i32.store8
- (tee_local $8
- (i32.add
- (get_local $5)
- (i32.const -2)
+ (set_local $18
+ (i32.eqz
+ (i32.and
+ (get_local $12)
+ (i32.const 8)
+ )
+ )
)
- )
- (i32.add
- (get_local $19)
- (i32.const 15)
- )
- )
- (set_local $19
- (i32.lt_s
- (get_local $6)
- (i32.const 1)
- )
- )
- (set_local $18
- (i32.eqz
- (i32.and
- (get_local $12)
- (i32.const 8)
+ (set_local $5
+ (get_local $22)
)
- )
- )
- (set_local $5
- (get_local $22)
- )
- (loop $while-in56
- (i32.store8
- (get_local $5)
- (i32.or
- (i32.load8_u
- (i32.add
- (tee_local $7
- (if (result i32)
- (f64.ne
- (get_local $15)
- (get_local $15)
- )
- (i32.const -2147483648)
- (if (result i32)
- (f64.ge
- (get_local $15)
- (f64.const 2147483648)
- )
- (i32.const -2147483648)
+ (loop $while-in56
+ (i32.store8
+ (get_local $5)
+ (i32.or
+ (i32.load8_u
+ (i32.add
+ (tee_local $7
(if (result i32)
- (f64.le
+ (f64.ne
+ (get_local $15)
(get_local $15)
- (f64.const -2147483649)
)
(i32.const -2147483648)
- (i32.trunc_s/f64
- (get_local $15)
+ (if (result i32)
+ (f64.ge
+ (get_local $15)
+ (f64.const 2147483648)
+ )
+ (i32.const -2147483648)
+ (if (result i32)
+ (f64.le
+ (get_local $15)
+ (f64.const -2147483649)
+ )
+ (i32.const -2147483648)
+ (i32.trunc_s/f64
+ (get_local $15)
+ )
+ )
)
)
)
+ (i32.const 4075)
)
)
- (i32.const 4075)
- )
- )
- (get_local $13)
- )
- )
- (set_local $15
- (f64.mul
- (f64.sub
- (get_local $15)
- (f64.convert_s/i32
- (get_local $7)
+ (get_local $13)
)
)
- (f64.const 16)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.eq
- (i32.sub
- (tee_local $7
- (i32.add
- (get_local $5)
- (i32.const 1)
+ (set_local $15
+ (f64.mul
+ (f64.sub
+ (get_local $15)
+ (f64.convert_s/i32
+ (get_local $7)
)
)
- (get_local $36)
+ (f64.const 16)
)
- (i32.const 1)
)
- (if (result i32)
- (i32.and
- (get_local $18)
- (i32.and
- (get_local $19)
- (f64.eq
- (get_local $15)
- (f64.const 0)
+ (set_local $5
+ (if (result i32)
+ (i32.eq
+ (i32.sub
+ (tee_local $7
+ (i32.add
+ (get_local $5)
+ (i32.const 1)
+ )
+ )
+ (get_local $36)
)
+ (i32.const 1)
)
- )
- (get_local $7)
- (block (result i32)
- (i32.store8
+ (if (result i32)
+ (i32.and
+ (get_local $18)
+ (i32.and
+ (get_local $19)
+ (f64.eq
+ (get_local $15)
+ (f64.const 0)
+ )
+ )
+ )
(get_local $7)
- (i32.const 46)
- )
- (i32.add
- (get_local $5)
- (i32.const 2)
+ (block (result i32)
+ (i32.store8
+ (get_local $7)
+ (i32.const 46)
+ )
+ (i32.add
+ (get_local $5)
+ (i32.const 2)
+ )
+ )
)
+ (get_local $7)
+ )
+ )
+ (br_if $while-in56
+ (f64.ne
+ (get_local $15)
+ (f64.const 0)
)
)
- (get_local $7)
- )
- )
- (br_if $while-in56
- (f64.ne
- (get_local $15)
- (f64.const 0)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (tee_local $7
- (i32.add
- (tee_local $6
- (select
- (i32.sub
- (i32.add
- (get_local $6)
- (get_local $47)
- )
- (get_local $8)
- )
- (i32.add
- (i32.sub
- (get_local $45)
- (get_local $8)
- )
- (get_local $5)
- )
- (i32.and
- (i32.ne
- (get_local $6)
- (i32.const 0)
- )
- (i32.lt_s
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (tee_local $7
+ (i32.add
+ (tee_local $6
+ (select
+ (i32.sub
+ (i32.add
+ (get_local $6)
+ (get_local $47)
+ )
+ (get_local $8)
+ )
(i32.add
+ (i32.sub
+ (get_local $45)
+ (get_local $8)
+ )
(get_local $5)
- (get_local $46)
)
- (get_local $6)
+ (i32.and
+ (i32.ne
+ (get_local $6)
+ (i32.const 0)
+ )
+ (i32.lt_s
+ (i32.add
+ (get_local $5)
+ (get_local $46)
+ )
+ (get_local $6)
+ )
+ )
)
)
+ (get_local $11)
)
)
- (get_local $11)
+ (get_local $12)
)
- )
- (get_local $12)
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $9)
+ (get_local $11)
+ (get_local $0)
+ )
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $9)
- (get_local $11)
+ (call $_pad
(get_local $0)
+ (i32.const 48)
+ (get_local $16)
+ (get_local $7)
+ (i32.xor
+ (get_local $12)
+ (i32.const 65536)
+ )
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (get_local $17)
- (get_local $7)
- (i32.xor
- (get_local $12)
- (i32.const 65536)
- )
- )
- (set_local $5
- (i32.sub
- (get_local $5)
- (get_local $36)
- )
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (set_local $5
+ (i32.sub
+ (get_local $5)
+ (get_local $36)
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $22)
- (get_local $5)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $22)
+ (get_local $5)
+ (get_local $0)
+ )
+ )
+ )
+ (call $_pad
(get_local $0)
+ (i32.const 48)
+ (i32.sub
+ (get_local $6)
+ (i32.add
+ (get_local $5)
+ (tee_local $5
+ (i32.sub
+ (get_local $26)
+ (get_local $8)
+ )
+ )
+ )
+ )
+ (i32.const 0)
+ (i32.const 0)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (i32.sub
- (get_local $6)
- (i32.add
- (get_local $5)
- (tee_local $5
- (i32.sub
- (get_local $26)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
(get_local $8)
+ (get_local $5)
+ (get_local $0)
)
)
)
- )
- (i32.const 0)
- (i32.const 0)
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
- )
+ (call $_pad
+ (get_local $0)
(i32.const 32)
+ (get_local $16)
+ (get_local $7)
+ (i32.xor
+ (get_local $12)
+ (i32.const 8192)
+ )
)
- )
- (drop
- (call $___fwritex
- (get_local $8)
- (get_local $5)
- (get_local $0)
+ (br $do-once49
+ (select
+ (get_local $16)
+ (get_local $7)
+ (i32.lt_s
+ (get_local $7)
+ (get_local $16)
+ )
+ )
)
)
)
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (get_local $7)
- (i32.xor
- (get_local $12)
- (i32.const 8192)
- )
- )
- (br $do-once49
- (select
- (get_local $17)
- (get_local $7)
- (i32.lt_s
- (get_local $7)
- (get_local $17)
+ (set_local $15
+ (if (result f64)
+ (get_local $5)
+ (block (result f64)
+ (i32.store
+ (get_local $21)
+ (tee_local $5
+ (i32.add
+ (i32.load
+ (get_local $21)
+ )
+ (i32.const -28)
+ )
+ )
+ )
+ (f64.mul
+ (get_local $23)
+ (f64.const 268435456)
+ )
)
- )
- )
- )
- )
- (set_local $15
- (if (result f64)
- (get_local $5)
- (block (result f64)
- (i32.store
- (get_local $21)
- (tee_local $5
- (i32.add
+ (block (result f64)
+ (set_local $5
(i32.load
(get_local $21)
)
- (i32.const -28)
)
+ (get_local $23)
)
)
- (f64.mul
- (get_local $23)
- (f64.const 268435456)
- )
)
- (block (result f64)
- (set_local $5
- (i32.load
- (get_local $21)
+ (set_local $7
+ (tee_local $8
+ (select
+ (get_local $48)
+ (get_local $49)
+ (i32.lt_s
+ (get_local $5)
+ (i32.const 0)
+ )
)
)
- (get_local $23)
- )
- )
- )
- (set_local $7
- (tee_local $8
- (select
- (get_local $48)
- (get_local $49)
- (i32.lt_s
- (get_local $5)
- (i32.const 0)
- )
)
- )
- )
- (loop $while-in60
- (i32.store
- (get_local $7)
- (tee_local $5
- (if (result i32)
- (f64.ne
- (get_local $15)
- (get_local $15)
- )
- (i32.const -2147483648)
- (if (result i32)
- (f64.ge
- (get_local $15)
- (f64.const 2147483648)
- )
- (i32.const -2147483648)
+ (loop $while-in60
+ (i32.store
+ (get_local $7)
+ (tee_local $5
(if (result i32)
- (f64.le
+ (f64.ne
+ (get_local $15)
(get_local $15)
- (f64.const -2147483649)
)
(i32.const -2147483648)
- (i32.trunc_s/f64
- (get_local $15)
+ (if (result i32)
+ (f64.ge
+ (get_local $15)
+ (f64.const 2147483648)
+ )
+ (i32.const -2147483648)
+ (if (result i32)
+ (f64.le
+ (get_local $15)
+ (f64.const -2147483649)
+ )
+ (i32.const -2147483648)
+ (i32.trunc_s/f64
+ (get_local $15)
+ )
+ )
)
)
)
)
- )
- )
- (set_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
- )
- )
- (br_if $while-in60
- (f64.ne
- (tee_local $15
- (f64.mul
- (f64.sub
- (get_local $15)
- (f64.convert_u/i32
- (get_local $5)
+ (set_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (br_if $while-in60
+ (f64.ne
+ (tee_local $15
+ (f64.mul
+ (f64.sub
+ (get_local $15)
+ (f64.convert_u/i32
+ (get_local $5)
+ )
+ )
+ (f64.const 1e9)
)
)
- (f64.const 1e9)
+ (f64.const 0)
)
)
- (f64.const 0)
- )
- )
- )
- (if
- (i32.gt_s
- (tee_local $9
- (i32.load
- (get_local $21)
- )
- )
- (i32.const 0)
- )
- (block
- (set_local $5
- (get_local $8)
)
- (loop $while-in62
- (set_local $13
- (select
- (i32.const 29)
- (get_local $9)
- (i32.gt_s
- (get_local $9)
- (i32.const 29)
+ (if
+ (i32.gt_s
+ (tee_local $9
+ (i32.load
+ (get_local $21)
)
)
+ (i32.const 0)
)
- (if
- (i32.ge_u
- (tee_local $9
- (i32.add
- (get_local $7)
- (i32.const -4)
- )
- )
- (get_local $5)
+ (block
+ (set_local $5
+ (get_local $8)
)
- (block $do-once63
- (set_local $11
- (i32.const 0)
- )
- (loop $while-in66
- (i32.store
+ (loop $while-in62
+ (set_local $13
+ (select
+ (i32.const 29)
(get_local $9)
- (call $___uremdi3
- (block (result i32)
- (set_global $tempRet0
- (i32.add
- (i32.lt_u
- (tee_local $11
- (i32.add
- (get_local $11)
- (tee_local $20
- (call $_bitshift64Shl
- (i32.load
- (get_local $9)
+ (i32.gt_s
+ (get_local $9)
+ (i32.const 29)
+ )
+ )
+ )
+ (if
+ (i32.ge_u
+ (tee_local $9
+ (i32.add
+ (get_local $7)
+ (i32.const -4)
+ )
+ )
+ (get_local $5)
+ )
+ (block $do-once63
+ (set_local $11
+ (i32.const 0)
+ )
+ (loop $while-in66
+ (i32.store
+ (get_local $9)
+ (call $___uremdi3
+ (block (result i32)
+ (set_global $tempRet0
+ (i32.add
+ (i32.lt_u
+ (tee_local $11
+ (i32.add
+ (get_local $11)
+ (tee_local $20
+ (call $_bitshift64Shl
+ (i32.load
+ (get_local $9)
+ )
+ (i32.const 0)
+ (get_local $13)
+ )
)
- (i32.const 0)
- (get_local $13)
)
)
+ (get_local $20)
)
+ (get_global $tempRet0)
)
- (get_local $20)
)
+ (get_local $11)
+ )
+ (tee_local $18
(get_global $tempRet0)
)
+ (i32.const 1000000000)
+ (i32.const 0)
)
- (get_local $11)
)
- (tee_local $18
- (get_global $tempRet0)
+ (set_local $11
+ (call $___udivdi3
+ (get_local $11)
+ (get_local $18)
+ (i32.const 1000000000)
+ (i32.const 0)
+ )
+ )
+ (br_if $while-in66
+ (i32.ge_u
+ (tee_local $9
+ (i32.add
+ (get_local $9)
+ (i32.const -4)
+ )
+ )
+ (get_local $5)
+ )
)
- (i32.const 1000000000)
- (i32.const 0)
)
- )
- (set_local $11
- (call $___udivdi3
- (get_local $11)
- (get_local $18)
- (i32.const 1000000000)
- (i32.const 0)
+ (br_if $do-once63
+ (i32.eqz
+ (get_local $11)
+ )
)
- )
- (br_if $while-in66
- (i32.ge_u
- (tee_local $9
+ (i32.store
+ (tee_local $5
(i32.add
- (get_local $9)
+ (get_local $5)
(i32.const -4)
)
)
- (get_local $5)
+ (get_local $11)
)
)
)
- (br_if $do-once63
- (i32.eqz
- (get_local $11)
- )
- )
- (i32.store
- (tee_local $5
- (i32.add
+ (loop $while-in68
+ (if
+ (i32.gt_u
+ (get_local $7)
(get_local $5)
- (i32.const -4)
)
- )
- (get_local $11)
- )
- )
- )
- (loop $while-in68
- (if
- (i32.gt_u
- (get_local $7)
- (get_local $5)
- )
- (if
- (i32.eqz
- (i32.load
- (tee_local $9
- (i32.add
- (get_local $7)
- (i32.const -4)
+ (if
+ (i32.eqz
+ (i32.load
+ (tee_local $9
+ (i32.add
+ (get_local $7)
+ (i32.const -4)
+ )
+ )
+ )
+ )
+ (block
+ (set_local $7
+ (get_local $9)
)
+ (br $while-in68)
)
)
)
- (block
- (set_local $7
- (get_local $9)
+ )
+ (i32.store
+ (get_local $21)
+ (tee_local $9
+ (i32.sub
+ (i32.load
+ (get_local $21)
+ )
+ (get_local $13)
)
- (br $while-in68)
)
)
- )
- )
- (i32.store
- (get_local $21)
- (tee_local $9
- (i32.sub
- (i32.load
- (get_local $21)
+ (br_if $while-in62
+ (i32.gt_s
+ (get_local $9)
+ (i32.const 0)
)
- (get_local $13)
)
)
)
- (br_if $while-in62
- (i32.gt_s
- (get_local $9)
- (i32.const 0)
- )
+ (set_local $5
+ (get_local $8)
)
)
- )
- (set_local $5
- (get_local $8)
- )
- )
- (set_local $18
- (select
- (i32.const 6)
- (get_local $6)
- (i32.lt_s
- (get_local $6)
- (i32.const 0)
- )
- )
- )
- (if
- (i32.lt_s
- (get_local $9)
- (i32.const 0)
- )
- (block
- (set_local $20
- (i32.add
- (i32.div_s
- (i32.add
- (get_local $18)
- (i32.const 25)
- )
- (i32.const 9)
+ (set_local $18
+ (select
+ (i32.const 6)
+ (get_local $6)
+ (i32.lt_s
+ (get_local $6)
+ (i32.const 0)
)
- (i32.const 1)
)
)
- (set_local $31
- (i32.eq
- (get_local $24)
- (i32.const 102)
+ (if
+ (i32.lt_s
+ (get_local $9)
+ (i32.const 0)
)
- )
- (set_local $6
- (get_local $5)
- )
- (set_local $5
- (get_local $7)
- )
- (loop $while-in70
- (set_local $13
- (select
- (i32.const 9)
- (tee_local $7
- (i32.sub
- (i32.const 0)
- (get_local $9)
+ (block
+ (set_local $20
+ (i32.add
+ (i32.div_s
+ (i32.add
+ (get_local $18)
+ (i32.const 25)
+ )
+ (i32.const 9)
)
+ (i32.const 1)
)
- (i32.gt_s
- (get_local $7)
- (i32.const 9)
+ )
+ (set_local $31
+ (i32.eq
+ (get_local $24)
+ (i32.const 102)
)
)
- )
- (if
- (i32.lt_u
- (get_local $6)
+ (set_local $6
(get_local $5)
)
- (block $do-once71
- (set_local $11
- (i32.add
- (i32.shl
- (i32.const 1)
- (get_local $13)
+ (set_local $5
+ (get_local $7)
+ )
+ (set_local $5
+ (loop $while-in70 (result i32)
+ (set_local $13
+ (select
+ (i32.const 9)
+ (tee_local $7
+ (i32.sub
+ (i32.const 0)
+ (get_local $9)
+ )
+ )
+ (i32.gt_s
+ (get_local $7)
+ (i32.const 9)
+ )
)
- (i32.const -1)
- )
- )
- (set_local $37
- (i32.shr_u
- (i32.const 1000000000)
- (get_local $13)
)
- )
- (set_local $9
- (i32.const 0)
- )
- (set_local $7
- (get_local $6)
- )
- (loop $while-in74
- (i32.store
- (get_local $7)
- (i32.add
- (i32.shr_u
- (tee_local $32
+ (if
+ (i32.lt_u
+ (get_local $6)
+ (get_local $5)
+ )
+ (block $do-once71
+ (set_local $11
+ (i32.add
+ (i32.shl
+ (i32.const 1)
+ (get_local $13)
+ )
+ (i32.const -1)
+ )
+ )
+ (set_local $37
+ (i32.shr_u
+ (i32.const 1000000000)
+ (get_local $13)
+ )
+ )
+ (set_local $9
+ (i32.const 0)
+ )
+ (set_local $7
+ (get_local $6)
+ )
+ (loop $while-in74
+ (i32.store
+ (get_local $7)
+ (i32.add
+ (i32.shr_u
+ (tee_local $32
+ (i32.load
+ (get_local $7)
+ )
+ )
+ (get_local $13)
+ )
+ (get_local $9)
+ )
+ )
+ (set_local $9
+ (i32.mul
+ (i32.and
+ (get_local $11)
+ (get_local $32)
+ )
+ (get_local $37)
+ )
+ )
+ (br_if $while-in74
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (get_local $5)
+ )
+ )
+ )
+ (set_local $7
+ (select
+ (get_local $6)
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
(i32.load
- (get_local $7)
+ (get_local $6)
)
)
- (get_local $13)
)
- (get_local $9)
- )
- )
- (set_local $9
- (i32.mul
- (i32.and
- (get_local $11)
- (get_local $32)
+ (br_if $do-once71
+ (i32.eqz
+ (get_local $9)
+ )
+ )
+ (i32.store
+ (get_local $5)
+ (get_local $9)
+ )
+ (set_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const 4)
+ )
)
- (get_local $37)
)
- )
- (br_if $while-in74
- (i32.lt_u
- (tee_local $7
+ (set_local $7
+ (select
+ (get_local $6)
(i32.add
- (get_local $7)
+ (get_local $6)
(i32.const 4)
)
+ (i32.load
+ (get_local $6)
+ )
)
- (get_local $5)
)
)
- )
- (set_local $7
- (select
- (get_local $6)
- (i32.add
- (get_local $6)
- (i32.const 4)
- )
- (i32.load
- (get_local $6)
+ (set_local $11
+ (select
+ (i32.add
+ (tee_local $6
+ (select
+ (get_local $8)
+ (get_local $7)
+ (get_local $31)
+ )
+ )
+ (i32.shl
+ (get_local $20)
+ (i32.const 2)
+ )
+ )
+ (get_local $5)
+ (i32.gt_s
+ (i32.shr_s
+ (i32.sub
+ (get_local $5)
+ (get_local $6)
+ )
+ (i32.const 2)
+ )
+ (get_local $20)
+ )
)
)
- )
- (br_if $do-once71
- (i32.eqz
- (get_local $9)
- )
- )
- (i32.store
- (get_local $5)
- (get_local $9)
- )
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 4)
- )
- )
- )
- (set_local $7
- (select
- (get_local $6)
- (i32.add
- (get_local $6)
- (i32.const 4)
- )
- (i32.load
- (get_local $6)
+ (i32.store
+ (get_local $21)
+ (tee_local $9
+ (i32.add
+ (i32.load
+ (get_local $21)
+ )
+ (get_local $13)
+ )
+ )
)
- )
- )
- )
- (set_local $11
- (select
- (i32.add
- (tee_local $6
- (select
- (get_local $8)
+ (if (result i32)
+ (i32.lt_s
+ (get_local $9)
+ (i32.const 0)
+ )
+ (block
+ (set_local $6
+ (get_local $7)
+ )
+ (set_local $5
+ (get_local $11)
+ )
+ (br $while-in70)
+ )
+ (block (result i32)
+ (set_local $9
+ (get_local $11)
+ )
(get_local $7)
- (get_local $31)
)
)
- (i32.shl
- (get_local $20)
- (i32.const 2)
- )
)
- (get_local $5)
- (i32.gt_s
+ )
+ )
+ (set_local $9
+ (get_local $7)
+ )
+ )
+ (set_local $20
+ (get_local $8)
+ )
+ (if
+ (i32.lt_u
+ (get_local $5)
+ (get_local $9)
+ )
+ (block $do-once75
+ (set_local $7
+ (i32.mul
(i32.shr_s
(i32.sub
+ (get_local $20)
(get_local $5)
- (get_local $6)
)
(i32.const 2)
)
- (get_local $20)
+ (i32.const 9)
)
)
- )
- (i32.store
- (get_local $21)
- (tee_local $9
- (i32.add
- (i32.load
- (get_local $21)
+ (br_if $do-once75
+ (i32.lt_u
+ (tee_local $11
+ (i32.load
+ (get_local $5)
+ )
)
- (get_local $13)
+ (i32.const 10)
)
)
- )
- (set_local $5
- (if (result i32)
- (i32.lt_s
- (get_local $9)
- (i32.const 0)
- )
- (block
- (set_local $6
+ (set_local $6
+ (i32.const 10)
+ )
+ (loop $while-in78
+ (set_local $7
+ (i32.add
(get_local $7)
+ (i32.const 1)
)
- (set_local $5
- (get_local $11)
- )
- (br $while-in70)
)
- (block (result i32)
- (set_local $9
+ (br_if $while-in78
+ (i32.ge_u
(get_local $11)
+ (tee_local $6
+ (i32.mul
+ (get_local $6)
+ (i32.const 10)
+ )
+ )
)
- (get_local $7)
)
)
)
- )
- )
- (set_local $9
- (get_local $7)
- )
- )
- (set_local $20
- (get_local $8)
- )
- (if
- (i32.lt_u
- (get_local $5)
- (get_local $9)
- )
- (block $do-once75
- (set_local $7
- (i32.mul
- (i32.shr_s
- (i32.sub
- (get_local $20)
- (get_local $5)
- )
- (i32.const 2)
- )
- (i32.const 9)
- )
- )
- (br_if $do-once75
- (i32.lt_u
- (tee_local $11
- (i32.load
- (get_local $5)
- )
- )
- (i32.const 10)
- )
- )
- (set_local $6
- (i32.const 10)
- )
- (loop $while-in78
(set_local $7
- (i32.add
- (get_local $7)
- (i32.const 1)
- )
- )
- (br_if $while-in78
- (i32.ge_u
- (get_local $11)
- (tee_local $6
- (i32.mul
- (get_local $6)
- (i32.const 10)
- )
- )
- )
+ (i32.const 0)
)
)
- )
- (set_local $7
- (i32.const 0)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.lt_s
- (tee_local $6
- (i32.add
- (i32.sub
- (get_local $18)
- (select
- (get_local $7)
- (i32.const 0)
- (i32.ne
- (get_local $24)
- (i32.const 102)
- )
- )
- )
- (i32.shr_s
- (i32.shl
- (i32.and
- (tee_local $31
+ (set_local $5
+ (if (result i32)
+ (i32.lt_s
+ (tee_local $6
+ (i32.add
+ (i32.sub
+ (get_local $18)
+ (select
+ (get_local $7)
+ (i32.const 0)
(i32.ne
- (get_local $18)
- (i32.const 0)
+ (get_local $24)
+ (i32.const 102)
)
)
- (tee_local $37
- (i32.eq
- (get_local $24)
- (i32.const 103)
+ )
+ (i32.shr_s
+ (i32.shl
+ (i32.and
+ (tee_local $31
+ (i32.ne
+ (get_local $18)
+ (i32.const 0)
+ )
+ )
+ (tee_local $37
+ (i32.eq
+ (get_local $24)
+ (i32.const 103)
+ )
+ )
)
+ (i32.const 31)
)
+ (i32.const 31)
)
- (i32.const 31)
- )
- (i32.const 31)
- )
- )
- )
- (i32.add
- (i32.mul
- (i32.shr_s
- (i32.sub
- (get_local $9)
- (get_local $20)
)
- (i32.const 2)
)
- (i32.const 9)
- )
- (i32.const -9)
- )
- )
- (block (result i32)
- (set_local $13
- (i32.div_s
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const 9216)
- )
- )
- (i32.const 9)
- )
- )
- (if
- (i32.lt_s
- (tee_local $6
- (i32.add
- (i32.rem_s
- (get_local $6)
- (i32.const 9)
+ (i32.add
+ (i32.mul
+ (i32.shr_s
+ (i32.sub
+ (get_local $9)
+ (get_local $20)
+ )
+ (i32.const 2)
)
- (i32.const 1)
+ (i32.const 9)
)
+ (i32.const -9)
)
- (i32.const 9)
)
- (block
- (set_local $11
- (i32.const 10)
- )
- (loop $while-in80
- (set_local $11
- (i32.mul
- (get_local $11)
- (i32.const 10)
+ (block (result i32)
+ (set_local $13
+ (i32.div_s
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const 9216)
+ )
)
+ (i32.const 9)
)
- (br_if $while-in80
- (i32.ne
- (tee_local $6
- (i32.add
+ )
+ (if
+ (i32.lt_s
+ (tee_local $6
+ (i32.add
+ (i32.rem_s
(get_local $6)
- (i32.const 1)
+ (i32.const 9)
)
+ (i32.const 1)
)
- (i32.const 9)
)
+ (i32.const 9)
)
- )
- )
- (set_local $11
- (i32.const 10)
- )
- )
- (set_local $13
- (tee_local $24
- (i32.load
- (tee_local $6
- (i32.add
- (i32.add
- (get_local $8)
- (i32.shl
- (get_local $13)
- (i32.const 2)
+ (block
+ (set_local $11
+ (i32.const 10)
+ )
+ (loop $while-in80
+ (set_local $11
+ (i32.mul
+ (get_local $11)
+ (i32.const 10)
+ )
+ )
+ (br_if $while-in80
+ (i32.ne
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const 1)
+ )
+ )
+ (i32.const 9)
)
)
- (i32.const -4092)
)
)
+ (set_local $11
+ (i32.const 10)
+ )
)
- )
- )
- (set_local $13
- (if (result i32)
- (get_local $11)
- (i32.rem_u
- (get_local $13)
- (get_local $11)
- )
- (i32.const 0)
- )
- )
- (if
- (i32.eqz
- (i32.and
- (tee_local $32
- (i32.eq
- (i32.add
- (get_local $6)
- (i32.const 4)
+ (set_local $13
+ (tee_local $24
+ (i32.load
+ (tee_local $6
+ (i32.add
+ (i32.add
+ (get_local $8)
+ (i32.shl
+ (get_local $13)
+ (i32.const 2)
+ )
+ )
+ (i32.const -4092)
+ )
)
- (get_local $9)
)
)
- (i32.eqz
- (get_local $13)
- )
)
- )
- (block $do-once81
- (set_local $50
+ (set_local $13
(if (result i32)
(get_local $11)
- (i32.div_u
- (get_local $24)
+ (i32.rem_u
+ (get_local $13)
(get_local $11)
)
(i32.const 0)
)
)
- (set_local $15
- (if (result f64)
- (i32.lt_u
- (get_local $13)
- (tee_local $38
- (i32.div_s
+ (if
+ (i32.eqz
+ (i32.and
+ (tee_local $32
+ (i32.eq
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
+ (get_local $9)
+ )
+ )
+ (i32.eqz
+ (get_local $13)
+ )
+ )
+ )
+ (block $do-once81
+ (set_local $50
+ (if (result i32)
+ (get_local $11)
+ (i32.div_u
+ (get_local $24)
(get_local $11)
- (i32.const 2)
)
+ (i32.const 0)
)
)
- (f64.const 0.5)
- (select
- (f64.const 1)
- (f64.const 1.5)
- (i32.and
- (get_local $32)
- (i32.eq
+ (set_local $15
+ (if (result f64)
+ (i32.lt_u
(get_local $13)
- (get_local $38)
+ (tee_local $38
+ (i32.div_s
+ (get_local $11)
+ (i32.const 2)
+ )
+ )
+ )
+ (f64.const 0.5)
+ (select
+ (f64.const 1)
+ (f64.const 1.5)
+ (i32.and
+ (get_local $32)
+ (i32.eq
+ (get_local $13)
+ (get_local $38)
+ )
+ )
)
)
)
- )
- )
- (set_local $23
- (select
- (f64.const 9007199254740994)
- (f64.const 9007199254740992)
- (i32.and
- (get_local $50)
- (i32.const 1)
+ (set_local $23
+ (select
+ (f64.const 9007199254740994)
+ (f64.const 9007199254740992)
+ (i32.and
+ (get_local $50)
+ (i32.const 1)
+ )
+ )
)
- )
- )
- (if
- (get_local $27)
- (if
- (i32.eq
- (i32.load8_s
- (get_local $30)
+ (if
+ (get_local $27)
+ (if
+ (i32.eq
+ (i32.load8_s
+ (get_local $30)
+ )
+ (i32.const 45)
+ )
+ (block
+ (set_local $23
+ (f64.neg
+ (get_local $23)
+ )
+ )
+ (set_local $15
+ (f64.neg
+ (get_local $15)
+ )
+ )
+ )
)
- (i32.const 45)
)
- (block
- (set_local $23
- (f64.neg
- (get_local $23)
+ (i32.store
+ (get_local $6)
+ (tee_local $13
+ (i32.sub
+ (get_local $24)
+ (get_local $13)
)
)
- (set_local $15
- (f64.neg
+ )
+ (br_if $do-once81
+ (f64.eq
+ (f64.add
+ (get_local $23)
(get_local $15)
)
+ (get_local $23)
)
)
- )
- )
- (i32.store
- (get_local $6)
- (tee_local $13
- (i32.sub
- (get_local $24)
- (get_local $13)
- )
- )
- )
- (br_if $do-once81
- (f64.eq
- (f64.add
- (get_local $23)
- (get_local $15)
- )
- (get_local $23)
- )
- )
- (i32.store
- (get_local $6)
- (tee_local $7
- (i32.add
- (get_local $11)
- (get_local $13)
- )
- )
- )
- (if
- (i32.gt_u
- (get_local $7)
- (i32.const 999999999)
- )
- (loop $while-in86
(i32.store
(get_local $6)
- (i32.const 0)
+ (tee_local $7
+ (i32.add
+ (get_local $11)
+ (get_local $13)
+ )
+ )
)
(if
- (i32.lt_u
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -4)
+ (i32.gt_u
+ (get_local $7)
+ (i32.const 999999999)
+ )
+ (loop $while-in86
+ (i32.store
+ (get_local $6)
+ (i32.const 0)
+ )
+ (if
+ (i32.lt_u
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -4)
+ )
+ )
+ (get_local $5)
+ )
+ (i32.store
+ (tee_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const -4)
+ )
+ )
+ (i32.const 0)
+ )
+ )
+ (i32.store
+ (get_local $6)
+ (tee_local $7
+ (i32.add
+ (i32.load
+ (get_local $6)
+ )
+ (i32.const 1)
+ )
+ )
+ )
+ (br_if $while-in86
+ (i32.gt_u
+ (get_local $7)
+ (i32.const 999999999)
)
)
- (get_local $5)
)
- (i32.store
- (tee_local $5
- (i32.add
+ )
+ (set_local $7
+ (i32.mul
+ (i32.shr_s
+ (i32.sub
+ (get_local $20)
(get_local $5)
- (i32.const -4)
)
+ (i32.const 2)
)
- (i32.const 0)
+ (i32.const 9)
)
)
- (i32.store
- (get_local $6)
- (tee_local $7
- (i32.add
+ (br_if $do-once81
+ (i32.lt_u
+ (tee_local $13
(i32.load
- (get_local $6)
+ (get_local $5)
)
- (i32.const 1)
)
+ (i32.const 10)
)
)
- (br_if $while-in86
- (i32.gt_u
- (get_local $7)
- (i32.const 999999999)
- )
+ (set_local $11
+ (i32.const 10)
)
- )
- )
- (set_local $7
- (i32.mul
- (i32.shr_s
- (i32.sub
- (get_local $20)
- (get_local $5)
+ (loop $while-in88
+ (set_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 1)
+ )
)
- (i32.const 2)
- )
- (i32.const 9)
- )
- )
- (br_if $do-once81
- (i32.lt_u
- (tee_local $13
- (i32.load
- (get_local $5)
+ (br_if $while-in88
+ (i32.ge_u
+ (get_local $13)
+ (tee_local $11
+ (i32.mul
+ (get_local $11)
+ (i32.const 10)
+ )
+ )
+ )
)
)
- (i32.const 10)
)
)
(set_local $11
- (i32.const 10)
+ (get_local $5)
+ )
+ (set_local $13
+ (get_local $7)
)
- (loop $while-in88
- (set_local $7
+ (select
+ (tee_local $5
(i32.add
- (get_local $7)
- (i32.const 1)
+ (get_local $6)
+ (i32.const 4)
)
)
- (br_if $while-in88
- (i32.ge_u
- (get_local $13)
- (tee_local $11
- (i32.mul
- (get_local $11)
- (i32.const 10)
- )
- )
- )
+ (get_local $9)
+ (i32.gt_u
+ (get_local $9)
+ (get_local $5)
)
)
)
- )
- (set_local $11
- (get_local $5)
- )
- (set_local $13
- (get_local $7)
- )
- (select
- (tee_local $5
- (i32.add
- (get_local $6)
- (i32.const 4)
+ (block (result i32)
+ (set_local $11
+ (get_local $5)
+ )
+ (set_local $13
+ (get_local $7)
)
- )
- (get_local $9)
- (i32.gt_u
(get_local $9)
- (get_local $5)
)
)
)
- (block (result i32)
- (set_local $11
- (get_local $5)
- )
- (set_local $13
- (get_local $7)
+ (set_local $32
+ (i32.sub
+ (i32.const 0)
+ (get_local $13)
)
- (get_local $9)
)
- )
- )
- (set_local $32
- (i32.sub
- (i32.const 0)
- (get_local $13)
- )
- )
- (set_local $9
- (loop $while-in90 (result i32)
- (block $while-out89 (result i32)
- (if
- (i32.le_u
- (get_local $5)
- (get_local $11)
- )
- (block
- (set_local $24
- (i32.const 0)
- )
- (br $while-out89
- (get_local $5)
- )
- )
- )
- (if (result i32)
- (i32.load
- (tee_local $7
- (i32.add
+ (set_local $9
+ (loop $while-in90 (result i32)
+ (block $while-out89 (result i32)
+ (if
+ (i32.le_u
(get_local $5)
- (i32.const -4)
+ (get_local $11)
+ )
+ (block
+ (set_local $24
+ (i32.const 0)
+ )
+ (br $while-out89
+ (get_local $5)
+ )
)
)
- )
- (block (result i32)
- (set_local $24
- (i32.const 1)
- )
- (get_local $5)
- )
- (block
- (set_local $5
- (get_local $7)
+ (if (result i32)
+ (i32.load
+ (tee_local $7
+ (i32.add
+ (get_local $5)
+ (i32.const -4)
+ )
+ )
+ )
+ (block (result i32)
+ (set_local $24
+ (i32.const 1)
+ )
+ (get_local $5)
+ )
+ (block
+ (set_local $5
+ (get_local $7)
+ )
+ (br $while-in90)
+ )
)
- (br $while-in90)
)
)
)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (tee_local $13
- (i32.add
- (i32.add
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (tee_local $13
(i32.add
- (tee_local $5
- (if (result i32)
- (get_local $37)
- (block $do-once91 (result i32)
- (set_local $7
- (if (result i32)
- (i32.and
- (i32.gt_s
- (tee_local $5
- (i32.add
- (i32.xor
- (get_local $31)
- (i32.const 1)
+ (i32.add
+ (i32.add
+ (tee_local $5
+ (if (result i32)
+ (get_local $37)
+ (block $do-once91 (result i32)
+ (set_local $7
+ (if (result i32)
+ (i32.and
+ (i32.gt_s
+ (tee_local $5
+ (i32.add
+ (i32.xor
+ (get_local $31)
+ (i32.const 1)
+ )
+ (get_local $18)
+ )
)
- (get_local $18)
+ (get_local $13)
+ )
+ (i32.gt_s
+ (get_local $13)
+ (i32.const -5)
)
)
- (get_local $13)
- )
- (i32.gt_s
- (get_local $13)
- (i32.const -5)
- )
- )
- (block (result i32)
- (set_local $18
- (i32.sub
+ (block (result i32)
+ (set_local $18
+ (i32.sub
+ (i32.add
+ (get_local $5)
+ (i32.const -1)
+ )
+ (get_local $13)
+ )
+ )
(i32.add
- (get_local $5)
+ (get_local $19)
(i32.const -1)
)
- (get_local $13)
)
- )
- (i32.add
- (get_local $19)
- (i32.const -1)
+ (block (result i32)
+ (set_local $18
+ (i32.add
+ (get_local $5)
+ (i32.const -1)
+ )
+ )
+ (i32.add
+ (get_local $19)
+ (i32.const -2)
+ )
+ )
)
)
- (block (result i32)
- (set_local $18
- (i32.add
- (get_local $5)
- (i32.const -1)
+ (if
+ (tee_local $5
+ (i32.and
+ (get_local $12)
+ (i32.const 8)
)
)
- (i32.add
- (get_local $19)
- (i32.const -2)
+ (block
+ (set_local $20
+ (get_local $5)
+ )
+ (br $do-once91
+ (get_local $18)
+ )
)
)
- )
- )
- (if
- (tee_local $5
- (i32.and
- (get_local $12)
- (i32.const 8)
- )
- )
- (block
- (set_local $20
- (get_local $5)
- )
- (br $do-once91
- (get_local $18)
- )
- )
- )
- (if
- (get_local $24)
- (block $do-once93
(if
- (i32.eqz
- (tee_local $19
- (i32.load
- (i32.add
- (get_local $9)
- (i32.const -4)
+ (get_local $24)
+ (block $do-once93
+ (if
+ (i32.eqz
+ (tee_local $19
+ (i32.load
+ (i32.add
+ (get_local $9)
+ (i32.const -4)
+ )
+ )
)
)
+ (block
+ (set_local $5
+ (i32.const 9)
+ )
+ (br $do-once93)
+ )
)
- )
- (block
(set_local $5
- (i32.const 9)
- )
- (br $do-once93)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.rem_u
- (get_local $19)
- (i32.const 10)
+ (if (result i32)
+ (i32.rem_u
+ (get_local $19)
+ (i32.const 10)
+ )
+ (block
+ (set_local $5
+ (i32.const 0)
+ )
+ (br $do-once93)
+ )
+ (block (result i32)
+ (set_local $6
+ (i32.const 10)
+ )
+ (i32.const 0)
+ )
+ )
)
- (block
+ (loop $while-in96
(set_local $5
- (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 1)
+ )
)
- (br $do-once93)
- )
- (block (result i32)
- (set_local $6
- (i32.const 10)
+ (br_if $while-in96
+ (i32.eqz
+ (if (result i32)
+ (tee_local $38
+ (tee_local $6
+ (i32.mul
+ (get_local $6)
+ (i32.const 10)
+ )
+ )
+ )
+ (i32.rem_u
+ (get_local $19)
+ (get_local $38)
+ )
+ (i32.const 0)
+ )
+ )
)
- (i32.const 0)
)
)
- )
- (loop $while-in96
(set_local $5
- (i32.add
- (get_local $5)
- (i32.const 1)
- )
+ (i32.const 9)
)
- (br_if $while-in96
- (i32.eqz
- (if (result i32)
- (tee_local $38
- (tee_local $6
- (i32.mul
- (get_local $6)
- (i32.const 10)
- )
- )
- )
- (i32.rem_u
- (get_local $19)
- (get_local $38)
+ )
+ (set_local $6
+ (i32.add
+ (i32.mul
+ (i32.shr_s
+ (i32.sub
+ (get_local $9)
+ (get_local $20)
)
- (i32.const 0)
+ (i32.const 2)
)
+ (i32.const 9)
)
+ (i32.const -9)
)
)
- )
- (set_local $5
- (i32.const 9)
- )
- )
- (set_local $6
- (i32.add
- (i32.mul
- (i32.shr_s
- (i32.sub
- (get_local $9)
- (get_local $20)
+ (if (result i32)
+ (i32.eq
+ (i32.or
+ (get_local $7)
+ (i32.const 32)
)
- (i32.const 2)
+ (i32.const 102)
)
- (i32.const 9)
- )
- (i32.const -9)
- )
- )
- (if (result i32)
- (i32.eq
- (i32.or
- (get_local $7)
- (i32.const 32)
- )
- (i32.const 102)
- )
- (block (result i32)
- (set_local $20
- (i32.const 0)
- )
- (select
- (get_local $18)
- (tee_local $5
- (select
+ (block (result i32)
+ (set_local $20
(i32.const 0)
+ )
+ (select
+ (get_local $18)
(tee_local $5
- (i32.sub
- (get_local $6)
- (get_local $5)
+ (select
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (get_local $6)
+ (get_local $5)
+ )
+ )
+ (i32.lt_s
+ (get_local $5)
+ (i32.const 0)
+ )
)
)
(i32.lt_s
+ (get_local $18)
(get_local $5)
- (i32.const 0)
)
)
)
- (i32.lt_s
- (get_local $18)
- (get_local $5)
- )
- )
- )
- (block (result i32)
- (set_local $20
- (i32.const 0)
- )
- (select
- (get_local $18)
- (tee_local $5
- (select
+ (block (result i32)
+ (set_local $20
(i32.const 0)
+ )
+ (select
+ (get_local $18)
(tee_local $5
- (i32.sub
- (i32.add
- (get_local $6)
- (get_local $13)
+ (select
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.add
+ (get_local $6)
+ (get_local $13)
+ )
+ (get_local $5)
+ )
+ )
+ (i32.lt_s
+ (get_local $5)
+ (i32.const 0)
)
- (get_local $5)
)
)
(i32.lt_s
+ (get_local $18)
(get_local $5)
- (i32.const 0)
)
)
)
- (i32.lt_s
- (get_local $18)
- (get_local $5)
+ )
+ )
+ (block (result i32)
+ (set_local $20
+ (i32.and
+ (get_local $12)
+ (i32.const 8)
)
)
+ (set_local $7
+ (get_local $19)
+ )
+ (get_local $18)
)
)
)
- (block (result i32)
- (set_local $20
- (i32.and
- (get_local $12)
- (i32.const 8)
- )
- )
- (set_local $7
- (get_local $19)
- )
- (get_local $18)
+ (i32.add
+ (get_local $27)
+ (i32.const 1)
)
)
- )
- (i32.add
- (get_local $27)
- (i32.const 1)
- )
- )
- (i32.ne
- (tee_local $31
- (i32.or
- (get_local $5)
- (get_local $20)
+ (i32.ne
+ (tee_local $31
+ (i32.or
+ (get_local $5)
+ (get_local $20)
+ )
+ )
+ (i32.const 0)
)
)
- (i32.const 0)
- )
- )
- (if (result i32)
- (tee_local $18
- (i32.eq
- (i32.or
- (get_local $7)
- (i32.const 32)
+ (if (result i32)
+ (tee_local $18
+ (i32.eq
+ (i32.or
+ (get_local $7)
+ (i32.const 32)
+ )
+ (i32.const 102)
+ )
)
- (i32.const 102)
- )
- )
- (block (result i32)
- (set_local $19
- (i32.const 0)
- )
- (select
- (get_local $13)
- (i32.const 0)
- (i32.gt_s
- (get_local $13)
- (i32.const 0)
+ (block (result i32)
+ (set_local $19
+ (i32.const 0)
+ )
+ (select
+ (get_local $13)
+ (i32.const 0)
+ (i32.gt_s
+ (get_local $13)
+ (i32.const 0)
+ )
+ )
)
- )
- )
- (block (result i32)
- (if
- (i32.lt_s
- (i32.sub
- (get_local $26)
- (tee_local $6
- (call $_fmt_u
+ (block (result i32)
+ (if
+ (i32.lt_s
+ (i32.sub
+ (get_local $26)
(tee_local $6
- (select
- (get_local $32)
- (get_local $13)
- (i32.lt_s
- (get_local $13)
- (i32.const 0)
+ (call $_fmt_u
+ (tee_local $6
+ (select
+ (get_local $32)
+ (get_local $13)
+ (i32.lt_s
+ (get_local $13)
+ (i32.const 0)
+ )
+ )
)
+ (i32.shr_s
+ (i32.shl
+ (i32.lt_s
+ (get_local $6)
+ (i32.const 0)
+ )
+ (i32.const 31)
+ )
+ (i32.const 31)
+ )
+ (get_local $26)
)
)
- (i32.shr_s
- (i32.shl
- (i32.lt_s
- (get_local $6)
- (i32.const 0)
- )
- (i32.const 31)
+ )
+ (i32.const 2)
+ )
+ (loop $while-in98
+ (i32.store8
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
)
- (i32.const 31)
)
- (get_local $26)
+ (i32.const 48)
+ )
+ (br_if $while-in98
+ (i32.lt_s
+ (i32.sub
+ (get_local $26)
+ (get_local $6)
+ )
+ (i32.const 2)
+ )
)
)
)
- (i32.const 2)
- )
- (loop $while-in98
(i32.store8
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -1)
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
+ )
+ (i32.add
+ (i32.and
+ (i32.shr_s
+ (get_local $13)
+ (i32.const 31)
+ )
+ (i32.const 2)
)
+ (i32.const 43)
)
- (i32.const 48)
)
- (br_if $while-in98
- (i32.lt_s
- (i32.sub
- (get_local $26)
+ (i32.store8
+ (tee_local $6
+ (i32.add
(get_local $6)
+ (i32.const -2)
)
- (i32.const 2)
)
+ (get_local $7)
)
- )
- )
- (i32.store8
- (i32.add
- (get_local $6)
- (i32.const -1)
- )
- (i32.add
- (i32.and
- (i32.shr_s
- (get_local $13)
- (i32.const 31)
+ (i32.sub
+ (get_local $26)
+ (tee_local $19
+ (get_local $6)
)
- (i32.const 2)
)
- (i32.const 43)
- )
- )
- (i32.store8
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const -2)
- )
- )
- (get_local $7)
- )
- (i32.sub
- (get_local $26)
- (tee_local $19
- (get_local $6)
)
)
)
)
+ (get_local $12)
)
- )
- (get_local $12)
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $30)
+ (get_local $27)
+ (get_local $0)
+ )
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $30)
- (get_local $27)
+ (call $_pad
(get_local $0)
- )
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (get_local $17)
- (get_local $13)
- (i32.xor
- (get_local $12)
- (i32.const 65536)
- )
- )
- (if
- (get_local $18)
- (block
- (set_local $6
- (tee_local $11
- (select
- (get_local $8)
- (get_local $11)
- (i32.gt_u
- (get_local $11)
- (get_local $8)
- )
- )
+ (i32.const 48)
+ (get_local $16)
+ (get_local $13)
+ (i32.xor
+ (get_local $12)
+ (i32.const 65536)
)
)
- (loop $while-in102
- (set_local $7
- (call $_fmt_u
- (i32.load
- (get_local $6)
+ (if
+ (get_local $18)
+ (block
+ (set_local $6
+ (tee_local $11
+ (select
+ (get_local $8)
+ (get_local $11)
+ (i32.gt_u
+ (get_local $11)
+ (get_local $8)
+ )
+ )
)
- (i32.const 0)
- (get_local $29)
)
- )
- (block $do-once103
- (if
- (i32.eq
- (get_local $6)
- (get_local $11)
- )
- (block
- (br_if $do-once103
- (i32.ne
- (get_local $7)
- (get_local $29)
+ (loop $while-in102
+ (set_local $7
+ (call $_fmt_u
+ (i32.load
+ (get_local $6)
)
- )
- (i32.store8
- (get_local $33)
- (i32.const 48)
- )
- (set_local $7
- (get_local $33)
+ (i32.const 0)
+ (get_local $29)
)
)
- (block
- (br_if $do-once103
- (i32.le_u
- (get_local $7)
- (get_local $22)
+ (block $do-once103
+ (if
+ (i32.eq
+ (get_local $6)
+ (get_local $11)
)
- )
- (loop $while-in106
- (i32.store8
- (tee_local $7
- (i32.add
+ (block
+ (br_if $do-once103
+ (i32.ne
(get_local $7)
- (i32.const -1)
+ (get_local $29)
)
)
- (i32.const 48)
+ (i32.store8
+ (get_local $33)
+ (i32.const 48)
+ )
+ (set_local $7
+ (get_local $33)
+ )
)
- (br_if $while-in106
- (i32.gt_u
- (get_local $7)
- (get_local $22)
+ (block
+ (br_if $do-once103
+ (i32.le_u
+ (get_local $7)
+ (get_local $22)
+ )
+ )
+ (loop $while-in106
+ (i32.store8
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in106
+ (i32.gt_u
+ (get_local $7)
+ (get_local $22)
+ )
+ )
)
)
)
)
- )
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
- )
- (i32.const 32)
- )
- )
- (drop
- (call $___fwritex
- (get_local $7)
- (i32.sub
- (get_local $43)
- (get_local $7)
- )
- (get_local $0)
- )
- )
- )
- (if
- (i32.le_u
- (tee_local $7
- (i32.add
- (get_local $6)
- (i32.const 4)
- )
- )
- (get_local $8)
- )
- (block
- (set_local $6
- (get_local $7)
- )
- (br $while-in102)
- )
- )
- )
- (if
- (get_local $31)
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
- )
- (i32.const 32)
- )
- )
- (drop
- (call $___fwritex
- (i32.const 4143)
- (i32.const 1)
- (get_local $0)
- )
- )
- )
- )
- (if
- (i32.and
- (i32.lt_u
- (get_local $7)
- (get_local $9)
- )
- (i32.gt_s
- (get_local $5)
- (i32.const 0)
- )
- )
- (loop $while-in110
- (if
- (i32.gt_u
- (tee_local $6
- (call $_fmt_u
+ (if
+ (i32.eqz
+ (i32.and
(i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $7)
+ (i32.sub
+ (get_local $43)
(get_local $7)
)
- (i32.const 0)
- (get_local $29)
+ (get_local $0)
)
)
- (get_local $22)
)
- (loop $while-in112
- (i32.store8
- (tee_local $6
+ (if
+ (i32.le_u
+ (tee_local $7
(i32.add
(get_local $6)
- (i32.const -1)
+ (i32.const 4)
)
)
- (i32.const 48)
+ (get_local $8)
)
- (br_if $while-in112
- (i32.gt_u
- (get_local $6)
- (get_local $22)
+ (block
+ (set_local $6
+ (get_local $7)
)
+ (br $while-in102)
)
)
)
(if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
+ (get_local $31)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $6)
- (select
- (i32.const 9)
- (get_local $5)
- (i32.gt_s
- (get_local $5)
- (i32.const 9)
- )
+ (drop
+ (call $___fwritex
+ (i32.const 4143)
+ (i32.const 1)
+ (get_local $0)
)
- (get_local $0)
)
)
)
- (set_local $6
+ (call $_pad
+ (get_local $0)
+ (i32.const 48)
(i32.add
- (get_local $5)
- (i32.const -9)
- )
- )
- (set_local $5
- (if (result i32)
- (i32.and
- (i32.lt_u
- (tee_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
- )
+ (if (result i32)
+ (i32.and
+ (i32.lt_u
+ (get_local $7)
+ (get_local $9)
)
- (get_local $9)
- )
- (i32.gt_s
- (get_local $5)
- (i32.const 9)
- )
- )
- (block
- (set_local $5
- (get_local $6)
- )
- (br $while-in110)
- )
- (get_local $6)
- )
- )
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 48)
- (i32.add
- (get_local $5)
- (i32.const 9)
- )
- (i32.const 9)
- (i32.const 0)
- )
- )
- (block $do-once99
- (set_local $9
- (select
- (get_local $9)
- (i32.add
- (get_local $11)
- (i32.const 4)
- )
- (get_local $24)
- )
- )
- (if
- (i32.gt_s
- (get_local $5)
- (i32.const -1)
- )
- (block
- (set_local $18
- (i32.eqz
- (get_local $20)
- )
- )
- (set_local $6
- (get_local $11)
- )
- (set_local $7
- (get_local $5)
- )
- (loop $while-in114
- (if
- (i32.eq
- (tee_local $5
- (call $_fmt_u
- (i32.load
- (get_local $6)
- )
+ (i32.gt_s
+ (get_local $5)
(i32.const 0)
- (get_local $29)
)
)
- (get_local $29)
- )
- (block
- (i32.store8
- (get_local $33)
- (i32.const 48)
- )
- (set_local $5
- (get_local $33)
- )
- )
- )
- (block $do-once115
- (if
- (i32.eq
- (get_local $6)
- (get_local $11)
- )
- (block
+ (loop $while-in110 (result i32)
+ (if
+ (i32.gt_u
+ (tee_local $6
+ (call $_fmt_u
+ (i32.load
+ (get_local $7)
+ )
+ (i32.const 0)
+ (get_local $29)
+ )
+ )
+ (get_local $22)
+ )
+ (loop $while-in112
+ (i32.store8
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in112
+ (i32.gt_u
+ (get_local $6)
+ (get_local $22)
+ )
+ )
+ )
+ )
(if
(i32.eqz
(i32.and
@@ -6062,654 +5939,760 @@
)
(drop
(call $___fwritex
- (get_local $5)
- (i32.const 1)
+ (get_local $6)
+ (select
+ (i32.const 9)
+ (get_local $5)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
+ )
+ )
(get_local $0)
)
)
)
- (set_local $5
+ (set_local $6
(i32.add
(get_local $5)
- (i32.const 1)
+ (i32.const -9)
)
)
- (br_if $do-once115
+ (if (result i32)
(i32.and
- (get_local $18)
- (i32.lt_s
- (get_local $7)
- (i32.const 1)
+ (i32.lt_u
+ (tee_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (get_local $9)
)
- )
- )
- (br_if $do-once115
- (i32.and
- (i32.load
- (get_local $0)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const 9)
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (i32.const 4143)
- (i32.const 1)
- (get_local $0)
+ (block
+ (set_local $5
+ (get_local $6)
+ )
+ (br $while-in110)
)
+ (get_local $6)
)
)
- (block
- (br_if $do-once115
- (i32.le_u
- (get_local $5)
- (get_local $22)
+ (get_local $5)
+ )
+ (i32.const 9)
+ )
+ (i32.const 9)
+ (i32.const 0)
+ )
+ )
+ (block $do-once99
+ (set_local $9
+ (select
+ (get_local $9)
+ (i32.add
+ (get_local $11)
+ (i32.const 4)
+ )
+ (get_local $24)
+ )
+ )
+ (call $_pad
+ (get_local $0)
+ (i32.const 48)
+ (i32.add
+ (if (result i32)
+ (i32.gt_s
+ (get_local $5)
+ (i32.const -1)
+ )
+ (block (result i32)
+ (set_local $18
+ (i32.eqz
+ (get_local $20)
)
)
- (loop $while-in118
- (i32.store8
- (tee_local $5
- (i32.add
- (get_local $5)
- (i32.const -1)
+ (set_local $6
+ (get_local $11)
+ )
+ (set_local $7
+ (get_local $5)
+ )
+ (loop $while-in114 (result i32)
+ (if
+ (i32.eq
+ (tee_local $5
+ (call $_fmt_u
+ (i32.load
+ (get_local $6)
+ )
+ (i32.const 0)
+ (get_local $29)
+ )
+ )
+ (get_local $29)
+ )
+ (block
+ (i32.store8
+ (get_local $33)
+ (i32.const 48)
+ )
+ (set_local $5
+ (get_local $33)
)
)
- (i32.const 48)
)
- (br_if $while-in118
- (i32.gt_u
+ (block $do-once115
+ (if
+ (i32.eq
+ (get_local $6)
+ (get_local $11)
+ )
+ (block
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $5)
+ (i32.const 1)
+ (get_local $0)
+ )
+ )
+ )
+ (set_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const 1)
+ )
+ )
+ (br_if $do-once115
+ (i32.and
+ (get_local $18)
+ (i32.lt_s
+ (get_local $7)
+ (i32.const 1)
+ )
+ )
+ )
+ (br_if $do-once115
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (i32.const 4143)
+ (i32.const 1)
+ (get_local $0)
+ )
+ )
+ )
+ (block
+ (br_if $do-once115
+ (i32.le_u
+ (get_local $5)
+ (get_local $22)
+ )
+ )
+ (loop $while-in118
+ (i32.store8
+ (tee_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const -1)
+ )
+ )
+ (i32.const 48)
+ )
+ (br_if $while-in118
+ (i32.gt_u
+ (get_local $5)
+ (get_local $22)
+ )
+ )
+ )
+ )
+ )
+ )
+ (set_local $8
+ (i32.sub
+ (get_local $43)
(get_local $5)
- (get_local $22)
)
)
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $5)
+ (select
+ (get_local $8)
+ (get_local $7)
+ (i32.gt_s
+ (get_local $7)
+ (get_local $8)
+ )
+ )
+ (get_local $0)
+ )
+ )
+ )
+ (br_if $while-in114
+ (i32.and
+ (i32.lt_u
+ (tee_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
+ )
+ )
+ (get_local $9)
+ )
+ (i32.gt_s
+ (tee_local $7
+ (i32.sub
+ (get_local $7)
+ (get_local $8)
+ )
+ )
+ (i32.const -1)
+ )
+ )
+ )
+ (get_local $7)
)
)
- )
- )
- (set_local $8
- (i32.sub
- (get_local $43)
(get_local $5)
)
+ (i32.const 18)
)
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
- )
- (i32.const 32)
- )
- )
- (drop
- (call $___fwritex
- (get_local $5)
- (select
- (get_local $8)
- (get_local $7)
- (i32.gt_s
- (get_local $7)
- (get_local $8)
- )
- )
- (get_local $0)
- )
+ (i32.const 18)
+ (i32.const 0)
+ )
+ (br_if $do-once99
+ (i32.and
+ (i32.load
+ (get_local $0)
)
+ (i32.const 32)
)
- (br_if $while-in114
- (i32.and
- (i32.lt_u
- (tee_local $6
- (i32.add
- (get_local $6)
- (i32.const 4)
- )
- )
- (get_local $9)
- )
- (i32.gt_s
- (tee_local $7
- (i32.sub
- (get_local $7)
- (get_local $8)
- )
- )
- (i32.const -1)
- )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $19)
+ (i32.sub
+ (get_local $26)
+ (get_local $19)
)
+ (get_local $0)
)
)
- (set_local $5
- (get_local $7)
- )
)
)
(call $_pad
(get_local $0)
- (i32.const 48)
- (i32.add
- (get_local $5)
- (i32.const 18)
- )
- (i32.const 18)
- (i32.const 0)
- )
- (br_if $do-once99
- (i32.and
- (i32.load
- (get_local $0)
- )
- (i32.const 32)
+ (i32.const 32)
+ (get_local $16)
+ (get_local $13)
+ (i32.xor
+ (get_local $12)
+ (i32.const 8192)
)
)
- (drop
- (call $___fwritex
- (get_local $19)
- (i32.sub
- (get_local $26)
- (get_local $19)
- )
- (get_local $0)
+ (select
+ (get_local $16)
+ (get_local $13)
+ (i32.lt_s
+ (get_local $13)
+ (get_local $16)
)
)
)
- )
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (get_local $13)
- (i32.xor
- (get_local $12)
- (i32.const 8192)
- )
- )
- (select
- (get_local $17)
- (get_local $13)
- (i32.lt_s
- (get_local $13)
- (get_local $17)
- )
- )
- )
- (block (result i32)
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (tee_local $7
- (i32.add
- (tee_local $9
- (select
- (i32.const 0)
- (get_local $27)
- (tee_local $6
- (f64.ne
- (get_local $15)
- (get_local $15)
+ (block (result i32)
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (tee_local $7
+ (i32.add
+ (tee_local $9
+ (select
+ (i32.const 0)
+ (get_local $27)
+ (tee_local $6
+ (f64.ne
+ (get_local $15)
+ (get_local $15)
+ )
+ )
)
)
+ (i32.const 3)
)
)
- (i32.const 3)
+ (get_local $8)
)
- )
- (get_local $8)
- )
- (set_local $6
- (select
- (select
- (i32.const 4135)
- (i32.const 4139)
- (tee_local $8
- (i32.ne
- (i32.and
- (get_local $19)
- (i32.const 32)
+ (set_local $6
+ (select
+ (select
+ (i32.const 4135)
+ (i32.const 4139)
+ (tee_local $8
+ (i32.ne
+ (i32.and
+ (get_local $19)
+ (i32.const 32)
+ )
+ (i32.const 0)
+ )
)
- (i32.const 0)
)
+ (select
+ (i32.const 4127)
+ (i32.const 4131)
+ (get_local $8)
+ )
+ (get_local $6)
)
)
- (select
- (i32.const 4127)
- (i32.const 4131)
- (get_local $8)
- )
- (get_local $6)
- )
- )
- (if
- (i32.eqz
- (i32.and
- (if (result i32)
+ (if
+ (i32.eqz
(i32.and
- (tee_local $5
- (i32.load
- (get_local $0)
+ (if (result i32)
+ (i32.and
+ (tee_local $5
+ (i32.load
+ (get_local $0)
+ )
+ )
+ (i32.const 32)
+ )
+ (get_local $5)
+ (block (result i32)
+ (drop
+ (call $___fwritex
+ (get_local $30)
+ (get_local $9)
+ (get_local $0)
+ )
+ )
+ (i32.load
+ (get_local $0)
+ )
)
)
(i32.const 32)
)
- (get_local $5)
- (block (result i32)
- (drop
- (call $___fwritex
- (get_local $30)
- (get_local $9)
- (get_local $0)
- )
- )
- (i32.load
- (get_local $0)
- )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $6)
+ (i32.const 3)
+ (get_local $0)
)
)
- (i32.const 32)
)
- )
- (drop
- (call $___fwritex
- (get_local $6)
- (i32.const 3)
+ (call $_pad
(get_local $0)
+ (i32.const 32)
+ (get_local $16)
+ (get_local $7)
+ (i32.xor
+ (get_local $12)
+ (i32.const 8192)
+ )
+ )
+ (select
+ (get_local $16)
+ (get_local $7)
+ (i32.lt_s
+ (get_local $7)
+ (get_local $16)
+ )
)
)
)
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (get_local $7)
- (i32.xor
- (get_local $12)
- (i32.const 8192)
- )
- )
- (select
- (get_local $17)
- (get_local $7)
- (i32.lt_s
- (get_local $7)
- (get_local $17)
- )
- )
)
+ (set_local $5
+ (get_local $10)
+ )
+ (set_local $10
+ (get_local $7)
+ )
+ (br $label$continue$L1)
)
- )
- (set_local $5
- (get_local $10)
- )
- (set_local $10
- (get_local $7)
- )
- (br $label$continue$L1)
- )
- (set_local $7
- (get_local $5)
- )
- (set_local $11
- (get_local $6)
- )
- (set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjto$8
- (get_local $25)
- )
- )
- (set_local $9
- (i32.and
- (get_local $19)
- (i32.const 32)
- )
- )
- (if
- (i32.or
- (tee_local $8
- (i32.load
- (get_local $14)
+ (set_local $7
+ (get_local $5)
)
- )
- (tee_local $12
- (i32.load offset=4
- (get_local $14)
+ (set_local $11
+ (get_local $6)
+ )
+ (set_local $8
+ (i32.const 0)
+ )
+ (set_local $9
+ (i32.const 4091)
+ )
+ (br $__rjto$8
+ (get_local $25)
)
)
- )
- (block
- (set_local $5
- (get_local $8)
- )
- (set_local $8
- (get_local $25)
+ (set_local $9
+ (i32.and
+ (get_local $19)
+ (i32.const 32)
+ )
)
- (loop $while-in123
- (i32.store8
+ (if
+ (i32.or
(tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
+ (i32.load
+ (get_local $14)
)
)
- (i32.or
- (i32.load8_u
- (i32.add
- (i32.and
- (get_local $5)
- (i32.const 15)
- )
- (i32.const 4075)
- )
+ (tee_local $12
+ (i32.load offset=4
+ (get_local $14)
)
- (get_local $9)
)
)
- (br_if $while-in123
- (i32.or
- (tee_local $5
- (call $_bitshift64Lshr
- (get_local $5)
- (get_local $12)
- (i32.const 4)
- )
- )
- (tee_local $12
- (get_global $tempRet0)
- )
+ (block
+ (set_local $5
+ (get_local $8)
)
- )
- )
- (set_local $5
- (get_local $8)
- )
- (set_local $8
- (if (result i32)
- (i32.or
- (i32.eqz
- (i32.and
- (get_local $7)
- (i32.const 8)
+ (set_local $8
+ (get_local $25)
+ )
+ (set_local $5
+ (loop $while-in123 (result i32)
+ (i32.store8
+ (tee_local $8
+ (i32.add
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
+ (i32.or
+ (i32.load8_u
+ (i32.add
+ (i32.and
+ (get_local $5)
+ (i32.const 15)
+ )
+ (i32.const 4075)
+ )
+ )
+ (get_local $9)
+ )
+ )
+ (br_if $while-in123
+ (i32.or
+ (tee_local $5
+ (call $_bitshift64Lshr
+ (get_local $5)
+ (get_local $12)
+ (i32.const 4)
+ )
+ )
+ (tee_local $12
+ (get_global $tempRet0)
+ )
+ )
)
+ (get_local $8)
)
- (i32.eqz
+ )
+ (set_local $8
+ (if (result i32)
(i32.or
- (i32.load
- (get_local $14)
+ (i32.eqz
+ (i32.and
+ (get_local $7)
+ (i32.const 8)
+ )
)
- (i32.load offset=4
- (get_local $14)
+ (i32.eqz
+ (i32.or
+ (i32.load
+ (get_local $14)
+ )
+ (i32.load offset=4
+ (get_local $14)
+ )
+ )
)
)
+ (block (result i32)
+ (set_local $9
+ (i32.const 4091)
+ )
+ (i32.const 0)
+ )
+ (block (result i32)
+ (set_local $9
+ (i32.add
+ (i32.shr_s
+ (get_local $19)
+ (i32.const 4)
+ )
+ (i32.const 4091)
+ )
+ )
+ (i32.const 2)
+ )
)
)
- (block (result i32)
- (set_local $9
- (i32.const 4091)
- )
+ )
+ (block
+ (set_local $5
+ (get_local $25)
+ )
+ (set_local $8
(i32.const 0)
)
- (block (result i32)
- (set_local $9
- (i32.add
- (i32.shr_s
- (get_local $19)
- (i32.const 4)
- )
- (i32.const 4091)
- )
- )
- (i32.const 2)
+ (set_local $9
+ (i32.const 4091)
)
)
)
+ (br $__rjti$8)
)
- (block
- (set_local $5
+ (set_local $5
+ (call $_fmt_u
+ (get_local $5)
+ (get_local $7)
(get_local $25)
)
- (set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- )
- )
- (br $__rjti$8)
- )
- (set_local $5
- (call $_fmt_u
- (get_local $5)
- (get_local $7)
- (get_local $25)
- )
- )
- (set_local $7
- (get_local $12)
- )
- (br $__rjti$8)
- )
- (set_local $19
- (i32.eqz
- (tee_local $13
- (call $_memchr
- (get_local $5)
- (i32.const 0)
- (get_local $6)
- )
- )
- )
- )
- (set_local $12
- (get_local $8)
- )
- (set_local $11
- (select
- (get_local $6)
- (i32.sub
- (get_local $13)
- (tee_local $7
- (get_local $5)
)
- )
- (get_local $19)
- )
- )
- (set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjto$8
- (select
- (i32.add
- (get_local $5)
- (get_local $6)
- )
- (get_local $13)
- (get_local $19)
- )
- )
- )
- (set_local $5
- (i32.const 0)
- )
- (set_local $7
- (i32.const 0)
- )
- (set_local $6
- (i32.load
- (get_local $14)
- )
- )
- (loop $while-in125
- (block $while-out124
- (br_if $while-out124
- (i32.eqz
- (tee_local $9
- (i32.load
- (get_local $6)
- )
+ (set_local $7
+ (get_local $12)
)
+ (br $__rjti$8)
)
- )
- (br_if $while-out124
- (i32.or
- (i32.lt_s
- (tee_local $7
- (call $_wctomb
- (get_local $35)
- (get_local $9)
+ (set_local $19
+ (i32.eqz
+ (tee_local $13
+ (call $_memchr
+ (get_local $5)
+ (i32.const 0)
+ (get_local $6)
)
)
- (i32.const 0)
)
- (i32.gt_u
- (get_local $7)
+ )
+ (set_local $12
+ (get_local $8)
+ )
+ (set_local $11
+ (select
+ (get_local $6)
(i32.sub
- (get_local $8)
- (get_local $5)
+ (get_local $13)
+ (tee_local $7
+ (get_local $5)
+ )
)
+ (get_local $19)
)
)
- )
- (set_local $6
- (i32.add
- (get_local $6)
- (i32.const 4)
+ (set_local $8
+ (i32.const 0)
)
- )
- (br_if $while-in125
- (i32.gt_u
- (get_local $8)
- (tee_local $5
+ (set_local $9
+ (i32.const 4091)
+ )
+ (br $__rjto$8
+ (select
(i32.add
(get_local $5)
- (get_local $7)
+ (get_local $6)
)
+ (get_local $13)
+ (get_local $19)
)
)
)
- )
- )
- (if
- (i32.lt_s
- (get_local $7)
- (i32.const 0)
- )
- (block
- (set_local $16
- (i32.const -1)
- )
- (br $label$break$L1)
- )
- )
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (get_local $5)
- (get_local $12)
- )
- (if
- (get_local $5)
- (block
- (set_local $6
+ (set_local $5
(i32.const 0)
)
(set_local $7
+ (i32.const 0)
+ )
+ (set_local $6
(i32.load
(get_local $14)
)
)
- (loop $while-in127
- (if
- (i32.eqz
- (tee_local $8
- (i32.load
- (get_local $7)
+ (loop $while-in125
+ (block $while-out124
+ (br_if $while-out124
+ (i32.eqz
+ (tee_local $9
+ (i32.load
+ (get_local $6)
+ )
)
)
)
- (block
- (set_local $7
- (get_local $5)
- )
- (br $__rjti$7)
- )
- )
- (if
- (i32.gt_s
- (tee_local $6
- (i32.add
- (tee_local $8
+ (br_if $while-out124
+ (i32.or
+ (i32.lt_s
+ (tee_local $7
(call $_wctomb
(get_local $35)
- (get_local $8)
+ (get_local $9)
)
)
- (get_local $6)
+ (i32.const 0)
+ )
+ (i32.gt_u
+ (get_local $7)
+ (i32.sub
+ (get_local $8)
+ (get_local $5)
+ )
)
)
- (get_local $5)
- )
- (block
- (set_local $7
- (get_local $5)
- )
- (br $__rjti$7)
)
- )
- (if
- (i32.eqz
- (i32.and
- (i32.load
- (get_local $0)
- )
- (i32.const 32)
+ (set_local $6
+ (i32.add
+ (get_local $6)
+ (i32.const 4)
)
)
- (drop
- (call $___fwritex
- (get_local $35)
+ (br_if $while-in125
+ (i32.gt_u
(get_local $8)
- (get_local $0)
+ (tee_local $5
+ (i32.add
+ (get_local $5)
+ (get_local $7)
+ )
+ )
)
)
)
- (set_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
- )
+ )
+ (if
+ (i32.lt_s
+ (get_local $7)
+ (i32.const 0)
)
- (br_if $while-in127
- (i32.lt_u
- (get_local $6)
- (get_local $5)
+ (block
+ (set_local $17
+ (i32.const -1)
)
+ (br $label$break$L1)
)
)
- (set_local $7
+ (call $_pad
+ (get_local $0)
+ (i32.const 32)
+ (get_local $16)
(get_local $5)
+ (get_local $12)
+ )
+ (if (result i32)
+ (get_local $5)
+ (block (result i32)
+ (set_local $6
+ (i32.const 0)
+ )
+ (set_local $7
+ (i32.load
+ (get_local $14)
+ )
+ )
+ (loop $while-in127 (result i32)
+ (drop
+ (br_if $__rjti$7
+ (get_local $5)
+ (i32.eqz
+ (tee_local $8
+ (i32.load
+ (get_local $7)
+ )
+ )
+ )
+ )
+ )
+ (drop
+ (br_if $__rjti$7
+ (get_local $5)
+ (i32.gt_s
+ (tee_local $6
+ (i32.add
+ (tee_local $8
+ (call $_wctomb
+ (get_local $35)
+ (get_local $8)
+ )
+ )
+ (get_local $6)
+ )
+ )
+ (get_local $5)
+ )
+ )
+ )
+ (if
+ (i32.eqz
+ (i32.and
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 32)
+ )
+ )
+ (drop
+ (call $___fwritex
+ (get_local $35)
+ (get_local $8)
+ (get_local $0)
+ )
+ )
+ )
+ (set_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (br_if $while-in127
+ (i32.lt_u
+ (get_local $6)
+ (get_local $5)
+ )
+ )
+ (get_local $5)
+ )
+ )
+ (i32.const 0)
)
- )
- (set_local $7
- (i32.const 0)
)
)
- )
- (call $_pad
- (get_local $0)
- (i32.const 32)
- (get_local $17)
- (get_local $7)
(i32.xor
(get_local $12)
(i32.const 8192)
@@ -6720,10 +6703,10 @@
)
(set_local $10
(select
- (get_local $17)
+ (get_local $16)
(get_local $7)
(i32.gt_s
- (get_local $17)
+ (get_local $16)
(get_local $7)
)
)
@@ -6811,9 +6794,9 @@
(get_local $8)
)
)
- (get_local $17)
+ (get_local $16)
(i32.lt_s
- (get_local $17)
+ (get_local $16)
(get_local $5)
)
)
@@ -6897,99 +6880,95 @@
(i32.eqz
(get_local $0)
)
- (if
- (get_local $1)
- (block
- (set_local $0
- (i32.const 1)
- )
- (loop $while-in130
- (if
- (tee_local $1
- (i32.load
- (i32.add
- (get_local $4)
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (set_local $17
+ (if (result i32)
+ (get_local $1)
+ (block (result i32)
+ (set_local $0
+ (i32.const 1)
+ )
+ (loop $while-in130
+ (if
+ (tee_local $1
+ (i32.load
+ (i32.add
+ (get_local $4)
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
)
)
)
- )
- (block
- (call $_pop_arg_336
- (i32.add
- (get_local $3)
- (i32.shl
- (get_local $0)
- (i32.const 3)
+ (block
+ (call $_pop_arg_336
+ (i32.add
+ (get_local $3)
+ (i32.shl
+ (get_local $0)
+ (i32.const 3)
+ )
)
+ (get_local $1)
+ (get_local $2)
)
- (get_local $1)
- (get_local $2)
- )
- (br_if $while-in130
- (i32.lt_s
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in130
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
+ (i32.const 10)
)
- (i32.const 10)
)
+ (set_local $17
+ (i32.const 1)
+ )
+ (br $label$break$L343)
)
- (set_local $16
- (i32.const 1)
- )
- (br $label$break$L343)
)
)
- )
- (if
- (i32.lt_s
- (get_local $0)
- (i32.const 10)
- )
- (loop $while-in132
- (if
- (i32.load
- (i32.add
- (get_local $4)
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (if (result i32)
+ (i32.lt_s
+ (get_local $0)
+ (i32.const 10)
+ )
+ (loop $while-in132 (result i32)
+ (if
+ (i32.load
+ (i32.add
+ (get_local $4)
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
)
)
- )
- (block
- (set_local $16
- (i32.const -1)
+ (block
+ (set_local $17
+ (i32.const -1)
+ )
+ (br $label$break$L343)
)
- (br $label$break$L343)
)
- )
- (br_if $while-in132
- (i32.lt_s
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
+ (br_if $while-in132
+ (i32.lt_s
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
)
+ (i32.const 10)
)
- (i32.const 10)
)
- )
- (set_local $16
(i32.const 1)
)
- )
- (set_local $16
(i32.const 1)
)
)
- )
- (set_local $16
(i32.const 0)
)
)
@@ -6998,7 +6977,7 @@
(set_global $STACKTOP
(get_local $34)
)
- (get_local $16)
+ (get_local $17)
)
(func $_pop_arg_336 (; 45 ;) (type $10) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
@@ -7404,84 +7383,86 @@
(local $3 i32)
(local $4 i32)
(if
- (i32.or
- (i32.and
- (i32.eqz
- (get_local $1)
- )
- (i32.gt_u
- (get_local $0)
- (i32.const -1)
- )
- )
- (i32.gt_u
- (get_local $1)
- (i32.const 0)
- )
- )
- (loop $while-in
- (i32.store8
- (tee_local $2
- (i32.add
- (get_local $2)
- (i32.const -1)
- )
- )
+ (block (result i32)
+ (if
(i32.or
- (call $___uremdi3
- (get_local $0)
+ (i32.and
+ (i32.eqz
+ (get_local $1)
+ )
+ (i32.gt_u
+ (get_local $0)
+ (i32.const -1)
+ )
+ )
+ (i32.gt_u
(get_local $1)
- (i32.const 10)
(i32.const 0)
)
- (i32.const 48)
- )
- )
- (set_local $3
- (call $___udivdi3
- (get_local $0)
- (get_local $1)
- (i32.const 10)
- (i32.const 0)
)
- )
- (set_local $4
- (get_global $tempRet0)
- )
- (set_local $0
- (if (result i32)
- (i32.or
- (i32.and
- (i32.eq
- (get_local $1)
- (i32.const 9)
+ (set_local $0
+ (loop $while-in (result i32)
+ (i32.store8
+ (tee_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const -1)
+ )
)
- (i32.gt_u
+ (i32.or
+ (call $___uremdi3
+ (get_local $0)
+ (get_local $1)
+ (i32.const 10)
+ (i32.const 0)
+ )
+ (i32.const 48)
+ )
+ )
+ (set_local $3
+ (call $___udivdi3
(get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 10)
+ (i32.const 0)
)
)
- (i32.gt_u
- (get_local $1)
- (i32.const 9)
+ (set_local $4
+ (get_global $tempRet0)
)
- )
- (block
- (set_local $0
+ (if (result i32)
+ (i32.or
+ (i32.and
+ (i32.eq
+ (get_local $1)
+ (i32.const 9)
+ )
+ (i32.gt_u
+ (get_local $0)
+ (i32.const -1)
+ )
+ )
+ (i32.gt_u
+ (get_local $1)
+ (i32.const 9)
+ )
+ )
+ (block
+ (set_local $0
+ (get_local $3)
+ )
+ (set_local $1
+ (get_local $4)
+ )
+ (br $while-in)
+ )
(get_local $3)
)
- (set_local $1
- (get_local $4)
- )
- (br $while-in)
)
- (get_local $3)
)
)
+ (get_local $0)
)
- )
- (if
- (get_local $0)
(loop $while-in1
(i32.store8
(tee_local $2
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt
index ae1355032..c3ae96a37 100644
--- a/test/passes/simplify-locals.txt
+++ b/test/passes/simplify-locals.txt
@@ -764,6 +764,7 @@
(nop)
(set_local $x
(loop $moar (result i32)
+ (nop)
(block $block (result i32)
(br_if $moar
(get_local $x)
@@ -791,6 +792,7 @@
(nop)
(tee_local $a
(loop $while-in$1 (result i32)
+ (nop)
(block $while-out$0 (result i32)
(set_local $e
(get_local $a)
@@ -1127,12 +1129,18 @@
(type $4 (func (param i32)))
(type $5 (func (param i32) (result i32)))
(type $6 (func (param i32 i32 i32 i32 i32 i32)))
- (type $7 (func (param i32 i32)))
- (type $8 (func (result f64)))
- (type $9 (func (param i32 i32) (result f64)))
- (type $10 (func (param i32 i32) (result i32)))
+ (type $FUNCSIG$vi (func (param i32)))
+ (type $FUNCSIG$vf (func (param f32)))
+ (type $9 (func (param i32 i32)))
+ (type $10 (func (result f64)))
+ (type $11 (func (param i32 i32) (result f64)))
+ (type $12 (func (param i32 i32) (result i32)))
+ (import "fuzzing-support" "log1" (func $fimport$0 (result i32)))
+ (import "fuzzing-support" "log2" (func $fimport$1 (param i32)))
+ (import "fuzzing-support" "log3" (func $fimport$2 (param f32)))
(memory $0 (shared 256 256))
- (func $nonatomics (; 0 ;) (type $FUNCSIG$i) (result i32)
+ (global $global$0 (mut i32) (i32.const 10))
+ (func $nonatomics (; 3 ;) (type $FUNCSIG$i) (result i32)
(local $x i32)
(nop)
(drop
@@ -1144,7 +1152,7 @@
(i32.const 1024)
)
)
- (func $nonatomic-growmem (; 1 ;) (type $FUNCSIG$i) (result i32)
+ (func $nonatomic-growmem (; 4 ;) (type $FUNCSIG$i) (result i32)
(local $x i32)
(set_local $x
(i32.load
@@ -1160,7 +1168,7 @@
)
(get_local $x)
)
- (func $atomics (; 2 ;) (type $FUNCSIG$v)
+ (func $atomics (; 5 ;) (type $FUNCSIG$v)
(local $x i32)
(set_local $x
(i32.atomic.load
@@ -1176,7 +1184,7 @@
(get_local $x)
)
)
- (func $one-atomic (; 3 ;) (type $FUNCSIG$v)
+ (func $one-atomic (; 6 ;) (type $FUNCSIG$v)
(local $x i32)
(set_local $x
(i32.load
@@ -1192,7 +1200,7 @@
(get_local $x)
)
)
- (func $other-atomic (; 4 ;) (type $FUNCSIG$v)
+ (func $other-atomic (; 7 ;) (type $FUNCSIG$v)
(local $x i32)
(set_local $x
(i32.atomic.load
@@ -1208,7 +1216,7 @@
(get_local $x)
)
)
- (func $atomic-growmem (; 5 ;) (type $FUNCSIG$i) (result i32)
+ (func $atomic-growmem (; 8 ;) (type $FUNCSIG$i) (result i32)
(local $x i32)
(set_local $x
(i32.load
@@ -1224,7 +1232,7 @@
)
(get_local $x)
)
- (func $atomicrmw (; 6 ;) (type $FUNCSIG$v)
+ (func $atomicrmw (; 9 ;) (type $FUNCSIG$v)
(local $x i32)
(set_local $x
(i32.atomic.rmw.add
@@ -1241,7 +1249,7 @@
(get_local $x)
)
)
- (func $atomic-cmpxchg (; 7 ;) (type $FUNCSIG$v)
+ (func $atomic-cmpxchg (; 10 ;) (type $FUNCSIG$v)
(local $x i32)
(set_local $x
(i32.atomic.rmw.cmpxchg
@@ -1259,7 +1267,7 @@
(get_local $x)
)
)
- (func $br-value-reordering (; 8 ;) (type $FUNCSIG$i) (result i32)
+ (func $br-value-reordering (; 11 ;) (type $FUNCSIG$i) (result i32)
(local $temp i32)
(block $outside
(loop $loop
@@ -1282,7 +1290,7 @@
)
(unreachable)
)
- (func $br-value-reordering-safe (; 9 ;) (type $FUNCSIG$i) (result i32)
+ (func $br-value-reordering-safe (; 12 ;) (type $FUNCSIG$i) (result i32)
(local $temp i32)
(set_local $temp
(block $outside (result i32)
@@ -1308,7 +1316,7 @@
)
(unreachable)
)
- (func $if-one-side-unreachable (; 10 ;) (type $FUNCSIG$v)
+ (func $if-one-side-unreachable (; 13 ;) (type $FUNCSIG$v)
(local $x i32)
(block $out
(drop
@@ -1344,7 +1352,7 @@
)
)
)
- (func $if-one-side-unreachable-blocks (; 11 ;) (type $FUNCSIG$v)
+ (func $if-one-side-unreachable-blocks (; 14 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i32)
(block $out
@@ -1423,26 +1431,30 @@
)
)
)
- (func $loop-value (; 12 ;) (type $5) (param $x i32) (result i32)
+ (func $loop-value (; 15 ;) (type $5) (param $x i32) (result i32)
(loop $loopy
(unreachable)
)
(nop)
(loop $loopy9 (result i32)
+ (nop)
(i32.const 1)
)
)
- (func $loop-loop-loopy-value (; 13 ;) (type $5) (param $x i32) (result i32)
+ (func $loop-loop-loopy-value (; 16 ;) (type $5) (param $x i32) (result i32)
(nop)
(loop $loopy1 (result i32)
+ (nop)
(loop $loopy2 (result i32)
+ (nop)
(loop $loopy3 (result i32)
+ (nop)
(i32.const 1)
)
)
)
)
- (func $loop-modified-during-main-pass-be-careful-fuzz (; 14 ;) (type $FUNCSIG$i) (result i32)
+ (func $loop-modified-during-main-pass-be-careful-fuzz (; 17 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(nop)
(if (result i32)
@@ -1459,9 +1471,10 @@
)
)
)
- (func $loop-later (; 15 ;) (type $FUNCSIG$iiiiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32)
+ (func $loop-later (; 18 ;) (type $FUNCSIG$iiiiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32)
(drop
(loop $label$1 (result i32)
+ (nop)
(block $label$2 (result i32)
(if
(i32.const 0)
@@ -1479,7 +1492,7 @@
)
(i32.const 0)
)
- (func $pick (; 16 ;) (type $FUNCSIG$v)
+ (func $pick (; 19 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i32)
(set_local $x
@@ -1502,7 +1515,7 @@
(get_local $y)
)
)
- (func $pick-2 (; 17 ;) (type $FUNCSIG$v)
+ (func $pick-2 (; 20 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i32)
(set_local $y
@@ -1525,7 +1538,7 @@
(get_local $x)
)
)
- (func $many (; 18 ;) (type $FUNCSIG$v)
+ (func $many (; 21 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i32)
(local $z i32)
@@ -1596,7 +1609,7 @@
(get_local $x)
)
)
- (func $loop-copies (; 19 ;) (type $7) (param $x i32) (param $y i32)
+ (func $loop-copies (; 22 ;) (type $9) (param $x i32) (param $y i32)
(loop $loop
(nop)
(drop
@@ -1607,7 +1620,7 @@
)
)
)
- (func $proper-type (; 20 ;) (type $8) (result f64)
+ (func $proper-type (; 23 ;) (type $10) (result f64)
(local $var$0 i32)
(local $var$2 f64)
(set_local $var$0
@@ -1619,7 +1632,7 @@
)
(get_local $var$2)
)
- (func $multi-pass-get-equivs-right (; 21 ;) (type $9) (param $var$0 i32) (param $var$1 i32) (result f64)
+ (func $multi-pass-get-equivs-right (; 24 ;) (type $11) (param $var$0 i32) (param $var$1 i32) (result f64)
(local $var$2 i32)
(nop)
(i32.store
@@ -1632,7 +1645,7 @@
)
)
)
- (func $if-value-structure-equivalent (; 22 ;) (type $5) (param $x i32) (result i32)
+ (func $if-value-structure-equivalent (; 25 ;) (type $5) (param $x i32) (result i32)
(local $y i32)
(nop)
(tee_local $x
@@ -1652,7 +1665,7 @@
)
)
)
- (func $set-tee-need-one-of-them (; 23 ;) (type $10) (param $var$0 i32) (param $var$1 i32) (result i32)
+ (func $set-tee-need-one-of-them (; 26 ;) (type $12) (param $var$0 i32) (param $var$1 i32) (result i32)
(local $var$2 i32)
(local $var$3 i32)
(set_local $var$2
@@ -1665,4 +1678,59 @@
)
(get_local $var$2)
)
+ (func $loop-value-harder (; 27 ;) (type $FUNCSIG$i) (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 f32)
+ (local $4 f32)
+ (local $5 f32)
+ (local $6 f32)
+ (local $7 f32)
+ (local $8 f32)
+ (local $9 f32)
+ (local $10 f32)
+ (block $label$1
+ (nop)
+ (nop)
+ (call $fimport$2
+ (loop $label$2 (result f32)
+ (block $label$3
+ (set_global $global$0
+ (i32.const -1)
+ )
+ (block $label$4
+ (nop)
+ (nop)
+ )
+ (nop)
+ (nop)
+ )
+ (nop)
+ (nop)
+ (if (result f32)
+ (call $fimport$0)
+ (block (result f32)
+ (nop)
+ (f32.const -2048)
+ )
+ (block
+ (block $block
+ (call $fimport$1
+ (i32.const -25732)
+ )
+ (br $label$2)
+ )
+ (nop)
+ )
+ )
+ )
+ )
+ (nop)
+ )
+ (nop)
+ (return
+ (i32.const -5417091)
+ )
+ )
)
diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast
index 5396e6a5b..010a9c6bb 100644
--- a/test/passes/simplify-locals.wast
+++ b/test/passes/simplify-locals.wast
@@ -1095,6 +1095,10 @@
(type $4 (func (param i32)))
(type $5 (func (param i32) (result i32)))
(type $6 (func (param i32 i32 i32 i32 i32 i32)))
+ (import "fuzzing-support" "log1" (func $fimport$0 (result i32)))
+ (import "fuzzing-support" "log2" (func $fimport$1 (param i32)))
+ (import "fuzzing-support" "log3" (func $fimport$2 (param f32)))
+ (global $global$0 (mut i32) (i32.const 10))
(func $nonatomics (result i32) ;; loads are reordered
(local $x i32)
(set_local $x (i32.load (i32.const 1024)))
@@ -1444,4 +1448,70 @@
)
(get_local $var$2)
)
+ (func $loop-value-harder (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 f32)
+ (local $4 f32)
+ (local $5 f32)
+ (local $6 f32)
+ (local $7 f32)
+ (local $8 f32)
+ (local $9 f32)
+ (local $10 f32)
+ (block $label$1
+ (loop $label$2
+ (block $label$3
+ (set_global $global$0
+ (i32.const -1)
+ )
+ (block $label$4
+ (set_local $0
+ (call $fimport$0)
+ )
+ (if
+ (get_local $0)
+ (set_local $5
+ (f32.const -2048)
+ )
+ (block
+ (call $fimport$1
+ (i32.const -25732)
+ )
+ (br $label$2)
+ )
+ )
+ )
+ (set_local $6
+ (get_local $5)
+ )
+ (set_local $7
+ (get_local $6)
+ )
+ )
+ (set_local $8
+ (get_local $7)
+ )
+ (set_local $9
+ (get_local $8)
+ )
+ )
+ (set_local $10
+ (get_local $9)
+ )
+ (call $fimport$2
+ (get_local $10)
+ )
+ (set_local $1
+ (i32.const -5417091)
+ )
+ )
+ (set_local $2
+ (get_local $1)
+ )
+ (return
+ (get_local $2)
+ )
+ )
)
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index 55a254c88..0644e45bb 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -608,32 +608,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
)
)
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
+ )
+ )
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)
diff --git a/test/wasm-only.fromasm.clamp b/test/wasm-only.fromasm.clamp
index 55a254c88..0644e45bb 100644
--- a/test/wasm-only.fromasm.clamp
+++ b/test/wasm-only.fromasm.clamp
@@ -608,32 +608,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
)
)
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
+ )
+ )
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index 3f9053fab..f21e00752 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -303,32 +303,32 @@
)
)
)
- (loop $while-in5
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (get_local $1)
+ (set_local $0
+ (loop $while-in5 (result i32)
+ (br_if $label$break$L8
+ (i32.eqz
+ (i32.load8_u
+ (get_local $1)
+ )
)
)
- )
- (set_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (tee_local $0
+ (set_local $1
(i32.add
- (get_local $0)
- (i32.const -1)
+ (get_local $1)
+ (i32.const 1)
)
)
+ (br_if $while-in5
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const -1)
+ )
+ )
+ )
+ (i32.const 0)
)
)
- (set_local $0
- (i32.const 0)
- )
)
)
)