From b349c227aad37db102c644e6fe8030e9f939ef89 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 2 Aug 2016 20:35:15 -0700 Subject: better printing when assert_invalids fail --- src/tools/wasm-shell.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 72e8e13ba..32bc746b2 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -125,7 +125,13 @@ static void run_asserts(size_t* i, bool* checked, Module* wasm, // maybe parsed ok, but otherwise incorrect invalid = !WasmValidator().validate(wasm); } - assert(invalid); + if (!invalid) { + Colors::red(std::cerr); + std::cerr << "[should have been invalid]\n"; + Colors::normal(std::cerr); + std::cerr << &wasm << '\n'; + abort(); + } } else if (id == INVOKE) { assert(wasm); Invocation invocation(curr, instance.get(), *builder->get()); -- cgit v1.2.3 From 96c47400b8bce7b51d161432ff0cc03a9622cf3d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 1 Aug 2016 15:35:47 -0700 Subject: debugging in print --- src/passes/Print.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 5eea38bdc..7486e07f1 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -64,6 +64,7 @@ struct PrintSExpression : public Visitor { } void printFullLine(Expression *expression) { !minify && doIndent(o, indent); + //o << "[" << printWasmType(expression->type) << "] "; // debugging tool visit(expression); o << maybeNewLine; } @@ -721,6 +722,7 @@ Pass *createFullPrinterPass() { std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify) { PrintSExpression print(o); print.setMinify(minify); + //o << "[" << printWasmType(expression->type) << "] "; // debugging tool print.visit(expression); return o; } -- cgit v1.2.3 From 981c7efa1ae4b27d1efd212284e61b77e89977a5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 30 Jul 2016 09:41:13 -0700 Subject: make sure to create unique implicit block names in s-parser --- src/wasm-s-parser.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index b70f70b4e..746d96cf2 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -387,7 +387,11 @@ private: bool brokeToAutoBlock; Name getPrefixedName(std::string prefix) { - return IString((prefix + std::to_string(otherIndex++)).c_str(), false); + // make sure to return a unique name not already on the stack + while (1) { + Name ret = IString((prefix + std::to_string(otherIndex++)).c_str(), false); + if (std::find(labelStack.begin(), labelStack.end(), ret) == labelStack.end()) return ret; + } } Name getFunctionName(Element& s) { -- cgit v1.2.3 From f9020a0bdb3912a65f3f051b3b841fad412d2f13 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 7 Aug 2016 10:37:15 -0700 Subject: remove drop-return-values pass --- src/passes/CMakeLists.txt | 1 - src/passes/DropReturnValues.cpp | 83 ----------------------------------------- src/passes/pass.cpp | 1 - src/passes/passes.h | 1 - 4 files changed, 86 deletions(-) delete mode 100644 src/passes/DropReturnValues.cpp (limited to 'src') diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt index 2ccf5f040..0baee7c3a 100644 --- a/src/passes/CMakeLists.txt +++ b/src/passes/CMakeLists.txt @@ -2,7 +2,6 @@ SET(passes_SOURCES pass.cpp CoalesceLocals.cpp DeadCodeElimination.cpp - DropReturnValues.cpp DuplicateFunctionElimination.cpp LowerIfElse.cpp MergeBlocks.cpp diff --git a/src/passes/DropReturnValues.cpp b/src/passes/DropReturnValues.cpp deleted file mode 100644 index 8715f3f61..000000000 --- a/src/passes/DropReturnValues.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2016 WebAssembly Community Group participants - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// Stops using return values from set_local and store nodes. -// - -#include -#include -#include -#include - -namespace wasm { - -struct DropReturnValues : public WalkerPass>> { - bool isFunctionParallel() override { return true; } - - Pass* create() override { return new DropReturnValues; } - - std::vector expressionStack; - - void visitSetLocal(SetLocal* curr) { - if (ExpressionAnalyzer::isResultUsed(expressionStack, getFunction())) { - Builder builder(*getModule()); - replaceCurrent(builder.makeSequence( - curr, - builder.makeGetLocal(curr->index, curr->type) - )); - } - } - - void visitStore(Store* curr) { - if (ExpressionAnalyzer::isResultUsed(expressionStack, getFunction())) { - Index index = getFunction()->getNumLocals(); - getFunction()->vars.emplace_back(curr->type); - Builder builder(*getModule()); - replaceCurrent(builder.makeSequence( - builder.makeSequence( - builder.makeSetLocal(index, curr->value), - curr - ), - builder.makeGetLocal(index, curr->type) - )); - curr->value = builder.makeGetLocal(index, curr->type); - } - } - - static void visitPre(DropReturnValues* self, Expression** currp) { - self->expressionStack.push_back(*currp); - } - - static void visitPost(DropReturnValues* self, Expression** currp) { - self->expressionStack.pop_back(); - } - - static void scan(DropReturnValues* self, Expression** currp) { - self->pushTask(visitPost, currp); - - WalkerPass>>::scan(self, currp); - - self->pushTask(visitPre, currp); - } -}; - -Pass *createDropReturnValuesPass() { - return new DropReturnValues(); -} - -} // namespace wasm - diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index f27eccf6a..cd7e21542 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -64,7 +64,6 @@ void PassRegistry::registerPasses() { registerPass("coalesce-locals", "reduce # of locals by coalescing", createCoalesceLocalsPass); registerPass("coalesce-locals-learning", "reduce # of locals by coalescing and learning", createCoalesceLocalsWithLearningPass); registerPass("dce", "removes unreachable code", createDeadCodeEliminationPass); - registerPass("drop-return-values", "stops relying on return values from set_local and store", createDropReturnValuesPass); registerPass("duplicate-function-elimination", "removes duplicate functions", createDuplicateFunctionEliminationPass); registerPass("lower-if-else", "lowers if-elses into ifs, blocks and branches", createLowerIfElsePass); registerPass("merge-blocks", "merges blocks to their parents", createMergeBlocksPass); diff --git a/src/passes/passes.h b/src/passes/passes.h index 731536d7d..4bb76edad 100644 --- a/src/passes/passes.h +++ b/src/passes/passes.h @@ -25,7 +25,6 @@ class Pass; Pass *createCoalesceLocalsPass(); Pass *createCoalesceLocalsWithLearningPass(); Pass *createDeadCodeEliminationPass(); -Pass *createDropReturnValuesPass(); Pass *createDuplicateFunctionEliminationPass(); Pass *createLowerIfElsePass(); Pass *createMergeBlocksPass(); -- cgit v1.2.3 From 9507066763db50de86db4d1ffead766f23d63116 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 7 Aug 2016 10:38:04 -0700 Subject: remove lower-if-else, as it's no longer needed --- src/passes/CMakeLists.txt | 1 - src/passes/LowerIfElse.cpp | 67 ------------------------------------------ src/passes/pass.cpp | 1 - test/passes/lower-if-else.txt | 42 -------------------------- test/passes/lower-if-else.wast | 29 ------------------ 5 files changed, 140 deletions(-) delete mode 100644 src/passes/LowerIfElse.cpp delete mode 100644 test/passes/lower-if-else.txt delete mode 100644 test/passes/lower-if-else.wast (limited to 'src') diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt index 0baee7c3a..1b4c65562 100644 --- a/src/passes/CMakeLists.txt +++ b/src/passes/CMakeLists.txt @@ -3,7 +3,6 @@ SET(passes_SOURCES CoalesceLocals.cpp DeadCodeElimination.cpp DuplicateFunctionElimination.cpp - LowerIfElse.cpp MergeBlocks.cpp Metrics.cpp NameManager.cpp diff --git a/src/passes/LowerIfElse.cpp b/src/passes/LowerIfElse.cpp deleted file mode 100644 index b566e8207..000000000 --- a/src/passes/LowerIfElse.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2015 WebAssembly Community Group participants - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// Lowers if (x) y else z into -// -// L: { -// if (x) break (y) L -// z -// } -// -// This is useful for investigating how beneficial if_else is. -// - -#include - -#include -#include - -namespace wasm { - -struct LowerIfElse : public WalkerPass>> { - MixedArena* allocator; - std::unique_ptr namer; - - void prepare(PassRunner* runner, Module *module) override { - allocator = runner->allocator; - namer = make_unique(); - namer->run(runner, module); - } - - void visitIf(If *curr) { - if (curr->ifFalse) { - auto block = allocator->alloc(); - auto name = namer->getUnique("L"); // TODO: getUniqueInFunction - block->name = name; - block->list.push_back(curr); - block->list.push_back(curr->ifFalse); - block->finalize(); - curr->ifFalse = nullptr; - auto break_ = allocator->alloc(); - break_->name = name; - break_->value = curr->ifTrue; - curr->ifTrue = break_; - replaceCurrent(block); - } - } -}; - -Pass *createLowerIfElsePass() { - return new LowerIfElse(); -} - -} // namespace wasm diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index cd7e21542..1e7e85ccb 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -65,7 +65,6 @@ void PassRegistry::registerPasses() { registerPass("coalesce-locals-learning", "reduce # of locals by coalescing and learning", createCoalesceLocalsWithLearningPass); registerPass("dce", "removes unreachable code", createDeadCodeEliminationPass); registerPass("duplicate-function-elimination", "removes duplicate functions", createDuplicateFunctionEliminationPass); - registerPass("lower-if-else", "lowers if-elses into ifs, blocks and branches", createLowerIfElsePass); registerPass("merge-blocks", "merges blocks to their parents", createMergeBlocksPass); registerPass("metrics", "reports metrics", createMetricsPass); registerPass("nm", "name list", createNameListPass); diff --git a/test/passes/lower-if-else.txt b/test/passes/lower-if-else.txt deleted file mode 100644 index 93dd6d916..000000000 --- a/test/passes/lower-if-else.txt +++ /dev/null @@ -1,42 +0,0 @@ -(module - (memory 256 256) - (type $0 (func)) - (func $ifs (type $0) - (block $block0 - (if - (i32.const 0) - (i32.const 1) - ) - (block $L0 - (if - (i32.const 0) - (br $L0 - (i32.const 1) - ) - ) - (i32.const 2) - ) - (block $L1 - (if - (i32.const 4) - (br $L1 - (i32.const 5) - ) - ) - (i32.const 6) - ) - (i32.eq - (block $L2 - (if - (i32.const 4) - (br $L2 - (i32.const 5) - ) - ) - (i32.const 6) - ) - (i32.const 177) - ) - ) - ) -) diff --git a/test/passes/lower-if-else.wast b/test/passes/lower-if-else.wast deleted file mode 100644 index 138a8a206..000000000 --- a/test/passes/lower-if-else.wast +++ /dev/null @@ -1,29 +0,0 @@ -(module - (memory 256 256) - (func $ifs - (block - (if - (i32.const 0) - (i32.const 1) - ) - (if_else - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - (if_else - (i32.const 4) - (i32.const 5) - (i32.const 6) - ) - (i32.eq - (if_else - (i32.const 4) - (i32.const 5) - (i32.const 6) - ) - (i32.const 177) - ) - ) - ) -) -- cgit v1.2.3 From 9d27d6818f83308c4853e3d8870d5b88a374453f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 7 Aug 2016 10:38:34 -0700 Subject: add drop and tee expressions --- auto_update_tests.py | 3 + check.py | 3 +- scripts/fuzz_relooper.py | 6 +- src/asm2wasm.h | 28 +- src/ast_utils.h | 50 +- src/binaryen-c.cpp | 43 +- src/binaryen-c.h | 9 +- src/passes/CoalesceLocals.cpp | 12 +- src/passes/DeadCodeElimination.cpp | 21 +- src/passes/MergeBlocks.cpp | 19 + src/passes/Print.cpp | 16 +- src/passes/SimplifyLocals.cpp | 42 +- src/passes/Vacuum.cpp | 8 + src/s2wasm.h | 5 +- src/shell-interface.h | 2 +- src/wasm-binary.h | 45 +- src/wasm-builder.h | 24 +- src/wasm-interpreter.h | 12 +- src/wasm-js.cpp | 4 +- src/wasm-s-parser.h | 27 +- src/wasm-traversal.h | 13 +- src/wasm-validator.h | 124 +- src/wasm.h | 28 +- test/emcc_O2_hello_world.fromasm | 1050 ++++---- test/emcc_O2_hello_world.fromasm.imprecise | 1050 ++++---- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 246 +- test/emcc_O2_hello_world.fromasm.no-opts | 246 +- test/emcc_hello_world.fromasm | 2530 ++++++++++---------- test/emcc_hello_world.fromasm.imprecise | 2530 ++++++++++---------- test/emcc_hello_world.fromasm.imprecise.no-opts | 426 ++-- test/emcc_hello_world.fromasm.no-opts | 426 ++-- test/example/c-api-kitchen-sink.c | 43 +- test/example/c-api-kitchen-sink.txt | 2259 ++++++++++------- test/example/c-api-kitchen-sink.txt.txt | 879 ++++--- test/example/relooper-fuzz.c | 6 +- test/example/relooper-fuzz.txt | 10 +- test/example/relooper-fuzz1.c | 6 +- test/example/relooper-fuzz1.txt | 10 +- test/kitchen_sink.wast | 1078 +++++---- test/kitchen_sink.wast.fromBinary | 1078 +++++---- test/llvm_autogenerated/byval.wast | 98 +- test/llvm_autogenerated/cfg-stackify.wast | 248 +- test/llvm_autogenerated/dead-vreg.wast | 22 +- test/llvm_autogenerated/i128.wast | 401 +++- .../i64-load-store-alignment.wast | 8 +- test/llvm_autogenerated/legalize.wast | 95 +- test/llvm_autogenerated/mem-intrinsics.wast | 95 +- test/llvm_autogenerated/offset.wast | 119 +- test/llvm_autogenerated/phi.wast | 2 +- test/llvm_autogenerated/reg-stackify.wast | 151 +- test/llvm_autogenerated/store-results.wast | 50 +- test/llvm_autogenerated/store-trunc.wast | 2 +- test/llvm_autogenerated/userstack.wast | 177 +- test/llvm_autogenerated/varargs.wast | 78 +- test/memorygrowth.fromasm | 1050 ++++---- test/memorygrowth.fromasm.imprecise | 1050 ++++---- test/memorygrowth.fromasm.imprecise.no-opts | 248 +- test/memorygrowth.fromasm.no-opts | 248 +- test/min.fromasm.imprecise.no-opts | 26 +- test/min.fromasm.no-opts | 26 +- test/min.wast | 2 +- test/min.wast.fromBinary | 2 +- test/passes/coalesce-locals-learning.txt | 352 ++- test/passes/coalesce-locals-learning.wast | 718 ++++-- test/passes/coalesce-locals.txt | 372 ++- test/passes/coalesce-locals.wast | 768 ++++-- test/passes/dce.txt | 94 +- test/passes/dce.wast | 376 ++- test/passes/drop-return-values.txt | 32 - test/passes/drop-return-values.wast | 9 - test/passes/duplicate-function-elimination.txt | 382 ++- test/passes/duplicate-function-elimination.wast | 1101 ++++++--- test/passes/metrics.txt | 35 +- test/passes/metrics.wast | 41 +- test/passes/nm.txt | 32 +- test/passes/nm.wast | 37 +- test/passes/optimize-instructions.txt | 196 +- test/passes/optimize-instructions.wast | 208 +- test/passes/post-emscripten.txt | 44 +- test/passes/post-emscripten.wast | 64 +- test/passes/precompute.txt | 24 +- test/passes/precompute.wast | 48 +- test/passes/remove-imports.txt | 8 +- test/passes/remove-imports.wast | 13 +- test/passes/remove-unused-brs.txt | 188 +- test/passes/remove-unused-brs.wast | 319 ++- test/passes/remove-unused-functions.wast | 29 +- test/passes/remove-unused-names.wast | 21 +- test/passes/remove-unused-names_merge-blocks.txt | 718 ++++-- test/passes/remove-unused-names_merge-blocks.wast | 970 +++++--- test/passes/reorder-functions.wast | 16 +- test/passes/reorder-locals.txt | 4 +- test/passes/reorder-locals.wast | 60 +- test/passes/simplify-locals.txt | 448 ++-- test/passes/simplify-locals.wast | 546 +++-- test/passes/vacuum.txt | 60 +- test/passes/vacuum.wast | 277 ++- test/two_sides.fromasm | 4 +- test/two_sides.fromasm.imprecise | 4 +- test/unit.asm.js | 10 + test/unit.fromasm | 94 +- test/unit.fromasm.imprecise | 86 +- test/unit.fromasm.imprecise.no-opts | 226 +- test/unit.fromasm.no-opts | 226 +- test/unit.wast | 64 +- test/unit.wast.fromBinary | 64 +- 106 files changed, 16830 insertions(+), 11173 deletions(-) delete mode 100644 test/passes/drop-return-values.txt delete mode 100644 test/passes/drop-return-values.wast (limited to 'src') diff --git a/auto_update_tests.py b/auto_update_tests.py index 1ecbb7a40..56c0d831d 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -23,9 +23,11 @@ for asm in sorted(os.listdir('test')): actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() with open(os.path.join('test', wasm), 'w') as o: o.write(actual) +''' for dot_s_dir in ['dot_s', 'llvm_autogenerated']: for s in sorted(os.listdir(os.path.join('test', dot_s_dir))): if not s.endswith('.s'): continue + if s in ['indirect-import.s', 'memops.s', 'byval.s', 'cfg-stackify.s', 'dead-vreg.s', 'i128.s', 'legalize.s', 'mem-intrinsics.s', 'offset.s', 'reg-stackify.s', 'store-results.s', 'userstack.s', 'varargs.s']: continue # tests with invalid drop() code (use return of store) print '..', s wasm = s.replace('.s', '.wast') full = os.path.join('test', dot_s_dir, s) @@ -38,6 +40,7 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']: expected_file = os.path.join('test', dot_s_dir, wasm) with open(expected_file, 'w') as o: o.write(actual) +''' ''' for wasm in ['address.wast']:#os.listdir(os.path.join('test', 'spec')): diff --git a/check.py b/check.py index 852cbf6ad..f7bc0a00e 100755 --- a/check.py +++ b/check.py @@ -424,7 +424,6 @@ for t in spec_tests: # compare all the outputs to the expected output check_expected(actual, os.path.join('test', 'spec', 'expected-output', os.path.basename(wast) + '.log')) - if has_node: print '\n[ checking binaryen.js testcases... ]\n' @@ -636,7 +635,7 @@ for t in sorted(os.listdir(os.path.join('test', 'example'))): if has_emcc: - if has_mozjs: + if has_mozjs and 0: print '\n[ checking native wasm support ]\n' diff --git a/scripts/fuzz_relooper.py b/scripts/fuzz_relooper.py index 53a16c8bd..52c296e58 100644 --- a/scripts/fuzz_relooper.py +++ b/scripts/fuzz_relooper.py @@ -114,7 +114,8 @@ int main() { BinaryenLoad(module, 4, 0, 0, 0, BinaryenInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), BinaryenConst(module, BinaryenLiteralInt32(4)) - ) + ), + BinaryenInt32() ); // optionally, print the return value @@ -252,7 +253,8 @@ int main() { full[i] = BinaryenStore(module, 4, 0, 0, BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)), - BinaryenConst(module, BinaryenLiteralInt32(decisions[i])) + BinaryenConst(module, BinaryenLiteralInt32(decisions[i])), + BinaryenInt32() ); } } diff --git a/src/asm2wasm.h b/src/asm2wasm.h index ce3c0749d..857145937 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -793,6 +793,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { }; PassRunner passRunner(&wasm); passRunner.add(this); + passRunner.add(); passRunner.run(); // apply memory growth, if relevant @@ -802,7 +803,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { wasm.addFunction(builder.makeFunction( GROW_WASM_MEMORY, { { NEW_SIZE, i32 } }, - none, + i32, {}, builder.makeHost( GrowMemory, @@ -1009,7 +1010,8 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { auto ret = allocator.alloc(); ret->index = function->getLocalIndex(ast[2][1]->getIString()); ret->value = process(ast[3]); - ret->type = ret->value->type; + ret->setTee(false); + ret->finalize(); return ret; } // global var, do a store to memory @@ -1021,7 +1023,8 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ret->align = ret->bytes; ret->ptr = builder.makeConst(Literal(int32_t(global.address))); ret->value = process(ast[3]); - ret->type = global.type; + ret->valueType = global.type; + ret->finalize(); return ret; } else if (ast[2][0] == SUB) { Ref target = ast[2]; @@ -1035,10 +1038,11 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ret->align = view.bytes; ret->ptr = processUnshifted(target[2], view.bytes); ret->value = process(ast[3]); - ret->type = asmToWasmType(view.type); - if (ret->type != ret->value->type) { + ret->valueType = asmToWasmType(view.type); + ret->finalize(); + if (ret->valueType != ret->value->type) { // in asm.js we have some implicit coercions that we must do explicitly here - if (ret->type == f32 && ret->value->type == f64) { + if (ret->valueType == f32 && ret->value->type == f64) { auto conv = allocator.alloc(); conv->op = DemoteFloat64; conv->value = ret->value; @@ -1273,11 +1277,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } abort_on("bad unary", ast); } else if (what == IF) { - auto ret = allocator.alloc(); - ret->condition = process(ast[1]); - ret->ifTrue = process(ast[2]); - ret->ifFalse = !!ast[3] ? process(ast[3]) : nullptr; - return ret; + return builder.makeIf(process(ast[1]), process(ast[2]), !!ast[3] ? process(ast[3]) : nullptr); } else if (what == CALL) { if (ast[1][0] == NAME) { IString name = ast[1][1]->getIString(); @@ -1330,9 +1330,10 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { // No wasm support, so use a temp local ensureI32Temp(); auto set = allocator.alloc(); + set->setTee(false); set->index = function->getLocalIndex(I32_TEMP); set->value = value; - set->type = i32; + set->finalize(); auto get = [&]() { auto ret = allocator.alloc(); ret->index = function->getLocalIndex(I32_TEMP); @@ -1526,6 +1527,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { if (breakSeeker.found == 0) { auto block = allocator.alloc(); block->list.push_back(child); + if (isConcreteWasmType(child->type)) { + block->list.push_back(builder.makeNop()); // ensure a nop at the end, so the block has guaranteed none type and no values fall through + } block->name = stop; block->finalize(); return block; diff --git a/src/ast_utils.h b/src/ast_utils.h index 3e45d0e33..17f5490a9 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -21,6 +21,7 @@ #include "wasm.h" #include "wasm-traversal.h" #include "wasm-builder.h" +#include "pass.h" namespace wasm { @@ -277,7 +278,11 @@ struct ExpressionManipulator { return builder.makeGetLocal(curr->index, curr->type); } Expression* visitSetLocal(SetLocal *curr) { - return builder.makeSetLocal(curr->index, copy(curr->value)); + if (curr->isTee()) { + return builder.makeTeeLocal(curr->index, copy(curr->value)); + } else { + return builder.makeSetLocal(curr->index, copy(curr->value)); + } } Expression* visitGetGlobal(GetGlobal *curr) { return builder.makeGetGlobal(curr->index, curr->type); @@ -289,7 +294,7 @@ struct ExpressionManipulator { return builder.makeLoad(curr->bytes, curr->signed_, curr->offset, curr->align, copy(curr->ptr), curr->type); } Expression* visitStore(Store *curr) { - return builder.makeStore(curr->bytes, curr->offset, curr->align, copy(curr->ptr), copy(curr->value)); + return builder.makeStore(curr->bytes, curr->offset, curr->align, copy(curr->ptr), copy(curr->value), curr->valueType); } Expression* visitConst(Const *curr) { return builder.makeConst(curr->value); @@ -303,6 +308,9 @@ struct ExpressionManipulator { Expression* visitSelect(Select *curr) { return builder.makeSelect(copy(curr->condition), copy(curr->ifTrue), copy(curr->ifFalse)); } + Expression* visitDrop(Drop *curr) { + return builder.makeDrop(copy(curr->value)); + } Expression* visitReturn(Return *curr) { return builder.makeReturn(copy(curr->value)); } @@ -340,7 +348,7 @@ struct ExpressionAnalyzer { for (int i = int(stack.size()) - 2; i >= 0; i--) { auto* curr = stack[i]; auto* above = stack[i + 1]; - // only if and block can drop values + // only if and block can drop values (pre-drop expression was added) FIXME if (curr->is()) { auto* block = curr->cast(); for (size_t j = 0; j < block->list.size() - 1; j++) { @@ -355,6 +363,7 @@ struct ExpressionAnalyzer { assert(above == iff->ifTrue || above == iff->ifFalse); // continue down } else { + if (curr->is()) return false; return true; // all other node types use the result } } @@ -481,6 +490,7 @@ struct ExpressionAnalyzer { } case Expression::Id::SetLocalId: { CHECK(SetLocal, index); + CHECK(SetLocal, type); // for tee/set PUSH(SetLocal, value); break; } @@ -505,6 +515,7 @@ struct ExpressionAnalyzer { CHECK(Store, bytes); CHECK(Store, offset); CHECK(Store, align); + CHECK(Store, valueType); PUSH(Store, ptr); PUSH(Store, value); break; @@ -530,6 +541,10 @@ struct ExpressionAnalyzer { PUSH(Select, condition); break; } + case Expression::Id::DropId: { + PUSH(Drop, value); + break; + } case Expression::Id::ReturnId: { PUSH(Return, value); break; @@ -716,6 +731,7 @@ struct ExpressionAnalyzer { HASH(Store, bytes); HASH(Store, offset); HASH(Store, align); + HASH(Store, valueType); PUSH(Store, ptr); PUSH(Store, value); break; @@ -742,6 +758,10 @@ struct ExpressionAnalyzer { PUSH(Select, condition); break; } + case Expression::Id::DropId: { + PUSH(Drop, value); + break; + } case Expression::Id::ReturnId: { PUSH(Return, value); break; @@ -770,6 +790,30 @@ struct ExpressionAnalyzer { } }; +// Adds drop() operations where necessary. This lets you not worry about adding drop when +// generating code. +struct AutoDrop : public WalkerPass>> { + bool isFunctionParallel() override { return true; } + + Pass* create() override { return new AutoDrop; } + + void visitBlock(Block* curr) { + if (curr->list.size() <= 1) return; + for (Index i = 0; i < curr->list.size() - 1; i++) { + auto* child = curr->list[i]; + if (isConcreteWasmType(child->type)) { + curr->list[i] = Builder(*getModule()).makeDrop(child); + } + } + } + + void visitFunction(Function* curr) { + if (curr->result == none && isConcreteWasmType(curr->body->type)) { + curr->body = Builder(*getModule()).makeDrop(curr->body); + } + } +}; + } // namespace wasm #endif // wasm_ast_utils_h diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 83c626eb1..71c6cad80 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -488,6 +488,21 @@ BinaryenExpressionRef BinaryenSetLocal(BinaryenModuleRef module, BinaryenIndex i ret->index = index; ret->value = (Expression*)value; + ret->setTee(false); + ret->finalize(); + return static_cast(ret); +} +BinaryenExpressionRef BinaryenTeeLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExpressionRef value) { + auto* ret = ((Module*)module)->allocator.alloc(); + + if (tracing) { + auto id = noteExpression(ret); + std::cout << " expressions[" << id << "] = BinaryenTeeLocal(the_module, " << index << ", expressions[" << expressions[value] << "]);\n"; + } + + ret->index = index; + ret->value = (Expression*)value; + ret->setTee(true); ret->finalize(); return static_cast(ret); } @@ -508,12 +523,12 @@ BinaryenExpressionRef BinaryenLoad(BinaryenModuleRef module, uint32_t bytes, int ret->finalize(); return static_cast(ret); } -BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value) { +BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value, BinaryenType type) { auto* ret = ((Module*)module)->allocator.alloc(); if (tracing) { auto id = noteExpression(ret); - std::cout << " expressions[" << id << "] = BinaryenStore(the_module, " << bytes << ", " << offset << ", " << align << ", expressions[" << expressions[ptr] << "], expressions[" << expressions[value] << "]);\n"; + std::cout << " expressions[" << id << "] = BinaryenStore(the_module, " << bytes << ", " << offset << ", " << align << ", expressions[" << expressions[ptr] << "], expressions[" << expressions[value] << "], " << type << ");\n"; } ret->bytes = bytes; @@ -521,6 +536,7 @@ BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, ui ret->align = align ? align : bytes; ret->ptr = (Expression*)ptr; ret->value = (Expression*)value; + ret->valueType = WasmType(type); ret->finalize(); return static_cast(ret); } @@ -584,6 +600,18 @@ BinaryenExpressionRef BinaryenSelect(BinaryenModuleRef module, BinaryenExpressio ret->finalize(); return static_cast(ret); } +BinaryenExpressionRef BinaryenDrop(BinaryenModuleRef module, BinaryenExpressionRef value) { + auto* ret = ((Module*)module)->allocator.alloc(); + + if (tracing) { + auto id = noteExpression(ret); + std::cout << " expressions[" << id << "] = BinaryenDrop(the_module, expressions[" << expressions[value] << "]);\n"; + } + + ret->value = (Expression*)value; + ret->finalize(); + return static_cast(ret); +} BinaryenExpressionRef BinaryenReturn(BinaryenModuleRef module, BinaryenExpressionRef value) { auto* ret = Builder(*((Module*)module)).makeReturn((Expression*)value); @@ -829,6 +857,17 @@ void BinaryenModuleOptimize(BinaryenModuleRef module) { passRunner.run(); } +void BinaryenModuleAutoDrop(BinaryenModuleRef module) { + if (tracing) { + std::cout << " BinaryenModuleAutoDrop(the_module);\n"; + } + + Module* wasm = (Module*)module; + PassRunner passRunner(wasm); + passRunner.add(); + passRunner.run(); +} + size_t BinaryenModuleWrite(BinaryenModuleRef module, char* output, size_t outputSize) { if (tracing) { std::cout << " // BinaryenModuleWrite\n"; diff --git a/src/binaryen-c.h b/src/binaryen-c.h index e2086072b..7ca5cd6c7 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -294,14 +294,16 @@ BinaryenExpressionRef BinaryenCallIndirect(BinaryenModuleRef module, BinaryenExp // for more details. BinaryenExpressionRef BinaryenGetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenType type); BinaryenExpressionRef BinaryenSetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExpressionRef value); +BinaryenExpressionRef BinaryenTeeLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExpressionRef value); // Load: align can be 0, in which case it will be the natural alignment (equal to bytes) BinaryenExpressionRef BinaryenLoad(BinaryenModuleRef module, uint32_t bytes, int8_t signed_, uint32_t offset, uint32_t align, BinaryenType type, BinaryenExpressionRef ptr); // Store: align can be 0, in which case it will be the natural alignment (equal to bytes) -BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value); +BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uint32_t align, BinaryenExpressionRef ptr, BinaryenExpressionRef value, BinaryenType type); BinaryenExpressionRef BinaryenConst(BinaryenModuleRef module, struct BinaryenLiteral value); BinaryenExpressionRef BinaryenUnary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionRef value); BinaryenExpressionRef BinaryenBinary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionRef left, BinaryenExpressionRef right); BinaryenExpressionRef BinaryenSelect(BinaryenModuleRef module, BinaryenExpressionRef condition, BinaryenExpressionRef ifTrue, BinaryenExpressionRef ifFalse); +BinaryenExpressionRef BinaryenDrop(BinaryenModuleRef module, BinaryenExpressionRef value); // Return: value can be NULL BinaryenExpressionRef BinaryenReturn(BinaryenModuleRef module, BinaryenExpressionRef value); // Host: name may be NULL @@ -366,6 +368,11 @@ int BinaryenModuleValidate(BinaryenModuleRef module); // Run the standard optimization passes on the module. void BinaryenModuleOptimize(BinaryenModuleRef module); +// Auto-generate drop() operations where needed. This lets you generate code without +// worrying about where they are needed. (It is more efficient to do it yourself, +// but simpler to use autodrop). +void BinaryenModuleAutoDrop(BinaryenModuleRef module); + // Serialize a module into binary form. // @return how many bytes were written. This will be less than or equal to bufferSize size_t BinaryenModuleWrite(BinaryenModuleRef module, char* output, size_t outputSize); diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp index 2c707b614..2063a20db 100644 --- a/src/passes/CoalesceLocals.cpp +++ b/src/passes/CoalesceLocals.cpp @@ -485,9 +485,19 @@ void CoalesceLocals::applyIndices(std::vector& indices, Expression* root) // in addition, we can optimize out redundant copies and ineffective sets GetLocal* get; if ((get = set->value->dynCast()) && get->index == set->index) { - *action.origin = get; // further optimizations may get rid of the get, if this is in a place where the output does not matter + if (set->isTee()) { + *action.origin = get; + } else { + ExpressionManipulator::nop(set); + } } else if (!action.effective) { *action.origin = set->value; // value may have no side effects, further optimizations can eliminate it + if (!set->isTee()) { + // we need to drop it + Drop* drop = ExpressionManipulator::convert(set); + drop->value = *action.origin; + *action.origin = drop; + } } } } diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index de1191131..aba442e71 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -31,6 +31,7 @@ #include #include #include +#include namespace wasm { @@ -191,6 +192,7 @@ struct DeadCodeElimination : public WalkerPassis()) return toDrop; + return Builder(*getModule()).makeDrop(toDrop); + } + template void handleCall(T* curr, Expression* initial) { for (Index i = 0; i < curr->operands.size(); i++) { @@ -236,11 +243,11 @@ struct DeadCodeElimination : public WalkerPasslist.resize(newSize); Index j = 0; if (initial) { - block->list[j] = initial; + block->list[j] = drop(initial); j++; } for (; j < newSize; j++) { - block->list[j] = curr->operands[j - (initial ? 1 : 0)]; + block->list[j] = drop(curr->operands[j - (initial ? 1 : 0)]); } block->finalize(); replaceCurrent(block); @@ -288,7 +295,7 @@ struct DeadCodeElimination : public WalkerPassvalue)) { auto* block = getModule()->allocator.alloc(); block->list.resize(2); - block->list[0] = curr->ptr; + block->list[0] = drop(curr->ptr); block->list[1] = curr->value; block->finalize(); replaceCurrent(block); @@ -309,7 +316,7 @@ struct DeadCodeElimination : public WalkerPassright)) { auto* block = getModule()->allocator.alloc(); block->list.resize(2); - block->list[0] = curr->left; + block->list[0] = drop(curr->left); block->list[1] = curr->right; block->finalize(); replaceCurrent(block); @@ -324,7 +331,7 @@ struct DeadCodeElimination : public WalkerPassifFalse)) { auto* block = getModule()->allocator.alloc(); block->list.resize(2); - block->list[0] = curr->ifTrue; + block->list[0] = drop(curr->ifTrue); block->list[1] = curr->ifFalse; block->finalize(); replaceCurrent(block); @@ -333,8 +340,8 @@ struct DeadCodeElimination : public WalkerPasscondition)) { auto* block = getModule()->allocator.alloc(); block->list.resize(3); - block->list[0] = curr->ifTrue; - block->list[1] = curr->ifFalse; + block->list[0] = drop(curr->ifTrue); + block->list[1] = drop(curr->ifFalse); block->list[2] = curr->condition; block->finalize(); replaceCurrent(block); diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index 686bb5d75..4798ad28d 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -74,10 +74,27 @@ struct MergeBlocks : public WalkerPasslist.size(); i++) { Block* child = curr->list[i]->dynCast(); + if (!child) { + // TODO: if we have a child that is (drop (block ..)) then we can move the drop into the block, allowing more merging, + // but we must also drop values from brs + /* + auto* drop = curr->list[i]->dynCast(); + if (drop) { + child = drop->value->dynCast(); + if (child) { + // reuse the drop + drop->value = child->list.back(); + child->list.back() = drop; + curr->list[i] = child; + } + } + */ + } if (!child) continue; if (child->name.is()) continue; // named blocks can have breaks to them (and certainly do, if we ran RemoveUnusedNames and RemoveUnusedBrs) ExpressionList merged(getModule()->allocator); @@ -92,9 +109,11 @@ struct MergeBlocks : public WalkerPasslist = merged; more = true; + changed = true; break; } } + if (changed) curr->finalize(); } Block* optimize(Expression* curr, Expression*& child, Block* outer = nullptr, Expression** dependency1 = nullptr, Expression** dependency2 = nullptr) { diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 7486e07f1..ac349abc7 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -240,7 +240,12 @@ struct PrintSExpression : public Visitor { printOpening(o, "get_local ") << printableLocal(curr->index) << ')'; } void visitSetLocal(SetLocal *curr) { - printOpening(o, "set_local ") << printableLocal(curr->index); + if (curr->isTee()) { + printOpening(o, "tee_local "); + } else { + printOpening(o, "set_local "); + } + o << printableLocal(curr->index); incIndent(); printFullLine(curr->value); decIndent(); @@ -282,7 +287,7 @@ struct PrintSExpression : public Visitor { } void visitStore(Store *curr) { o << '('; - prepareColor(o) << printWasmType(curr->type) << ".store"; + prepareColor(o) << printWasmType(curr->valueType) << ".store"; if (curr->bytes < 4 || (curr->type == i64 && curr->bytes < 8)) { if (curr->bytes == 1) { o << '8'; @@ -467,6 +472,13 @@ struct PrintSExpression : public Visitor { printFullLine(curr->condition); decIndent(); } + void visitDrop(Drop *curr) { + o << '('; + prepareColor(o) << "drop"; + incIndent(); + printFullLine(curr->value); + decIndent(); + } void visitReturn(Return *curr) { printOpening(o, "return"); if (!curr->value || curr->value->is()) { diff --git a/src/passes/SimplifyLocals.cpp b/src/passes/SimplifyLocals.cpp index d9786e62c..5315edac4 100644 --- a/src/passes/SimplifyLocals.cpp +++ b/src/passes/SimplifyLocals.cpp @@ -55,7 +55,13 @@ struct SetLocalRemover : public PostWalkerindex] == 0) { - replaceCurrent(curr->value); + auto* value = curr->value; + if (curr->isTee()) { + replaceCurrent(value); + } else { + Drop* drop = ExpressionManipulator::convert(curr); + drop->value = value; + } } } }; @@ -180,7 +186,10 @@ struct SimplifyLocals : public WalkerPassindex); if (found != sinkables.end()) { // sink it, and nop the origin - replaceCurrent(*found->second.item); + auto* set = (*found->second.item)->cast(); + replaceCurrent(set); + assert(!set->isTee()); + set->setTee(true); // reuse the getlocal that is dying *found->second.item = curr; ExpressionManipulator::nop(curr); @@ -189,6 +198,16 @@ struct SimplifyLocals : public WalkerPassvalue->dynCast(); + if (set) { + assert(set->isTee()); + set->setTee(false); + replaceCurrent(set); + } + } + void checkInvalidations(EffectAnalyzer& effects) { // TODO: this is O(bad) std::vector invalidated; @@ -225,7 +244,11 @@ struct SimplifyLocals : public WalkerPasssinkables.find(set->index); if (found != self->sinkables.end()) { - *found->second.item = (*found->second.item)->cast()->value; + auto* previous = (*found->second.item)->cast(); + assert(!previous->isTee()); + auto* previousValue = previous->value; + Drop* drop = ExpressionManipulator::convert(previous); + drop->value = previousValue; self->sinkables.erase(found); self->anotherCycle = true; } @@ -236,15 +259,10 @@ struct SimplifyLocals : public WalkerPasscheckInvalidations(effects); } - if (set) { - // we may be a replacement for the current node, update the stack - self->expressionStack.pop_back(); - self->expressionStack.push_back(set); - if (!ExpressionAnalyzer::isResultUsed(self->expressionStack, self->getFunction())) { - Index index = set->index; - assert(self->sinkables.count(index) == 0); - self->sinkables.emplace(std::make_pair(index, SinkableInfo(currp))); - } + if (set && !set->isTee()) { + Index index = set->index; + assert(self->sinkables.count(index) == 0); + self->sinkables.emplace(std::make_pair(index, SinkableInfo(currp))); } self->expressionStack.pop_back(); diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 0195427d7..1b0887181 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -41,6 +41,7 @@ struct Vacuum : public WalkerPass>> { case Expression::Id::BlockId: return curr; // not always needed, but handled in visitBlock() case Expression::Id::IfId: return curr; // not always needed, but handled in visitIf() case Expression::Id::LoopId: return curr; // not always needed, but handled in visitLoop() + case Expression::Id::DropId: return curr; // not always needed, but handled in visitDrop() case Expression::Id::BreakId: case Expression::Id::SwitchId: @@ -198,6 +199,13 @@ struct Vacuum : public WalkerPass>> { if (curr->body->is()) ExpressionManipulator::nop(curr); } + void visitDrop(Drop* curr) { + // if the drop input has no side effects, it can be wiped out + if (!EffectAnalyzer(curr->value).hasSideEffects()) { + ExpressionManipulator::nop(curr); + } + } + static void visitPre(Vacuum* self, Expression** currp) { self->expressionStack.push_back(*currp); } diff --git a/src/s2wasm.h b/src/s2wasm.h index a23cbb549..5226ceda3 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -753,6 +753,7 @@ class S2WasmBuilder { set->index = func->getLocalIndex(assign); set->value = curr; set->type = curr->type; + set->setTee(false); addToBlock(set); } }; @@ -834,7 +835,7 @@ class S2WasmBuilder { auto makeStore = [&](WasmType type) { skipComma(); auto curr = allocator->alloc(); - curr->type = type; + curr->valueType = type; int32_t bytes = getInt() / CHAR_BIT; curr->bytes = bytes > 0 ? bytes : getWasmTypeSize(type); Name assign = getAssign(); @@ -849,6 +850,7 @@ class S2WasmBuilder { curr->align = 1U << getInt(attributes[0] + 8); } curr->value = inputs[1]; + curr->finalize(); setOutput(curr, assign); }; auto makeSelect = [&](WasmType type) { @@ -1146,6 +1148,7 @@ class S2WasmBuilder { Name assign = getAssign(); skipComma(); auto curr = allocator->alloc(); + curr->setTee(true); curr->index = func->getLocalIndex(getAssign()); skipComma(); curr->value = getInput(); diff --git a/src/shell-interface.h b/src/shell-interface.h index f332307ad..2b0c491b9 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -167,7 +167,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { } void store(Store* store, Address addr, Literal value) override { - switch (store->type) { + switch (store->valueType) { case i32: { switch (store->bytes) { case 1: memory.set(addr, value.geti32()); break; diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 04bebddc5..791a0459b 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -412,6 +412,7 @@ enum ASTNodes { CallFunction = 0x16, CallIndirect = 0x17, CallImport = 0x18, + TeeLocal = 0x19, GetGlobal = 0x1a, SetGlobal = 0x1b, @@ -426,6 +427,7 @@ enum ASTNodes { TableSwitch = 0x08, Return = 0x09, Unreachable = 0x0a, + Drop = 0x0b, End = 0x0f }; @@ -939,9 +941,9 @@ public: o << int8_t(BinaryConsts::GetLocal) << U32LEB(mappedLocals[curr->index]); } void visitSetLocal(SetLocal *curr) { - if (debug) std::cerr << "zz node: SetLocal" << std::endl; + if (debug) std::cerr << "zz node: Set|TeeLocal" << std::endl; recurse(curr->value); - o << int8_t(BinaryConsts::SetLocal) << U32LEB(mappedLocals[curr->index]); + o << int8_t(curr->isTee() ? BinaryConsts::TeeLocal : BinaryConsts::SetLocal) << U32LEB(mappedLocals[curr->index]); } void visitGetGlobal(GetGlobal *curr) { if (debug) std::cerr << "zz node: GetGlobal " << (o.size() + 1) << std::endl; @@ -991,7 +993,7 @@ public: if (debug) std::cerr << "zz node: Store" << std::endl; recurse(curr->ptr); recurse(curr->value); - switch (curr->type) { + switch (curr->valueType) { case i32: { switch (curr->bytes) { case 1: o << int8_t(BinaryConsts::I32StoreMem8); break; @@ -1219,6 +1221,11 @@ public: if (debug) std::cerr << "zz node: Unreachable" << std::endl; o << int8_t(BinaryConsts::Unreachable); } + void visitDrop(Drop *curr) { + if (debug) std::cerr << "zz node: Drop" << std::endl; + recurse(curr->value); + o << int8_t(BinaryConsts::Drop); + } }; class WasmBinaryBuilder { @@ -1728,13 +1735,15 @@ public: case BinaryConsts::CallImport: visitCallImport((curr = allocator.alloc())->cast()); break; case BinaryConsts::CallIndirect: visitCallIndirect((curr = allocator.alloc())->cast()); break; case BinaryConsts::GetLocal: visitGetLocal((curr = allocator.alloc())->cast()); break; - case BinaryConsts::SetLocal: visitSetLocal((curr = allocator.alloc())->cast()); break; + case BinaryConsts::TeeLocal: + case BinaryConsts::SetLocal: visitSetLocal((curr = allocator.alloc())->cast(), code); break; case BinaryConsts::GetGlobal: visitGetGlobal((curr = allocator.alloc())->cast()); break; case BinaryConsts::SetGlobal: visitSetGlobal((curr = allocator.alloc())->cast()); break; case BinaryConsts::Select: visitSelect((curr = allocator.alloc()); break; case BinaryConsts::Return: visitReturn((curr = allocator.alloc())->cast()); break; case BinaryConsts::Nop: visitNop((curr = allocator.alloc())->cast()); break; case BinaryConsts::Unreachable: visitUnreachable((curr = allocator.alloc())->cast()); break; + case BinaryConsts::Drop: visitDrop((curr = allocator.alloc())->cast()); break; case BinaryConsts::End: case BinaryConsts::Else: curr = nullptr; break; default: { @@ -1922,12 +1931,13 @@ public: assert(curr->index < currFunction->getNumLocals()); curr->type = currFunction->getLocalType(curr->index); } - void visitSetLocal(SetLocal *curr) { - if (debug) std::cerr << "zz node: SetLocal" << std::endl; + void visitSetLocal(SetLocal *curr, uint8_t code) { + if (debug) std::cerr << "zz node: Set|TeeLocal" << std::endl; curr->index = getU32LEB(); assert(curr->index < currFunction->getNumLocals()); curr->value = popExpression(); curr->type = curr->value->type; + curr->setTee(code == BinaryConsts::TeeLocal); } void visitGetGlobal(GetGlobal *curr) { if (debug) std::cerr << "zz node: GetGlobal " << pos << std::endl; @@ -1976,21 +1986,22 @@ public: bool maybeVisitStore(Expression*& out, uint8_t code) { Store* curr; switch (code) { - case BinaryConsts::I32StoreMem8: curr = allocator.alloc(); curr->bytes = 1; curr->type = i32; break; - case BinaryConsts::I32StoreMem16: curr = allocator.alloc(); curr->bytes = 2; curr->type = i32; break; - case BinaryConsts::I32StoreMem: curr = allocator.alloc(); curr->bytes = 4; curr->type = i32; break; - case BinaryConsts::I64StoreMem8: curr = allocator.alloc(); curr->bytes = 1; curr->type = i64; break; - case BinaryConsts::I64StoreMem16: curr = allocator.alloc(); curr->bytes = 2; curr->type = i64; break; - case BinaryConsts::I64StoreMem32: curr = allocator.alloc(); curr->bytes = 4; curr->type = i64; break; - case BinaryConsts::I64StoreMem: curr = allocator.alloc(); curr->bytes = 8; curr->type = i64; break; - case BinaryConsts::F32StoreMem: curr = allocator.alloc(); curr->bytes = 4; curr->type = f32; break; - case BinaryConsts::F64StoreMem: curr = allocator.alloc(); curr->bytes = 8; curr->type = f64; break; + case BinaryConsts::I32StoreMem8: curr = allocator.alloc(); curr->bytes = 1; curr->valueType = i32; break; + case BinaryConsts::I32StoreMem16: curr = allocator.alloc(); curr->bytes = 2; curr->valueType = i32; break; + case BinaryConsts::I32StoreMem: curr = allocator.alloc(); curr->bytes = 4; curr->valueType = i32; break; + case BinaryConsts::I64StoreMem8: curr = allocator.alloc(); curr->bytes = 1; curr->valueType = i64; break; + case BinaryConsts::I64StoreMem16: curr = allocator.alloc(); curr->bytes = 2; curr->valueType = i64; break; + case BinaryConsts::I64StoreMem32: curr = allocator.alloc(); curr->bytes = 4; curr->valueType = i64; break; + case BinaryConsts::I64StoreMem: curr = allocator.alloc(); curr->bytes = 8; curr->valueType = i64; break; + case BinaryConsts::F32StoreMem: curr = allocator.alloc(); curr->bytes = 4; curr->valueType = f32; break; + case BinaryConsts::F64StoreMem: curr = allocator.alloc(); curr->bytes = 8; curr->valueType = f64; break; default: return false; } if (debug) std::cerr << "zz node: Store" << std::endl; readMemoryAccess(curr->align, curr->bytes, curr->offset); curr->value = popExpression(); curr->ptr = popExpression(); + curr->finalize(); out = curr; return true; } @@ -2175,6 +2186,10 @@ public: void visitUnreachable(Unreachable *curr) { if (debug) std::cerr << "zz node: Unreachable" << std::endl; } + void visitDrop(Drop *curr) { + if (debug) std::cerr << "zz node: Drop" << std::endl; + curr->value = popExpression(); + } }; } // namespace wasm diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 22e1f9a00..3cba351a2 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -139,6 +139,13 @@ public: return ret; } SetLocal* makeSetLocal(Index index, Expression* value) { + auto* ret = allocator.alloc(); + ret->index = index; + ret->value = value; + ret->type = none; + return ret; + } + SetLocal* makeTeeLocal(Index index, Expression* value) { auto* ret = allocator.alloc(); ret->index = index; ret->value = value; @@ -164,10 +171,11 @@ public: ret->type = type; return ret; } - Store* makeStore(unsigned bytes, uint32_t offset, unsigned align, Expression *ptr, Expression *value) { + Store* makeStore(unsigned bytes, uint32_t offset, unsigned align, Expression *ptr, Expression *value, WasmType type) { auto* ret = allocator.alloc(); - ret->bytes = bytes; ret->offset = offset; ret->align = align; ret->ptr = ptr; ret->value = value; - ret->type = value->type; + ret->bytes = bytes; ret->offset = offset; ret->align = align; ret->ptr = ptr; ret->value = value; ret->valueType = type; + ret->finalize(); + assert(isConcreteWasmType(ret->value->type) ? ret->value->type == type : true); return ret; } Const* makeConst(Literal value) { @@ -205,12 +213,22 @@ public: ret->op = op; ret->nameOperand = nameOperand; ret->operands.set(operands); + ret->finalize(); return ret; } Unreachable* makeUnreachable() { return allocator.alloc(); } + // Additional helpers + + Drop* makeDrop(Expression *value) { + auto* ret = allocator.alloc(); + ret->value = value; + ret->finalize(); + return ret; + } + // Additional utility functions for building on top of nodes static Index addParam(Function* func, Name name, WasmType type) { diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 28a3e8e6d..9d1b5e522 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -435,6 +435,12 @@ public: NOTE_EVAL1(condition.value); return condition.value.geti32() ? ifTrue : ifFalse; // ;-) } + Flow visitDrop(Drop *curr) { + NOTE_ENTER("Drop"); + Flow value = visit(curr->value); + if (value.breaking()) return value; + return Flow(); + } Flow visitReturn(Return *curr) { NOTE_ENTER("Return"); Flow flow; @@ -693,9 +699,9 @@ public: if (flow.breaking()) return flow; NOTE_EVAL1(index); NOTE_EVAL1(flow.value); - assert(flow.value.type == curr->type); + assert(curr->isTee() ? flow.value.type == curr->type : true); scope.locals[index] = flow.value; - return flow; + return curr->isTee() ? flow : Flow(); } Flow visitGetGlobal(GetGlobal *curr) { @@ -730,7 +736,7 @@ public: Flow value = visit(curr->value); if (value.breaking()) return value; instance.externalInterface->store(curr, instance.getFinalAddress(curr, ptr.value), value.value); - return value; + return Flow(); } Flow visitHost(Host *curr) { diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 83956e47e..66dcb4864 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -411,11 +411,11 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { Module["info"].parent["HEAPU8"][addr + i] = HEAPU8[i]; } HEAP32[0] = save0; HEAP32[1] = save1; - }, (uint32_t)addr, store_->bytes, isWasmTypeFloat(store_->type), isWasmTypeFloat(store_->type) ? value.getFloat() : (double)value.getInteger()); + }, (uint32_t)addr, store_->bytes, isWasmTypeFloat(store_->valueType), isWasmTypeFloat(store_->valueType) ? value.getFloat() : (double)value.getInteger()); return; } // nicely aligned - if (!isWasmTypeFloat(store_->type)) { + if (!isWasmTypeFloat(store_->valueType)) { if (store_->bytes == 1) { EM_ASM_INT({ Module['info'].parent['HEAP8'][$0] = $1 }, addr, value.geti32()); } else if (store_->bytes == 2) { diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 746d96cf2..685f26d82 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -568,7 +568,6 @@ private: if (str[1] == '6' && str[2] == '4' && (prefix || str[3] == 0)) return f64; } if (allowError) return none; - throw ParseException("unknown type"); abort(); } @@ -621,7 +620,7 @@ public: if (op[3] == '_') return makeBinary(s, op[4] == 'u' ? BINARY_INT(DivU) : BINARY_INT(DivS), type); if (op[3] == 0) return makeBinary(s, BINARY_FLOAT(Div), type); } - if (op[1] == 'e') return makeUnary(s, UnaryOp::DemoteFloat64, type); + if (op[1] == 'e') return makeUnary(s, UnaryOp::DemoteFloat64, type); abort_on(op); } case 'e': { @@ -739,6 +738,10 @@ public: } else if (str[1] == 'u') return makeHost(s, HostOp::CurrentMemory); abort_on(str); } + case 'd': { + if (str[1] == 'r') return makeDrop(s); + abort_on(str); + } case 'e': { if (str[1] == 'l') return makeThenOrElse(s); abort_on(str); @@ -785,6 +788,7 @@ public: } case 't': { if (str[1] == 'h') return makeThenOrElse(s); + if (str[1] == 'e' && str[2] == 'e') return makeTeeLocal(s); abort_on(str); } case 'u': { @@ -878,6 +882,13 @@ private: return ret; } + Expression* makeDrop(Element& s) { + auto ret = allocator.alloc(); + ret->value = parseExpression(s[1]); + ret->finalize(); + return ret; + } + Expression* makeHost(Element& s, HostOp op) { auto ret = allocator.alloc(); ret->op = op; @@ -910,11 +921,18 @@ private: return ret; } + Expression* makeTeeLocal(Element& s) { + auto ret = allocator.alloc(); + ret->index = getLocalIndex(*s[1]); + ret->value = parseExpression(s[2]); + ret->setTee(true); + return ret; + } Expression* makeSetLocal(Element& s) { auto ret = allocator.alloc(); ret->index = getLocalIndex(*s[1]); ret->value = parseExpression(s[2]); - ret->type = currFunction->getLocalType(ret->index); + ret->setTee(false); return ret; } @@ -1061,7 +1079,7 @@ private: Expression* makeStore(Element& s, WasmType type) { const char *extra = strchr(s[0]->c_str(), '.') + 6; // after "type.store" auto ret = allocator.alloc(); - ret->type = type; + ret->valueType = type; ret->bytes = getWasmTypeSize(type); if (extra[0] == '8') { ret->bytes = 1; @@ -1092,6 +1110,7 @@ private: } ret->ptr = parseExpression(s[i]); ret->value = parseExpression(s[i+1]); + ret->finalize(); return ret; } diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index b50ca0fb2..d6484abdb 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -53,6 +53,7 @@ struct Visitor { ReturnType visitUnary(Unary *curr) {} ReturnType visitBinary(Binary *curr) {} ReturnType visitSelect(Select *curr) {} + ReturnType visitDrop(Drop *curr) {} ReturnType visitReturn(Return *curr) {} ReturnType visitHost(Host *curr) {} ReturnType visitNop(Nop *curr) {} @@ -93,6 +94,7 @@ struct Visitor { case Expression::Id::UnaryId: DELEGATE(Unary); case Expression::Id::BinaryId: DELEGATE(Binary); case Expression::Id::SelectId: DELEGATE(Select); + case Expression::Id::DropId: DELEGATE(Drop); case Expression::Id::ReturnId: DELEGATE(Return); case Expression::Id::HostId: DELEGATE(Host); case Expression::Id::NopId: DELEGATE(Nop); @@ -132,6 +134,7 @@ struct UnifiedExpressionVisitor : public Visitor { ReturnType visitUnary(Unary *curr) { return static_cast(this)->visitExpression(curr); } ReturnType visitBinary(Binary *curr) { return static_cast(this)->visitExpression(curr); } ReturnType visitSelect(Select *curr) { return static_cast(this)->visitExpression(curr); } + ReturnType visitDrop(Drop *curr) { return static_cast(this)->visitExpression(curr); } ReturnType visitReturn(Return *curr) { return static_cast(this)->visitExpression(curr); } ReturnType visitHost(Host *curr) { return static_cast(this)->visitExpression(curr); } ReturnType visitNop(Nop *curr) { return static_cast(this)->visitExpression(curr); } @@ -264,14 +267,15 @@ struct Walker : public VisitorType { static void doVisitCallIndirect(SubType* self, Expression** currp) { self->visitCallIndirect((*currp)->cast()); } static void doVisitGetLocal(SubType* self, Expression** currp) { self->visitGetLocal((*currp)->cast()); } static void doVisitSetLocal(SubType* self, Expression** currp) { self->visitSetLocal((*currp)->cast()); } - static void doVisitGetGlobal(SubType* self, Expression** currp) { self->visitGetGlobal((*currp)->cast()); } - static void doVisitSetGlobal(SubType* self, Expression** currp) { self->visitSetGlobal((*currp)->cast()); } + static void doVisitGetGlobal(SubType* self, Expression** currp) { self->visitGetGlobal((*currp)->cast()); } + static void doVisitSetGlobal(SubType* self, Expression** currp) { self->visitSetGlobal((*currp)->cast()); } static void doVisitLoad(SubType* self, Expression** currp) { self->visitLoad((*currp)->cast()); } static void doVisitStore(SubType* self, Expression** currp) { self->visitStore((*currp)->cast()); } static void doVisitConst(SubType* self, Expression** currp) { self->visitConst((*currp)->cast()); } static void doVisitUnary(SubType* self, Expression** currp) { self->visitUnary((*currp)->cast()); } static void doVisitBinary(SubType* self, Expression** currp) { self->visitBinary((*currp)->cast()); } static void doVisitSelect(SubType* self, Expression** currp) { self->visitSelect((*currp)->cast()->ifTrue); break; } + case Expression::Id::DropId: { + self->pushTask(SubType::doVisitDrop, currp); + self->pushTask(SubType::scan, &curr->cast()->value); + break; + } case Expression::Id::ReturnId: { self->pushTask(SubType::doVisitReturn, currp); self->maybePushTask(SubType::scan, &curr->cast()->value); diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 3d9a0e1c3..b4818e253 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -30,7 +30,16 @@ struct WasmValidator : public PostWalker> bool valid = true; bool validateWebConstraints = false; - std::map breakTypes; // breaks to a label must all have the same type, and the right type + struct BreakInfo { + WasmType type; + Index arity; + BreakInfo() {} + BreakInfo(WasmType type, Index arity) : type(type), arity(arity) {} + }; + + std::map> breakTargets; // more than one block/loop may use a label name, so stack them + std::map breakInfos; + WasmType returnType = unreachable; // type used in returns public: @@ -42,55 +51,107 @@ public: // visitors + static void visitPreBlock(WasmValidator* self, Expression** currp) { + auto* curr = (*currp)->cast(); + if (curr->name.is()) self->breakTargets[curr->name].push_back(curr); + } + void visitBlock(Block *curr) { // if we are break'ed to, then the value must be right for us if (curr->name.is()) { - // none or unreachable means a poison value that we should ignore - if consumed, it will error - if (breakTypes.count(curr->name) > 0 && isConcreteWasmType(breakTypes[curr->name]) && isConcreteWasmType(curr->type)) { - shouldBeEqual(curr->type, breakTypes[curr->name], curr, "block+breaks must have right type if breaks return a value"); + if (breakInfos.count(curr) > 0) { + auto& info = breakInfos[curr]; + // none or unreachable means a poison value that we should ignore - if consumed, it will error + if (isConcreteWasmType(info.type) && isConcreteWasmType(curr->type)) { + shouldBeEqual(curr->type, info.type, curr, "block+breaks must have right type if breaks return a value"); + } + shouldBeTrue(info.arity != Index(-1), curr, "break arities must match"); + if (curr->list.size() > 0) { + auto last = curr->list.back()->type; + if (isConcreteWasmType(last) && info.type != unreachable) { + shouldBeEqual(last, info.type, curr, "block+breaks must have right type if block ends with a reachable value"); + } + if (last == none) { + shouldBeTrue(info.arity == Index(0), curr, "if block ends with a none, breaks cannot send a value of any type"); + } + } + } + breakTargets[curr->name].pop_back(); + } + if (curr->list.size() > 1) { + for (Index i = 0; i < curr->list.size() - 1; i++) { + if (!shouldBeTrue(!isConcreteWasmType(curr->list[i]->type), curr, "non-final block elements returning a value must be drop()ed (binaryen's autodrop option might help you)")) { + std::cerr << "(on index " << i << ":\n" << curr->list[i] << "\n), type: " << curr->list[i]->type << "\n"; + } } - breakTypes.erase(curr->name); } } - void visitIf(If *curr) { - shouldBeTrue(curr->condition->type == unreachable || curr->condition->type == i32 || curr->condition->type == i64, curr, "if condition must be valid"); + + static void visitPreLoop(WasmValidator* self, Expression** currp) { + auto* curr = (*currp)->cast(); + if (curr->in.is()) self->breakTargets[curr->in].push_back(curr); + if (curr->out.is()) self->breakTargets[curr->out].push_back(curr); } + void visitLoop(Loop *curr) { if (curr->in.is()) { - breakTypes.erase(curr->in); + breakTargets[curr->in].pop_back(); } if (curr->out.is()) { - breakTypes.erase(curr->out); + breakTargets[curr->out].pop_back(); } } - void noteBreak(Name name, Expression* value) { + + void visitIf(If *curr) { + shouldBeTrue(curr->condition->type == unreachable || curr->condition->type == i32 || curr->condition->type == i64, curr, "if condition must be valid"); + } + + // override scan to add a pre and a post check task to all nodes + static void scan(WasmValidator* self, Expression** currp) { + PostWalker>::scan(self, currp); + + auto* curr = *currp; + if (curr->is()) self->pushTask(visitPreBlock, currp); + if (curr->is()) self->pushTask(visitPreLoop, currp); + } + + void noteBreak(Name name, Expression* value, Expression* curr) { WasmType valueType = none; + Index arity = 0; if (value) { valueType = value->type; + shouldBeUnequal(valueType, none, curr, "breaks must have a valid value"); + arity = 1; } - if (breakTypes.count(name) == 0) { - breakTypes[name] = valueType; + if (!shouldBeTrue(breakTargets[name].size() > 0, curr, "all break targets must be valid")) return; + auto* target = breakTargets[name].back(); + if (breakInfos.count(target) == 0) { + breakInfos[target] = BreakInfo(valueType, arity); } else { - if (breakTypes[name] == unreachable) { - breakTypes[name] = valueType; + auto& info = breakInfos[target]; + if (info.type == unreachable) { + info.type = valueType; } else if (valueType != unreachable) { - if (valueType != breakTypes[name]) { - breakTypes[name] = none; // a poison value that must not be consumed + if (valueType != info.type) { + info.type = none; // a poison value that must not be consumed } } + if (arity != info.arity) { + info.arity = Index(-1); // a poison value + } } } void visitBreak(Break *curr) { - noteBreak(curr->name, curr->value); + noteBreak(curr->name, curr->value, curr); if (curr->condition) { shouldBeTrue(curr->condition->type == unreachable || curr->condition->type == i32, curr, "break condition must be i32"); } } void visitSwitch(Switch *curr) { for (auto& target : curr->targets) { - noteBreak(target, curr->value); + noteBreak(target, curr->value, curr); } - noteBreak(curr->default_, curr->value); + noteBreak(curr->default_, curr->value, curr); shouldBeTrue(curr->condition->type == unreachable || curr->condition->type == i32, curr, "br_table condition must be i32"); } void visitCall(Call *curr) { @@ -128,7 +189,9 @@ public: void visitSetLocal(SetLocal *curr) { shouldBeTrue(curr->index < getFunction()->getNumLocals(), curr, "set_local index must be small enough"); if (curr->value->type != unreachable) { - shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->type, curr, "set_local type must be correct"); + if (curr->type != none) { // tee is ok anyhow + shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->type, curr, "set_local type must be correct"); + } shouldBeEqual(getFunction()->getLocalType(curr->index), curr->value->type, curr, "set_local type must match function"); } } @@ -139,7 +202,8 @@ public: void visitStore(Store *curr) { validateAlignment(curr->align); shouldBeEqualOrFirstIsUnreachable(curr->ptr->type, i32, curr, "store pointer type must be i32"); - shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->type, curr, "store value type must match"); + shouldBeUnequal(curr->value->type, none, curr, "store value type must not be none"); + // TODO: enable a check that replaces this, for type being none shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->type, curr, "store value type must match"); } void visitBinary(Binary *curr) { if (curr->left->type != unreachable && curr->right->type != unreachable) { @@ -268,13 +332,11 @@ public: void visitFunction(Function *curr) { // if function has no result, it is ignored // if body is unreachable, it might be e.g. a return - if (curr->result != none) { - if (curr->body->type != unreachable) { - shouldBeEqual(curr->result, curr->body->type, curr->body, "function body type must match, if function returns"); - } - if (returnType != unreachable) { - shouldBeEqual(curr->result, returnType, curr->body, "function result must match, if function returns"); - } + if (curr->body->type != unreachable) { + shouldBeEqual(curr->result, curr->body->type, curr->body, "function body type must match, if function returns"); + } + if (returnType != unreachable) { + shouldBeEqual(curr->result, returnType, curr->body, "function result must match, if function returns"); } returnType = unreachable; } @@ -311,12 +373,6 @@ public: void doWalkFunction(Function* func) { PostWalker>::doWalkFunction(func); - if (!shouldBeTrue(breakTypes.size() == 0, "break targets", "all break targets must be valid")) { - for (auto& target : breakTypes) { - std::cerr << " - " << target.first << '\n'; - } - breakTypes.clear(); - } } private: diff --git a/src/wasm.h b/src/wasm.h index 68558033d..ee3e12910 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -802,7 +802,7 @@ enum UnaryOp { ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64, ConvertSInt64ToFloat32, ConvertSInt64ToFloat64, ConvertUInt64ToFloat32, ConvertUInt64ToFloat64, // int to float PromoteFloat32, // f32 to f64 DemoteFloat64, // f64 to f32 - ReinterpretInt32, ReinterpretInt64 // reinterpret bits to float + ReinterpretInt32, ReinterpretInt64, // reinterpret bits to float }; enum BinaryOp { @@ -877,6 +877,7 @@ public: UnaryId, BinaryId, SelectId, + DropId, ReturnId, HostId, NopId, @@ -929,6 +930,7 @@ inline const char *getExpressionName(Expression *curr) { case Expression::Id::UnaryId: return "unary"; case Expression::Id::BinaryId: return "binary"; case Expression::Id::SelectId: return "select"; + case Expression::Id::DropId: return "drop"; case Expression::Id::ReturnId: return "return"; case Expression::Id::HostId: return "host"; case Expression::Id::NopId: return "nop"; @@ -1108,8 +1110,13 @@ public: Index index; Expression *value; - void finalize() { - type = value->type; + bool isTee() { + return type != none; + } + + void setTee(bool is) { + if (is) type = value->type; + else type = none; } }; @@ -1150,16 +1157,17 @@ public: class Store : public SpecificExpression { public: - Store() {} - Store(MixedArena& allocator) {} + Store() : valueType(none) {} + Store(MixedArena& allocator) : Store() {} uint8_t bytes; Address offset; Address align; Expression *ptr, *value; + WasmType valueType; // the store never returns a value void finalize() { - type = value->type; + assert(valueType != none); // must be set } }; @@ -1312,6 +1320,14 @@ public: } }; +class Drop : public SpecificExpression { +public: + Drop() {} + Drop(MixedArena& allocator) {} + + Expression *value; +}; + class Return : public SpecificExpression { public: Return() : value(nullptr) { diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 49d63fa8c..04e0d76c6 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -107,16 +107,16 @@ (block (if (i32.and - (set_local $2 + (tee_local $2 (i32.shr_u - (set_local $7 + (tee_local $7 (i32.load (i32.const 176) ) ) - (set_local $5 + (tee_local $5 (i32.shr_u - (set_local $0 + (tee_local $0 (select (i32.const 16) (i32.and @@ -142,18 +142,18 @@ (block (set_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add - (set_local $5 + (tee_local $5 (i32.load - (set_local $4 + (tee_local $4 (i32.add - (set_local $1 + (tee_local $1 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.xor (i32.and @@ -199,7 +199,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 12) @@ -238,7 +238,7 @@ (i32.store offset=4 (get_local $5) (i32.or - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) (i32.const 3) @@ -248,7 +248,7 @@ ) ) (i32.store - (set_local $4 + (tee_local $4 (i32.add (i32.add (get_local $5) @@ -272,7 +272,7 @@ (if (i32.gt_u (get_local $0) - (set_local $4 + (tee_local $4 (i32.load (i32.const 184) ) @@ -285,17 +285,17 @@ (set_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.add (i32.and - (set_local $1 + (tee_local $1 (i32.and (i32.shl (get_local $2) (get_local $5) ) (i32.or - (set_local $2 + (tee_local $2 (i32.shl (i32.const 2) (get_local $5) @@ -323,27 +323,27 @@ ) (set_local $1 (i32.load - (set_local $9 + (tee_local $9 (i32.add - (set_local $16 + (tee_local $16 (i32.load - (set_local $18 + (tee_local $18 (i32.add - (set_local $10 + (tee_local $10 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $19 + (tee_local $19 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $9 + (tee_local $9 (i32.shr_u (get_local $2) (get_local $1) @@ -356,10 +356,10 @@ ) (get_local $1) ) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u - (set_local $16 + (tee_local $16 (i32.shr_u (get_local $9) (get_local $2) @@ -371,10 +371,10 @@ ) ) ) - (set_local $16 + (tee_local $16 (i32.and (i32.shr_u - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $16) (get_local $9) @@ -386,10 +386,10 @@ ) ) ) - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u - (set_local $18 + (tee_local $18 (i32.shr_u (get_local $10) (get_local $16) @@ -441,7 +441,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 12) @@ -495,14 +495,14 @@ ) ) (i32.store offset=4 - (set_local $7 + (tee_local $7 (i32.add (get_local $16) (get_local $0) ) ) (i32.or - (set_local $4 + (tee_local $4 (i32.sub (i32.shl (get_local $19) @@ -534,7 +534,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $18 + (tee_local $18 (i32.shr_u (get_local $8) (i32.const 3) @@ -548,12 +548,12 @@ ) (if (i32.and - (set_local $5 + (tee_local $5 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $18) @@ -562,9 +562,9 @@ ) (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $18 + (tee_local $18 (i32.add (get_local $10) (i32.const 8) @@ -637,7 +637,7 @@ ) ) (if - (set_local $7 + (tee_local $7 (i32.load (i32.const 180) ) @@ -646,7 +646,7 @@ (set_local $7 (i32.and (i32.shr_u - (set_local $4 + (tee_local $4 (i32.add (i32.and (get_local $7) @@ -667,7 +667,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $8 + (tee_local $8 (i32.load offset=480 (i32.shl (i32.add @@ -675,10 +675,10 @@ (i32.or (i32.or (i32.or - (set_local $4 + (tee_local $4 (i32.and (i32.shr_u - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $4) (get_local $7) @@ -691,10 +691,10 @@ ) (get_local $7) ) - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $10) (get_local $4) @@ -706,10 +706,10 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $10) @@ -721,10 +721,10 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $2) (get_local $1) @@ -757,9 +757,9 @@ (set_local $1 (get_local $8) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if - (set_local $8 + (tee_local $8 (i32.load offset=16 (get_local $5) ) @@ -768,7 +768,7 @@ (get_local $8) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=20 (get_local $5) ) @@ -783,13 +783,13 @@ (set_local $4 (get_local $1) ) - (br $while-out$6) + (br $while-out$23) ) ) ) (set_local $10 (i32.lt_u - (set_local $8 + (tee_local $8 (i32.sub (i32.and (i32.load offset=4 @@ -820,12 +820,12 @@ (get_local $10) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $4) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -836,7 +836,7 @@ (if (i32.ge_u (get_local $4) - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (get_local $0) @@ -850,10 +850,10 @@ (get_local $4) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $9 + (tee_local $9 (i32.load offset=12 (get_local $4) ) @@ -862,9 +862,9 @@ ) (block (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $4) (i32.const 20) @@ -882,9 +882,9 @@ ) (if (i32.eqz - (set_local $8 + (tee_local $8 (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $4) (i32.const 16) @@ -897,15 +897,15 @@ (set_local $18 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $8) (i32.const 20) @@ -920,13 +920,13 @@ (set_local $10 (get_local $16) ) - (br $while-in$11) + (br $while-in$28) ) ) (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $8) (i32.const 16) @@ -942,9 +942,9 @@ (get_local $16) ) ) - (br $while-out$10) + (br $while-out$27) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -966,7 +966,7 @@ (block (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.load offset=8 (get_local $4) ) @@ -978,7 +978,7 @@ (if (i32.ne (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $16) (i32.const 12) @@ -992,7 +992,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $9) (i32.const 8) @@ -1019,7 +1019,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $2) (block @@ -1027,11 +1027,11 @@ (i32.eq (get_local $4) (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.const 480) (i32.shl - (set_local $9 + (tee_local $9 (i32.load offset=28 (get_local $4) ) @@ -1067,7 +1067,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1084,7 +1084,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 16) @@ -1102,7 +1102,7 @@ (get_local $18) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eqz (get_local $18) ) @@ -1112,7 +1112,7 @@ (if (i32.lt_u (get_local $18) - (set_local $9 + (tee_local $9 (i32.load (i32.const 192) ) @@ -1125,7 +1125,7 @@ (get_local $2) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $4) ) @@ -1149,7 +1149,7 @@ ) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=20 (get_local $4) ) @@ -1186,7 +1186,7 @@ (i32.store offset=4 (get_local $4) (i32.or - (set_local $2 + (tee_local $2 (i32.add (get_local $7) (get_local $0) @@ -1196,7 +1196,7 @@ ) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $4) @@ -1236,7 +1236,7 @@ (get_local $7) ) (if - (set_local $1 + (tee_local $1 (i32.load (i32.const 184) ) @@ -1252,7 +1252,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $9 + (tee_local $9 (i32.shr_u (get_local $1) (i32.const 3) @@ -1266,12 +1266,12 @@ ) (if (i32.and - (set_local $16 + (tee_local $16 (i32.load (i32.const 176) ) ) - (set_local $10 + (tee_local $10 (i32.shl (i32.const 1) (get_local $9) @@ -1280,9 +1280,9 @@ ) (if (i32.lt_u - (set_local $19 + (tee_local $19 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $1) (i32.const 8) @@ -1358,10 +1358,8 @@ ) ) ) - (get_local $0) ) ) - (get_local $0) ) ) (if @@ -1372,7 +1370,7 @@ (block (set_local $2 (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 11) @@ -1382,7 +1380,7 @@ ) ) (if - (set_local $10 + (tee_local $10 (i32.load (i32.const 180) ) @@ -1396,12 +1394,12 @@ ) (block $label$break$L123 (if - (set_local $7 + (tee_local $7 (i32.load offset=480 (i32.shl - (set_local $0 + (tee_local $0 (if - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $1) (i32.const 8) @@ -1418,20 +1416,20 @@ (i32.shr_u (get_local $2) (i32.add - (set_local $7 + (tee_local $7 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u (i32.add - (set_local $9 + (tee_local $9 (i32.shl (get_local $19) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add @@ -1454,11 +1452,11 @@ ) (get_local $1) ) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u (i32.add - (set_local $8 + (tee_local $8 (i32.shl (get_local $9) (get_local $19) @@ -1532,12 +1530,12 @@ (set_local $4 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.sub - (set_local $18 + (tee_local $18 (i32.and (i32.load offset=4 (get_local $19) @@ -1583,7 +1581,7 @@ (set_local $18 (select (get_local $8) - (set_local $5 + (tee_local $5 (i32.load offset=20 (get_local $19) ) @@ -1595,7 +1593,7 @@ ) (i32.eq (get_local $5) - (set_local $19 + (tee_local $19 (i32.load (i32.add (i32.add @@ -1617,7 +1615,7 @@ ) ) (if - (set_local $5 + (tee_local $5 (i32.eq (get_local $19) (i32.const 0) @@ -1636,7 +1634,7 @@ (set_local $9 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $8 @@ -1656,7 +1654,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) (block @@ -1681,7 +1679,7 @@ (i32.const 86) ) (if - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -1696,11 +1694,11 @@ (block (if (i32.eqz - (set_local $16 + (tee_local $16 (i32.and (get_local $10) (i32.or - (set_local $7 + (tee_local $7 (i32.shl (i32.const 2) (get_local $0) @@ -1724,7 +1722,7 @@ (set_local $16 (i32.and (i32.shr_u - (set_local $7 + (tee_local $7 (i32.add (i32.and (get_local $16) @@ -1748,10 +1746,10 @@ (i32.or (i32.or (i32.or - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $7) (get_local $16) @@ -1764,10 +1762,10 @@ ) (get_local $16) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $0) (get_local $7) @@ -1779,10 +1777,10 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $4 + (tee_local $4 (i32.shr_u (get_local $5) (get_local $0) @@ -1794,10 +1792,10 @@ ) ) ) - (set_local $4 + (tee_local $4 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $4) (get_local $5) @@ -1850,13 +1848,13 @@ (get_local $9) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $9 (i32.const 0) ) (set_local $1 (i32.lt_u - (set_local $4 + (tee_local $4 (i32.sub (i32.and (i32.load offset=4 @@ -1885,7 +1883,7 @@ ) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $25) ) @@ -1900,11 +1898,11 @@ (set_local $29 (get_local $4) ) - (br $while-in$20) + (br $while-in$6) ) ) (if - (set_local $25 + (tee_local $25 (i32.load offset=20 (get_local $25) ) @@ -1924,10 +1922,10 @@ (set_local $12 (get_local $4) ) - (br $while-out$19) + (br $while-out$5) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -1951,7 +1949,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 192) ) @@ -1962,7 +1960,7 @@ (if (i32.ge_u (get_local $12) - (set_local $4 + (tee_local $4 (i32.add (get_local $12) (get_local $2) @@ -1976,10 +1974,10 @@ (get_local $12) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $12) ) @@ -1988,9 +1986,9 @@ ) (block (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $12) (i32.const 20) @@ -2008,9 +2006,9 @@ ) (if (i32.eqz - (set_local $8 + (tee_local $8 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $12) (i32.const 16) @@ -2023,15 +2021,15 @@ (set_local $11 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 20) @@ -2046,13 +2044,13 @@ (set_local $7 (get_local $0) ) - (br $while-in$24) + (br $while-in$10) ) ) (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 16) @@ -2068,9 +2066,9 @@ (get_local $0) ) ) - (br $while-out$23) + (br $while-out$9) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2092,7 +2090,7 @@ (block (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $12) ) @@ -2104,7 +2102,7 @@ (if (i32.ne (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $0) (i32.const 12) @@ -2118,7 +2116,7 @@ (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -2145,7 +2143,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $5) (block @@ -2153,11 +2151,11 @@ (i32.eq (get_local $12) (i32.load - (set_local $10 + (tee_local $10 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $12) ) @@ -2193,7 +2191,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2210,7 +2208,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $5) (i32.const 16) @@ -2228,7 +2226,7 @@ (get_local $11) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eqz (get_local $11) ) @@ -2238,7 +2236,7 @@ (if (i32.lt_u (get_local $11) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -2251,7 +2249,7 @@ (get_local $5) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=16 (get_local $12) ) @@ -2275,7 +2273,7 @@ ) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=20 (get_local $12) ) @@ -2303,7 +2301,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.ge_u (get_local $6) @@ -2357,12 +2355,12 @@ ) (if (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $0 + (tee_local $0 (i32.shl (i32.const 1) (get_local $5) @@ -2371,9 +2369,9 @@ ) (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $10) (i32.const 8) @@ -2430,16 +2428,16 @@ (get_local $4) (get_local $10) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $5 (i32.add (i32.const 480) (i32.shl - (set_local $8 + (tee_local $8 (if - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $6) (i32.const 8) @@ -2456,20 +2454,20 @@ (i32.shr_u (get_local $6) (i32.add - (set_local $5 + (tee_local $5 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $10) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -2492,11 +2490,11 @@ ) (get_local $0) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $1) (get_local $10) @@ -2543,7 +2541,7 @@ (get_local $8) ) (i32.store offset=4 - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (i32.const 16) @@ -2558,12 +2556,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $7 + (tee_local $7 (i32.shl (i32.const 1) (get_local $8) @@ -2595,7 +2593,7 @@ (get_local $4) (get_local $4) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $7 @@ -2622,7 +2620,7 @@ (get_local $5) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -2640,13 +2638,13 @@ (set_local $9 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.add (get_local $1) @@ -2684,10 +2682,10 @@ (set_local $9 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -2729,9 +2727,9 @@ (if (i32.and (i32.ge_u - (set_local $7 + (tee_local $7 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -2739,7 +2737,7 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -2781,7 +2779,7 @@ (i32.store offset=4 (get_local $12) (i32.or - (set_local $7 + (tee_local $7 (i32.add (get_local $6) (get_local $2) @@ -2791,7 +2789,7 @@ ) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $12) @@ -2835,7 +2833,7 @@ ) (if (i32.ge_u - (set_local $12 + (tee_local $12 (i32.load (i32.const 184) ) @@ -2850,7 +2848,7 @@ ) (if (i32.gt_u - (set_local $6 + (tee_local $6 (i32.sub (get_local $12) (get_local $0) @@ -2861,7 +2859,7 @@ (block (i32.store (i32.const 196) - (set_local $21 + (tee_local $21 (i32.add (get_local $15) (get_local $0) @@ -2911,7 +2909,7 @@ ) ) (i32.store - (set_local $6 + (tee_local $6 (i32.add (i32.add (get_local $15) @@ -2939,7 +2937,7 @@ ) (if (i32.gt_u - (set_local $15 + (tee_local $15 (i32.load (i32.const 188) ) @@ -2949,7 +2947,7 @@ (block (i32.store (i32.const 188) - (set_local $6 + (tee_local $6 (i32.sub (get_local $15) (get_local $0) @@ -2958,9 +2956,9 @@ ) (i32.store (i32.const 200) - (set_local $12 + (tee_local $12 (i32.add - (set_local $15 + (tee_local $15 (i32.load (i32.const 200) ) @@ -3000,7 +2998,7 @@ (if (i32.and (i32.add - (set_local $15 + (tee_local $15 (call_import $_sysconf (i32.const 30) ) @@ -3058,16 +3056,16 @@ ) (if (i32.le_u - (set_local $6 + (tee_local $6 (i32.and - (set_local $21 + (tee_local $21 (i32.add - (set_local $6 + (tee_local $6 (i32.load (i32.const 656) ) ) - (set_local $12 + (tee_local $12 (i32.add (get_local $0) (i32.const 47) @@ -3075,7 +3073,7 @@ ) ) ) - (set_local $23 + (tee_local $23 (i32.sub (i32.const 0) (get_local $6) @@ -3092,7 +3090,7 @@ (if (if (i32.ne - (set_local $8 + (tee_local $8 (i32.load (i32.const 616) ) @@ -3101,9 +3099,9 @@ ) (i32.or (i32.le_u - (set_local $14 + (tee_local $14 (i32.add - (set_local $26 + (tee_local $26 (i32.load (i32.const 608) ) @@ -3134,7 +3132,7 @@ ) (i32.const 0) (i32.eq - (set_local $9 + (tee_local $9 (block $label$break$L257 (if (i32.and @@ -3147,7 +3145,7 @@ (block (block $label$break$L259 (if - (set_local $8 + (tee_local $8 (i32.load (i32.const 200) ) @@ -3160,7 +3158,7 @@ (if (if (i32.le_u - (set_local $26 + (tee_local $26 (i32.load (get_local $14) ) @@ -3171,7 +3169,7 @@ (i32.add (get_local $26) (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $14) (i32.const 4) @@ -3195,7 +3193,7 @@ ) (if (i32.eqz - (set_local $14 + (tee_local $14 (i32.load offset=8 (get_local $14) ) @@ -3212,7 +3210,7 @@ ) (if (i32.lt_u - (set_local $14 + (tee_local $14 (i32.and (i32.sub (get_local $21) @@ -3227,7 +3225,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (call_import $_sbrk (get_local $14) ) @@ -3285,7 +3283,7 @@ (i32.const 173) ) (i32.ne - (set_local $8 + (tee_local $8 (call_import $_sbrk (i32.const 0) ) @@ -3298,9 +3296,9 @@ (set_local $1 (if (i32.and - (set_local $11 + (tee_local $11 (i32.add - (set_local $14 + (tee_local $14 (i32.load (i32.const 652) ) @@ -3308,7 +3306,7 @@ (i32.const -1) ) ) - (set_local $2 + (tee_local $2 (get_local $8) ) ) @@ -3333,7 +3331,7 @@ ) (set_local $2 (i32.add - (set_local $14 + (tee_local $14 (i32.load (i32.const 608) ) @@ -3362,7 +3360,7 @@ ) (i32.gt_u (get_local $2) - (set_local $11 + (tee_local $11 (i32.load (i32.const 616) ) @@ -3378,7 +3376,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (call_import $_sbrk (get_local $1) ) @@ -3445,14 +3443,14 @@ ) ) (i32.lt_u - (set_local $2 + (tee_local $2 (i32.and (i32.add (i32.sub (get_local $12) (get_local $17) ) - (set_local $8 + (tee_local $8 (i32.load (i32.const 656) ) @@ -3476,8 +3474,10 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $11) + (drop + (call_import $_sbrk + (get_local $11) + ) ) (br $label$break$L279) ) @@ -3531,12 +3531,12 @@ ) (i32.and (i32.lt_u - (set_local $3 + (tee_local $3 (call_import $_sbrk (get_local $6) ) ) - (set_local $6 + (tee_local $6 (call_import $_sbrk (i32.const 0) ) @@ -3556,7 +3556,7 @@ (i32.const 0) ) (i32.gt_u - (set_local $13 + (tee_local $13 (i32.sub (get_local $6) (get_local $3) @@ -3589,7 +3589,7 @@ (block (i32.store (i32.const 608) - (set_local $13 + (tee_local $13 (i32.add (i32.load (i32.const 608) @@ -3612,7 +3612,7 @@ ) (block $do-once$44 (if - (set_local $13 + (tee_local $13 (i32.load (i32.const 200) ) @@ -3621,19 +3621,19 @@ (set_local $3 (i32.const 624) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$48 $do-in$49 (if (i32.eq (get_local $20) (i32.add - (set_local $6 + (tee_local $6 (i32.load (get_local $3) ) ) - (set_local $12 + (tee_local $12 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $3) (i32.const 4) @@ -3659,12 +3659,12 @@ (set_local $9 (i32.const 203) ) - (br $do-out$46) + (br $do-out$48) ) ) - (br_if $do-in$47 + (br_if $do-in$49 (i32.ne - (set_local $3 + (tee_local $3 (i32.load offset=8 (get_local $3) ) @@ -3714,13 +3714,13 @@ (set_local $3 (i32.add (get_local $13) - (set_local $12 + (tee_local $12 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $13) (i32.const 8) @@ -3786,7 +3786,7 @@ (if (i32.lt_u (get_local $20) - (set_local $17 + (tee_local $17 (i32.load (i32.const 192) ) @@ -3811,7 +3811,7 @@ (set_local $3 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$50 $while-in$51 (if (i32.eq (i32.load @@ -3829,12 +3829,12 @@ (set_local $9 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (if (i32.eqz - (set_local $3 + (tee_local $3 (i32.load offset=8 (get_local $3) ) @@ -3844,10 +3844,10 @@ (set_local $28 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) (if (i32.eq @@ -3870,7 +3870,7 @@ (get_local $20) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $41) (i32.const 4) @@ -3891,7 +3891,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $20) (i32.const 8) @@ -3918,7 +3918,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $17) (i32.const 8) @@ -3959,7 +3959,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.ne (get_local $6) @@ -3976,7 +3976,7 @@ (block (i32.store (i32.const 184) - (set_local $1 + (tee_local $1 (i32.add (i32.load (i32.const 184) @@ -4003,16 +4003,16 @@ ) (get_local $1) ) - (br $do-once$50) + (br $do-once$52) ) ) (i32.store - (set_local $5 + (tee_local $5 (i32.add (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $6) ) @@ -4046,10 +4046,10 @@ (get_local $6) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq - (set_local $21 + (tee_local $21 (i32.load offset=12 (get_local $6) ) @@ -4058,11 +4058,11 @@ ) (block (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add - (set_local $11 + (tee_local $11 (i32.add (get_local $6) (i32.const 16) @@ -4083,7 +4083,7 @@ ) (if (i32.eqz - (set_local $14 + (tee_local $14 (i32.load (get_local $11) ) @@ -4093,15 +4093,15 @@ (set_local $24 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) ) ) - (loop $while-out$55 $while-in$56 + (loop $while-out$61 $while-in$62 (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $14) (i32.const 20) @@ -4116,13 +4116,13 @@ (set_local $11 (get_local $2) ) - (br $while-in$56) + (br $while-in$62) ) ) (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $14) (i32.const 16) @@ -4138,9 +4138,9 @@ (get_local $2) ) ) - (br $while-out$55) + (br $while-out$61) ) - (br $while-in$56) + (br $while-in$62) ) (if (i32.lt_u @@ -4162,7 +4162,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $6) ) @@ -4174,7 +4174,7 @@ (if (i32.ne (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 12) @@ -4188,7 +4188,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $21) (i32.const 8) @@ -4220,16 +4220,16 @@ (get_local $23) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.ne (get_local $6) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $21 + (tee_local $21 (i32.load offset=28 (get_local $6) ) @@ -4253,7 +4253,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $23) (i32.const 16) @@ -4282,7 +4282,7 @@ (get_local $2) (get_local $24) ) - (br_if $do-once$57 + (br_if $do-once$63 (get_local $24) ) (i32.store @@ -4307,7 +4307,7 @@ (if (i32.lt_u (get_local $24) - (set_local $21 + (tee_local $21 (i32.load (i32.const 192) ) @@ -4320,9 +4320,9 @@ (get_local $23) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $6) (i32.const 16) @@ -4350,7 +4350,7 @@ ) (br_if $label$break$L331 (i32.eqz - (set_local $11 + (tee_local $11 (i32.load offset=4 (get_local $2) ) @@ -4383,15 +4383,15 @@ (get_local $6) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne - (set_local $11 + (tee_local $11 (i32.load offset=8 (get_local $6) ) ) - (set_local $23 + (tee_local $23 (i32.add (i32.const 216) (i32.shl @@ -4412,7 +4412,7 @@ ) (call_import $_abort) ) - (br_if $do-once$61 + (br_if $do-once$55 (i32.eq (i32.load offset=12 (get_local $11) @@ -4448,7 +4448,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $21) @@ -4471,7 +4471,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $21) (i32.const 8) @@ -4484,7 +4484,7 @@ (set_local $42 (get_local $2) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -4563,15 +4563,15 @@ ) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.and - (set_local $23 + (tee_local $23 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $5) @@ -4581,9 +4581,9 @@ (block (if (i32.ge_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 8) @@ -4602,7 +4602,7 @@ (set_local $35 (get_local $8) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -4643,24 +4643,24 @@ (get_local $3) (get_local $1) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 - (block $do-once$67 + (tee_local $0 + (block $do-once$69 (if - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $15) (i32.const 8) ) ) (block - (br_if $do-once$67 + (br_if $do-once$69 (i32.const 31) (i32.gt_u (get_local $15) @@ -4672,20 +4672,20 @@ (i32.shr_u (get_local $15) (i32.add - (set_local $14 + (tee_local $14 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $8 + (tee_local $8 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $2) - (set_local $23 + (tee_local $23 (i32.and (i32.shr_u (i32.add @@ -4708,11 +4708,11 @@ ) (get_local $23) ) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $5 (i32.shl (get_local $7) (get_local $8) @@ -4760,7 +4760,7 @@ (get_local $0) ) (i32.store offset=4 - (set_local $1 + (tee_local $1 (i32.add (get_local $3) (i32.const 16) @@ -4775,12 +4775,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $14 + (tee_local $14 (i32.shl (i32.const 1) (get_local $0) @@ -4812,7 +4812,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $14 @@ -4839,7 +4839,7 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$71 $while-in$72 (if (i32.eq (i32.and @@ -4857,13 +4857,13 @@ (set_local $9 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $1) @@ -4901,10 +4901,10 @@ (set_local $9 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) ) - (br $while-in$70) + (br $while-in$72) ) (if (i32.eq @@ -4946,9 +4946,9 @@ (if (i32.and (i32.ge_u - (set_local $14 + (tee_local $14 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $36) (i32.const 8) @@ -4956,7 +4956,7 @@ ) ) ) - (set_local $7 + (tee_local $7 (i32.load (i32.const 192) ) @@ -4997,7 +4997,7 @@ (block (i32.store (i32.const 188) - (set_local $14 + (tee_local $14 (i32.add (i32.load (i32.const 188) @@ -5029,11 +5029,11 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$73 $while-in$74 (if (if (i32.le_u - (set_local $3 + (tee_local $3 (i32.load (get_local $28) ) @@ -5041,7 +5041,7 @@ (get_local $13) ) (i32.gt_u - (set_local $15 + (tee_local $15 (i32.add (get_local $3) (i32.load offset=4 @@ -5057,7 +5057,7 @@ (set_local $5 (get_local $15) ) - (br $while-out$71) + (br $while-out$73) ) ) (set_local $28 @@ -5065,11 +5065,11 @@ (get_local $28) ) ) - (br $while-in$72) + (br $while-in$74) ) (set_local $15 (i32.add - (set_local $12 + (tee_local $12 (i32.add (get_local $5) (i32.const -47) @@ -5080,10 +5080,10 @@ ) (set_local $3 (i32.add - (set_local $12 + (tee_local $12 (select (get_local $13) - (set_local $3 + (tee_local $3 (i32.add (get_local $12) (select @@ -5107,7 +5107,7 @@ ) (i32.lt_u (get_local $3) - (set_local $15 + (tee_local $15 (i32.add (get_local $13) (i32.const 16) @@ -5121,16 +5121,16 @@ ) (i32.store (i32.const 200) - (set_local $6 + (tee_local $6 (i32.add (get_local $20) - (set_local $17 + (tee_local $17 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $6 + (tee_local $6 (i32.add (get_local $20) (i32.const 8) @@ -5153,7 +5153,7 @@ ) (i32.store (i32.const 188) - (set_local $14 + (tee_local $14 (i32.sub (i32.add (get_local $22) @@ -5184,7 +5184,7 @@ ) ) (i32.store - (set_local $14 + (tee_local $14 (i32.add (get_local $12) (i32.const 4) @@ -5238,9 +5238,9 @@ (i32.const 24) ) ) - (loop $do-in$74 + (loop $do-in$76 (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (i32.const 4) @@ -5248,7 +5248,7 @@ ) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$76 (i32.lt_u (i32.add (get_local $3) @@ -5276,7 +5276,7 @@ (i32.store offset=4 (get_local $13) (i32.or - (set_local $3 + (tee_local $3 (i32.sub (get_local $12) (get_local $13) @@ -5315,12 +5315,12 @@ ) (if (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $7 + (tee_local $7 (i32.shl (i32.const 1) (get_local $6) @@ -5329,9 +5329,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $17) (i32.const 8) @@ -5395,9 +5395,9 @@ (i32.add (i32.const 480) (i32.shl - (set_local $5 + (tee_local $5 (if - (set_local $17 + (tee_local $17 (i32.shr_u (get_local $3) (i32.const 8) @@ -5414,20 +5414,20 @@ (i32.shr_u (get_local $3) (i32.add - (set_local $6 + (tee_local $6 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $17) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add @@ -5450,11 +5450,11 @@ ) (get_local $7) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $1) (get_local $17) @@ -5511,12 +5511,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $5) @@ -5575,7 +5575,7 @@ (get_local $6) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$77 $while-in$78 (if (i32.eq (i32.and @@ -5593,13 +5593,13 @@ (set_local $9 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.add (get_local $1) @@ -5637,10 +5637,10 @@ (set_local $9 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) ) - (br $while-in$76) + (br $while-in$78) ) (if (i32.eq @@ -5682,9 +5682,9 @@ (if (i32.and (i32.ge_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $38) (i32.const 8) @@ -5692,7 +5692,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 192) ) @@ -5736,7 +5736,7 @@ (if (i32.or (i32.eq - (set_local $2 + (tee_local $2 (i32.load (i32.const 192) ) @@ -5778,9 +5778,9 @@ (set_local $2 (i32.const 0) ) - (loop $do-in$78 + (loop $do-in$47 (i32.store offset=12 - (set_local $1 + (tee_local $1 (i32.add (i32.const 216) (i32.shl @@ -5798,9 +5798,9 @@ (get_local $1) (get_local $1) ) - (br_if $do-in$78 + (br_if $do-in$47 (i32.ne - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const 1) @@ -5812,16 +5812,16 @@ ) (i32.store (i32.const 200) - (set_local $2 + (tee_local $2 (i32.add (get_local $20) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $2 + (tee_local $2 (i32.add (get_local $20) (i32.const 8) @@ -5844,7 +5844,7 @@ ) (i32.store (i32.const 188) - (set_local $3 + (tee_local $3 (i32.sub (i32.add (get_local $22) @@ -5879,7 +5879,7 @@ ) (if (i32.gt_u - (set_local $22 + (tee_local $22 (i32.load (i32.const 188) ) @@ -5889,7 +5889,7 @@ (block (i32.store (i32.const 188) - (set_local $20 + (tee_local $20 (i32.sub (get_local $22) (get_local $0) @@ -5898,9 +5898,9 @@ ) (i32.store (i32.const 200) - (set_local $13 + (tee_local $13 (i32.add - (set_local $22 + (tee_local $22 (i32.load (i32.const 200) ) @@ -5967,13 +5967,13 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $14 + (tee_local $14 (i32.load (i32.const 192) ) @@ -5983,9 +5983,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.add (get_local $0) @@ -6003,7 +6003,7 @@ (set_local $8 (i32.add (get_local $1) - (set_local $3 + (tee_local $3 (i32.and (get_local $9) (i32.const -8) @@ -6045,7 +6045,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.sub @@ -6069,9 +6069,9 @@ (if (i32.ne (i32.and - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $8) (i32.const 4) @@ -6140,12 +6140,12 @@ ) (if (i32.ne - (set_local $9 + (tee_local $9 (i32.load offset=8 (get_local $0) ) ) - (set_local $6 + (tee_local $6 (i32.add (i32.const 216) (i32.shl @@ -6223,7 +6223,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 8) @@ -6270,7 +6270,7 @@ (block $do-once$2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $0) ) @@ -6279,11 +6279,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 16) @@ -6304,7 +6304,7 @@ ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load (get_local $6) ) @@ -6320,9 +6320,9 @@ ) (loop $while-out$4 $while-in$5 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 20) @@ -6341,9 +6341,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 16) @@ -6391,7 +6391,7 @@ (block (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load offset=8 (get_local $0) ) @@ -6403,7 +6403,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $5) (i32.const 12) @@ -6417,7 +6417,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 8) @@ -6451,11 +6451,11 @@ (i32.eq (get_local $0) (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $0) ) @@ -6514,7 +6514,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 16) @@ -6551,7 +6551,7 @@ (if (i32.lt_u (get_local $4) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -6564,9 +6564,9 @@ (get_local $9) ) (if - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 16) @@ -6593,7 +6593,7 @@ ) ) (if - (set_local $6 + (tee_local $6 (i32.load offset=4 (get_local $5) ) @@ -6655,9 +6655,9 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $8) (i32.const 4) @@ -6712,7 +6712,7 @@ (block (i32.store (i32.const 188) - (set_local $4 + (tee_local $4 (i32.add (i32.load (i32.const 188) @@ -6762,7 +6762,7 @@ (block (i32.store (i32.const 184) - (set_local $4 + (tee_local $4 (i32.add (i32.load (i32.const 184) @@ -6822,7 +6822,7 @@ (block $do-once$10 (if (i32.eq - (set_local $10 + (tee_local $10 (i32.load offset=12 (get_local $8) ) @@ -6831,11 +6831,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $6 + (tee_local $6 (i32.add (get_local $8) (i32.const 16) @@ -6856,7 +6856,7 @@ ) (if (i32.eqz - (set_local $0 + (tee_local $0 (i32.load (get_local $6) ) @@ -6872,9 +6872,9 @@ ) (loop $while-out$12 $while-in$13 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -6893,9 +6893,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -6937,7 +6937,7 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $8) ) @@ -6951,7 +6951,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $1) (i32.const 12) @@ -6965,7 +6965,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $10) (i32.const 8) @@ -6999,11 +6999,11 @@ (i32.eq (get_local $8) (i32.load - (set_local $3 + (tee_local $3 (i32.add (i32.const 480) (i32.shl - (set_local $10 + (tee_local $10 (i32.load offset=28 (get_local $8) ) @@ -7056,7 +7056,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $5) (i32.const 16) @@ -7084,7 +7084,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 192) ) @@ -7097,9 +7097,9 @@ (get_local $5) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $8) (i32.const 16) @@ -7126,7 +7126,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $3) ) @@ -7162,12 +7162,12 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $8) ) ) - (set_local $5 + (tee_local $5 (i32.add (i32.const 216) (i32.shl @@ -7243,7 +7243,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $10) (i32.const 8) @@ -7336,12 +7336,12 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.load (i32.const 176) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $7) @@ -7350,9 +7350,9 @@ ) (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -7416,9 +7416,9 @@ (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (if - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $0) (i32.const 8) @@ -7435,20 +7435,20 @@ (i32.shr_u (get_local $0) (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $15 + (tee_local $15 (i32.shl (get_local $1) - (set_local $13 + (tee_local $13 (i32.and (i32.shr_u (i32.add @@ -7471,11 +7471,11 @@ ) (get_local $13) ) - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $15) (get_local $1) @@ -7531,12 +7531,12 @@ ) (if (i32.and - (set_local $15 + (tee_local $15 (i32.load (i32.const 180) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $1) @@ -7590,9 +7590,9 @@ ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $16 + (tee_local $16 (i32.add (i32.add (get_local $1) @@ -7675,9 +7675,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $17) (i32.const 8) @@ -7685,7 +7685,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 192) ) @@ -7751,7 +7751,7 @@ ) (i32.store (i32.const 208) - (set_local $2 + (tee_local $2 (i32.add (i32.load (i32.const 208) @@ -7769,7 +7769,7 @@ ) (loop $while-out$20 $while-in$21 (if - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -7830,15 +7830,15 @@ (get_local $11) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $11) (i32.const 32) ) ) - (set_local $8 + (tee_local $8 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $0) (i32.const 28) @@ -7849,10 +7849,10 @@ ) (i32.store offset=4 (get_local $3) - (set_local $10 + (tee_local $10 (i32.sub (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 20) @@ -7899,7 +7899,7 @@ (if (i32.eq (get_local $5) - (set_local $6 + (tee_local $6 (if (i32.load (i32.const 8) @@ -7996,7 +7996,7 @@ (if (i32.le_u (get_local $6) - (set_local $5 + (tee_local $5 (i32.load offset=4 (get_local $4) ) @@ -8038,7 +8038,7 @@ (block (i32.store (get_local $9) - (set_local $7 + (tee_local $7 (i32.load (get_local $8) ) @@ -8108,7 +8108,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $5 + (tee_local $5 (i32.load (get_local $8) ) @@ -8120,7 +8120,7 @@ ) (i32.store (get_local $9) - (set_local $8 + (tee_local $8 (get_local $5) ) ) @@ -8190,9 +8190,9 @@ (local $6 i32) (local $7 i32) (if - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $2) (i32.const 16) @@ -8235,9 +8235,9 @@ ) (block (set_local $6 - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -8309,7 +8309,7 @@ (i32.load8_s (i32.add (get_local $0) - (set_local $7 + (tee_local $7 (i32.add (get_local $3) (i32.const -1) @@ -8382,10 +8382,12 @@ ) ) ) - (call $_memcpy - (get_local $6) - (get_local $2) - (get_local $0) + (drop + (call $_memcpy + (get_local $6) + (get_local $2) + (get_local $0) + ) ) (i32.store (get_local $5) @@ -8469,7 +8471,7 @@ (i32.const 36) ) (if - (set_local $2 + (tee_local $2 (i32.load (i32.const 32) ) @@ -8522,12 +8524,13 @@ ) ) (if - (set_local $1 - (i32.load offset=56 - (get_local $1) + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - (get_local $2) (block (set_local $0 (get_local $2) @@ -8538,7 +8541,6 @@ (br $while-in$3) ) ) - (get_local $0) ) (call_import $___unlock (i32.const 36) @@ -8557,7 +8559,7 @@ (block $label$break$L1 (if (i32.and - (set_local $3 + (tee_local $3 (get_local $0) ) (i32.const 3) @@ -8581,18 +8583,19 @@ ) ) (if - (i32.and - (set_local $4 - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -8630,7 +8633,7 @@ (i32.and (i32.xor (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $1) ) @@ -8672,7 +8675,7 @@ (loop $while-out$5 $while-in$6 (if (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 1) @@ -8687,7 +8690,6 @@ (br $while-in$6) ) ) - (get_local $1) ) (set_local $5 (get_local $1) @@ -8724,10 +8726,10 @@ ) ) (i32.store8 - (set_local $6 + (tee_local $6 (get_local $5) ) - (set_local $9 + (tee_local $9 (i32.and (get_local $1) (i32.const 255) @@ -8735,9 +8737,9 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 16) @@ -8782,9 +8784,9 @@ (if (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8795,7 +8797,7 @@ (get_local $7) ) (i32.ne - (set_local $10 + (tee_local $10 (i32.and (get_local $1) (i32.const 255) @@ -8870,7 +8872,7 @@ (if (i32.gt_u (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -8878,7 +8880,7 @@ ) ) (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 28) @@ -8887,19 +8889,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (i32.eq (i32.load @@ -8914,9 +8918,9 @@ (block (if (i32.lt_u - (set_local $4 + (tee_local $4 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 4) @@ -8924,9 +8928,9 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 8) @@ -9144,7 +9148,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -9173,7 +9177,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -9264,7 +9268,7 @@ (if (i32.gt_s (i32.load offset=76 - (set_local $1 + (tee_local $1 (i32.load (i32.const 52) ) @@ -9299,9 +9303,9 @@ (i32.const 10) ) (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 20) @@ -9375,7 +9379,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -9392,7 +9396,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -9437,7 +9441,7 @@ (local $2 i32) (set_local $2 (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 74) @@ -9457,7 +9461,7 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -9485,7 +9489,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -9519,7 +9523,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.gt_s (i32.load offset=76 @@ -9735,7 +9739,7 @@ ) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -9978,8 +9982,10 @@ ) ) (func $_main (result i32) - (call $_puts - (i32.const 672) + (drop + (call $_puts + (i32.const 672) + ) ) (i32.const 0) ) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 4f0513d28..a87591d78 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -106,16 +106,16 @@ (block (if (i32.and - (set_local $2 + (tee_local $2 (i32.shr_u - (set_local $7 + (tee_local $7 (i32.load (i32.const 176) ) ) - (set_local $5 + (tee_local $5 (i32.shr_u - (set_local $0 + (tee_local $0 (select (i32.const 16) (i32.and @@ -141,18 +141,18 @@ (block (set_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add - (set_local $5 + (tee_local $5 (i32.load - (set_local $4 + (tee_local $4 (i32.add - (set_local $1 + (tee_local $1 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.xor (i32.and @@ -198,7 +198,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 12) @@ -237,7 +237,7 @@ (i32.store offset=4 (get_local $5) (i32.or - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) (i32.const 3) @@ -247,7 +247,7 @@ ) ) (i32.store - (set_local $4 + (tee_local $4 (i32.add (i32.add (get_local $5) @@ -271,7 +271,7 @@ (if (i32.gt_u (get_local $0) - (set_local $4 + (tee_local $4 (i32.load (i32.const 184) ) @@ -284,17 +284,17 @@ (set_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.add (i32.and - (set_local $1 + (tee_local $1 (i32.and (i32.shl (get_local $2) (get_local $5) ) (i32.or - (set_local $2 + (tee_local $2 (i32.shl (i32.const 2) (get_local $5) @@ -322,27 +322,27 @@ ) (set_local $1 (i32.load - (set_local $9 + (tee_local $9 (i32.add - (set_local $16 + (tee_local $16 (i32.load - (set_local $18 + (tee_local $18 (i32.add - (set_local $10 + (tee_local $10 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $19 + (tee_local $19 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $9 + (tee_local $9 (i32.shr_u (get_local $2) (get_local $1) @@ -355,10 +355,10 @@ ) (get_local $1) ) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u - (set_local $16 + (tee_local $16 (i32.shr_u (get_local $9) (get_local $2) @@ -370,10 +370,10 @@ ) ) ) - (set_local $16 + (tee_local $16 (i32.and (i32.shr_u - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $16) (get_local $9) @@ -385,10 +385,10 @@ ) ) ) - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u - (set_local $18 + (tee_local $18 (i32.shr_u (get_local $10) (get_local $16) @@ -440,7 +440,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 12) @@ -494,14 +494,14 @@ ) ) (i32.store offset=4 - (set_local $7 + (tee_local $7 (i32.add (get_local $16) (get_local $0) ) ) (i32.or - (set_local $4 + (tee_local $4 (i32.sub (i32.shl (get_local $19) @@ -533,7 +533,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $18 + (tee_local $18 (i32.shr_u (get_local $8) (i32.const 3) @@ -547,12 +547,12 @@ ) (if (i32.and - (set_local $5 + (tee_local $5 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $18) @@ -561,9 +561,9 @@ ) (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $18 + (tee_local $18 (i32.add (get_local $10) (i32.const 8) @@ -636,7 +636,7 @@ ) ) (if - (set_local $7 + (tee_local $7 (i32.load (i32.const 180) ) @@ -645,7 +645,7 @@ (set_local $7 (i32.and (i32.shr_u - (set_local $4 + (tee_local $4 (i32.add (i32.and (get_local $7) @@ -666,7 +666,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $8 + (tee_local $8 (i32.load offset=480 (i32.shl (i32.add @@ -674,10 +674,10 @@ (i32.or (i32.or (i32.or - (set_local $4 + (tee_local $4 (i32.and (i32.shr_u - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $4) (get_local $7) @@ -690,10 +690,10 @@ ) (get_local $7) ) - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $10) (get_local $4) @@ -705,10 +705,10 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $10) @@ -720,10 +720,10 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $2) (get_local $1) @@ -756,9 +756,9 @@ (set_local $1 (get_local $8) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if - (set_local $8 + (tee_local $8 (i32.load offset=16 (get_local $5) ) @@ -767,7 +767,7 @@ (get_local $8) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=20 (get_local $5) ) @@ -782,13 +782,13 @@ (set_local $4 (get_local $1) ) - (br $while-out$6) + (br $while-out$23) ) ) ) (set_local $10 (i32.lt_u - (set_local $8 + (tee_local $8 (i32.sub (i32.and (i32.load offset=4 @@ -819,12 +819,12 @@ (get_local $10) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $4) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -835,7 +835,7 @@ (if (i32.ge_u (get_local $4) - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (get_local $0) @@ -849,10 +849,10 @@ (get_local $4) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $9 + (tee_local $9 (i32.load offset=12 (get_local $4) ) @@ -861,9 +861,9 @@ ) (block (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $4) (i32.const 20) @@ -881,9 +881,9 @@ ) (if (i32.eqz - (set_local $8 + (tee_local $8 (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $4) (i32.const 16) @@ -896,15 +896,15 @@ (set_local $18 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $8) (i32.const 20) @@ -919,13 +919,13 @@ (set_local $10 (get_local $16) ) - (br $while-in$11) + (br $while-in$28) ) ) (if - (set_local $19 + (tee_local $19 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $8) (i32.const 16) @@ -941,9 +941,9 @@ (get_local $16) ) ) - (br $while-out$10) + (br $while-out$27) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -965,7 +965,7 @@ (block (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.load offset=8 (get_local $4) ) @@ -977,7 +977,7 @@ (if (i32.ne (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $16) (i32.const 12) @@ -991,7 +991,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $9) (i32.const 8) @@ -1018,7 +1018,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $2) (block @@ -1026,11 +1026,11 @@ (i32.eq (get_local $4) (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.const 480) (i32.shl - (set_local $9 + (tee_local $9 (i32.load offset=28 (get_local $4) ) @@ -1066,7 +1066,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1083,7 +1083,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 16) @@ -1101,7 +1101,7 @@ (get_local $18) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eqz (get_local $18) ) @@ -1111,7 +1111,7 @@ (if (i32.lt_u (get_local $18) - (set_local $9 + (tee_local $9 (i32.load (i32.const 192) ) @@ -1124,7 +1124,7 @@ (get_local $2) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $4) ) @@ -1148,7 +1148,7 @@ ) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=20 (get_local $4) ) @@ -1185,7 +1185,7 @@ (i32.store offset=4 (get_local $4) (i32.or - (set_local $2 + (tee_local $2 (i32.add (get_local $7) (get_local $0) @@ -1195,7 +1195,7 @@ ) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $4) @@ -1235,7 +1235,7 @@ (get_local $7) ) (if - (set_local $1 + (tee_local $1 (i32.load (i32.const 184) ) @@ -1251,7 +1251,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $9 + (tee_local $9 (i32.shr_u (get_local $1) (i32.const 3) @@ -1265,12 +1265,12 @@ ) (if (i32.and - (set_local $16 + (tee_local $16 (i32.load (i32.const 176) ) ) - (set_local $10 + (tee_local $10 (i32.shl (i32.const 1) (get_local $9) @@ -1279,9 +1279,9 @@ ) (if (i32.lt_u - (set_local $19 + (tee_local $19 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $1) (i32.const 8) @@ -1357,10 +1357,8 @@ ) ) ) - (get_local $0) ) ) - (get_local $0) ) ) (if @@ -1371,7 +1369,7 @@ (block (set_local $2 (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 11) @@ -1381,7 +1379,7 @@ ) ) (if - (set_local $10 + (tee_local $10 (i32.load (i32.const 180) ) @@ -1395,12 +1393,12 @@ ) (block $label$break$L123 (if - (set_local $7 + (tee_local $7 (i32.load offset=480 (i32.shl - (set_local $0 + (tee_local $0 (if - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $1) (i32.const 8) @@ -1417,20 +1415,20 @@ (i32.shr_u (get_local $2) (i32.add - (set_local $7 + (tee_local $7 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u (i32.add - (set_local $9 + (tee_local $9 (i32.shl (get_local $19) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add @@ -1453,11 +1451,11 @@ ) (get_local $1) ) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u (i32.add - (set_local $8 + (tee_local $8 (i32.shl (get_local $9) (get_local $19) @@ -1531,12 +1529,12 @@ (set_local $4 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.sub - (set_local $18 + (tee_local $18 (i32.and (i32.load offset=4 (get_local $19) @@ -1582,7 +1580,7 @@ (set_local $18 (select (get_local $8) - (set_local $5 + (tee_local $5 (i32.load offset=20 (get_local $19) ) @@ -1594,7 +1592,7 @@ ) (i32.eq (get_local $5) - (set_local $19 + (tee_local $19 (i32.load (i32.add (i32.add @@ -1616,7 +1614,7 @@ ) ) (if - (set_local $5 + (tee_local $5 (i32.eq (get_local $19) (i32.const 0) @@ -1635,7 +1633,7 @@ (set_local $9 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $8 @@ -1655,7 +1653,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) (block @@ -1680,7 +1678,7 @@ (i32.const 86) ) (if - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -1695,11 +1693,11 @@ (block (if (i32.eqz - (set_local $16 + (tee_local $16 (i32.and (get_local $10) (i32.or - (set_local $7 + (tee_local $7 (i32.shl (i32.const 2) (get_local $0) @@ -1723,7 +1721,7 @@ (set_local $16 (i32.and (i32.shr_u - (set_local $7 + (tee_local $7 (i32.add (i32.and (get_local $16) @@ -1747,10 +1745,10 @@ (i32.or (i32.or (i32.or - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $7) (get_local $16) @@ -1763,10 +1761,10 @@ ) (get_local $16) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $0) (get_local $7) @@ -1778,10 +1776,10 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $4 + (tee_local $4 (i32.shr_u (get_local $5) (get_local $0) @@ -1793,10 +1791,10 @@ ) ) ) - (set_local $4 + (tee_local $4 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $4) (get_local $5) @@ -1849,13 +1847,13 @@ (get_local $9) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $9 (i32.const 0) ) (set_local $1 (i32.lt_u - (set_local $4 + (tee_local $4 (i32.sub (i32.and (i32.load offset=4 @@ -1884,7 +1882,7 @@ ) ) (if - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $25) ) @@ -1899,11 +1897,11 @@ (set_local $29 (get_local $4) ) - (br $while-in$20) + (br $while-in$6) ) ) (if - (set_local $25 + (tee_local $25 (i32.load offset=20 (get_local $25) ) @@ -1923,10 +1921,10 @@ (set_local $12 (get_local $4) ) - (br $while-out$19) + (br $while-out$5) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -1950,7 +1948,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 192) ) @@ -1961,7 +1959,7 @@ (if (i32.ge_u (get_local $12) - (set_local $4 + (tee_local $4 (i32.add (get_local $12) (get_local $2) @@ -1975,10 +1973,10 @@ (get_local $12) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $12) ) @@ -1987,9 +1985,9 @@ ) (block (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $12) (i32.const 20) @@ -2007,9 +2005,9 @@ ) (if (i32.eqz - (set_local $8 + (tee_local $8 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $12) (i32.const 16) @@ -2022,15 +2020,15 @@ (set_local $11 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 20) @@ -2045,13 +2043,13 @@ (set_local $7 (get_local $0) ) - (br $while-in$24) + (br $while-in$10) ) ) (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 16) @@ -2067,9 +2065,9 @@ (get_local $0) ) ) - (br $while-out$23) + (br $while-out$9) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2091,7 +2089,7 @@ (block (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $12) ) @@ -2103,7 +2101,7 @@ (if (i32.ne (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $0) (i32.const 12) @@ -2117,7 +2115,7 @@ (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -2144,7 +2142,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $5) (block @@ -2152,11 +2150,11 @@ (i32.eq (get_local $12) (i32.load - (set_local $10 + (tee_local $10 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $12) ) @@ -2192,7 +2190,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2209,7 +2207,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $5) (i32.const 16) @@ -2227,7 +2225,7 @@ (get_local $11) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eqz (get_local $11) ) @@ -2237,7 +2235,7 @@ (if (i32.lt_u (get_local $11) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -2250,7 +2248,7 @@ (get_local $5) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=16 (get_local $12) ) @@ -2274,7 +2272,7 @@ ) ) (if - (set_local $10 + (tee_local $10 (i32.load offset=20 (get_local $12) ) @@ -2302,7 +2300,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.ge_u (get_local $6) @@ -2356,12 +2354,12 @@ ) (if (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $0 + (tee_local $0 (i32.shl (i32.const 1) (get_local $5) @@ -2370,9 +2368,9 @@ ) (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $10) (i32.const 8) @@ -2429,16 +2427,16 @@ (get_local $4) (get_local $10) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $5 (i32.add (i32.const 480) (i32.shl - (set_local $8 + (tee_local $8 (if - (set_local $10 + (tee_local $10 (i32.shr_u (get_local $6) (i32.const 8) @@ -2455,20 +2453,20 @@ (i32.shr_u (get_local $6) (i32.add - (set_local $5 + (tee_local $5 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $10 + (tee_local $10 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $10) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -2491,11 +2489,11 @@ ) (get_local $0) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $1) (get_local $10) @@ -2542,7 +2540,7 @@ (get_local $8) ) (i32.store offset=4 - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (i32.const 16) @@ -2557,12 +2555,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $7 + (tee_local $7 (i32.shl (i32.const 1) (get_local $8) @@ -2594,7 +2592,7 @@ (get_local $4) (get_local $4) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $7 @@ -2621,7 +2619,7 @@ (get_local $5) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -2639,13 +2637,13 @@ (set_local $9 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.add (get_local $1) @@ -2683,10 +2681,10 @@ (set_local $9 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -2728,9 +2726,9 @@ (if (i32.and (i32.ge_u - (set_local $7 + (tee_local $7 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -2738,7 +2736,7 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -2780,7 +2778,7 @@ (i32.store offset=4 (get_local $12) (i32.or - (set_local $7 + (tee_local $7 (i32.add (get_local $6) (get_local $2) @@ -2790,7 +2788,7 @@ ) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $12) @@ -2834,7 +2832,7 @@ ) (if (i32.ge_u - (set_local $12 + (tee_local $12 (i32.load (i32.const 184) ) @@ -2849,7 +2847,7 @@ ) (if (i32.gt_u - (set_local $6 + (tee_local $6 (i32.sub (get_local $12) (get_local $0) @@ -2860,7 +2858,7 @@ (block (i32.store (i32.const 196) - (set_local $21 + (tee_local $21 (i32.add (get_local $15) (get_local $0) @@ -2910,7 +2908,7 @@ ) ) (i32.store - (set_local $6 + (tee_local $6 (i32.add (i32.add (get_local $15) @@ -2938,7 +2936,7 @@ ) (if (i32.gt_u - (set_local $15 + (tee_local $15 (i32.load (i32.const 188) ) @@ -2948,7 +2946,7 @@ (block (i32.store (i32.const 188) - (set_local $6 + (tee_local $6 (i32.sub (get_local $15) (get_local $0) @@ -2957,9 +2955,9 @@ ) (i32.store (i32.const 200) - (set_local $12 + (tee_local $12 (i32.add - (set_local $15 + (tee_local $15 (i32.load (i32.const 200) ) @@ -2999,7 +2997,7 @@ (if (i32.and (i32.add - (set_local $15 + (tee_local $15 (call_import $_sysconf (i32.const 30) ) @@ -3057,16 +3055,16 @@ ) (if (i32.le_u - (set_local $6 + (tee_local $6 (i32.and - (set_local $21 + (tee_local $21 (i32.add - (set_local $6 + (tee_local $6 (i32.load (i32.const 656) ) ) - (set_local $12 + (tee_local $12 (i32.add (get_local $0) (i32.const 47) @@ -3074,7 +3072,7 @@ ) ) ) - (set_local $23 + (tee_local $23 (i32.sub (i32.const 0) (get_local $6) @@ -3091,7 +3089,7 @@ (if (if (i32.ne - (set_local $8 + (tee_local $8 (i32.load (i32.const 616) ) @@ -3100,9 +3098,9 @@ ) (i32.or (i32.le_u - (set_local $14 + (tee_local $14 (i32.add - (set_local $26 + (tee_local $26 (i32.load (i32.const 608) ) @@ -3133,7 +3131,7 @@ ) (i32.const 0) (i32.eq - (set_local $9 + (tee_local $9 (block $label$break$L257 (if (i32.and @@ -3146,7 +3144,7 @@ (block (block $label$break$L259 (if - (set_local $8 + (tee_local $8 (i32.load (i32.const 200) ) @@ -3159,7 +3157,7 @@ (if (if (i32.le_u - (set_local $26 + (tee_local $26 (i32.load (get_local $14) ) @@ -3170,7 +3168,7 @@ (i32.add (get_local $26) (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $14) (i32.const 4) @@ -3194,7 +3192,7 @@ ) (if (i32.eqz - (set_local $14 + (tee_local $14 (i32.load offset=8 (get_local $14) ) @@ -3211,7 +3209,7 @@ ) (if (i32.lt_u - (set_local $14 + (tee_local $14 (i32.and (i32.sub (get_local $21) @@ -3226,7 +3224,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (call_import $_sbrk (get_local $14) ) @@ -3284,7 +3282,7 @@ (i32.const 173) ) (i32.ne - (set_local $8 + (tee_local $8 (call_import $_sbrk (i32.const 0) ) @@ -3297,9 +3295,9 @@ (set_local $1 (if (i32.and - (set_local $11 + (tee_local $11 (i32.add - (set_local $14 + (tee_local $14 (i32.load (i32.const 652) ) @@ -3307,7 +3305,7 @@ (i32.const -1) ) ) - (set_local $2 + (tee_local $2 (get_local $8) ) ) @@ -3332,7 +3330,7 @@ ) (set_local $2 (i32.add - (set_local $14 + (tee_local $14 (i32.load (i32.const 608) ) @@ -3361,7 +3359,7 @@ ) (i32.gt_u (get_local $2) - (set_local $11 + (tee_local $11 (i32.load (i32.const 616) ) @@ -3377,7 +3375,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (call_import $_sbrk (get_local $1) ) @@ -3444,14 +3442,14 @@ ) ) (i32.lt_u - (set_local $2 + (tee_local $2 (i32.and (i32.add (i32.sub (get_local $12) (get_local $17) ) - (set_local $8 + (tee_local $8 (i32.load (i32.const 656) ) @@ -3475,8 +3473,10 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $11) + (drop + (call_import $_sbrk + (get_local $11) + ) ) (br $label$break$L279) ) @@ -3530,12 +3530,12 @@ ) (i32.and (i32.lt_u - (set_local $3 + (tee_local $3 (call_import $_sbrk (get_local $6) ) ) - (set_local $6 + (tee_local $6 (call_import $_sbrk (i32.const 0) ) @@ -3555,7 +3555,7 @@ (i32.const 0) ) (i32.gt_u - (set_local $13 + (tee_local $13 (i32.sub (get_local $6) (get_local $3) @@ -3588,7 +3588,7 @@ (block (i32.store (i32.const 608) - (set_local $13 + (tee_local $13 (i32.add (i32.load (i32.const 608) @@ -3611,7 +3611,7 @@ ) (block $do-once$44 (if - (set_local $13 + (tee_local $13 (i32.load (i32.const 200) ) @@ -3620,19 +3620,19 @@ (set_local $3 (i32.const 624) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$48 $do-in$49 (if (i32.eq (get_local $20) (i32.add - (set_local $6 + (tee_local $6 (i32.load (get_local $3) ) ) - (set_local $12 + (tee_local $12 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $3) (i32.const 4) @@ -3658,12 +3658,12 @@ (set_local $9 (i32.const 203) ) - (br $do-out$46) + (br $do-out$48) ) ) - (br_if $do-in$47 + (br_if $do-in$49 (i32.ne - (set_local $3 + (tee_local $3 (i32.load offset=8 (get_local $3) ) @@ -3713,13 +3713,13 @@ (set_local $3 (i32.add (get_local $13) - (set_local $12 + (tee_local $12 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $13) (i32.const 8) @@ -3785,7 +3785,7 @@ (if (i32.lt_u (get_local $20) - (set_local $17 + (tee_local $17 (i32.load (i32.const 192) ) @@ -3810,7 +3810,7 @@ (set_local $3 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$50 $while-in$51 (if (i32.eq (i32.load @@ -3828,12 +3828,12 @@ (set_local $9 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (if (i32.eqz - (set_local $3 + (tee_local $3 (i32.load offset=8 (get_local $3) ) @@ -3843,10 +3843,10 @@ (set_local $28 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) (if (i32.eq @@ -3869,7 +3869,7 @@ (get_local $20) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $41) (i32.const 4) @@ -3890,7 +3890,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $20) (i32.const 8) @@ -3917,7 +3917,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.add (get_local $17) (i32.const 8) @@ -3958,7 +3958,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.ne (get_local $6) @@ -3975,7 +3975,7 @@ (block (i32.store (i32.const 184) - (set_local $1 + (tee_local $1 (i32.add (i32.load (i32.const 184) @@ -4002,16 +4002,16 @@ ) (get_local $1) ) - (br $do-once$50) + (br $do-once$52) ) ) (i32.store - (set_local $5 + (tee_local $5 (i32.add (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $6) ) @@ -4045,10 +4045,10 @@ (get_local $6) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq - (set_local $21 + (tee_local $21 (i32.load offset=12 (get_local $6) ) @@ -4057,11 +4057,11 @@ ) (block (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add - (set_local $11 + (tee_local $11 (i32.add (get_local $6) (i32.const 16) @@ -4082,7 +4082,7 @@ ) (if (i32.eqz - (set_local $14 + (tee_local $14 (i32.load (get_local $11) ) @@ -4092,15 +4092,15 @@ (set_local $24 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) ) ) - (loop $while-out$55 $while-in$56 + (loop $while-out$61 $while-in$62 (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $14) (i32.const 20) @@ -4115,13 +4115,13 @@ (set_local $11 (get_local $2) ) - (br $while-in$56) + (br $while-in$62) ) ) (if - (set_local $8 + (tee_local $8 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $14) (i32.const 16) @@ -4137,9 +4137,9 @@ (get_local $2) ) ) - (br $while-out$55) + (br $while-out$61) ) - (br $while-in$56) + (br $while-in$62) ) (if (i32.lt_u @@ -4161,7 +4161,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $6) ) @@ -4173,7 +4173,7 @@ (if (i32.ne (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 12) @@ -4187,7 +4187,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $21) (i32.const 8) @@ -4219,16 +4219,16 @@ (get_local $23) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.ne (get_local $6) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $21 + (tee_local $21 (i32.load offset=28 (get_local $6) ) @@ -4252,7 +4252,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $23) (i32.const 16) @@ -4281,7 +4281,7 @@ (get_local $2) (get_local $24) ) - (br_if $do-once$57 + (br_if $do-once$63 (get_local $24) ) (i32.store @@ -4306,7 +4306,7 @@ (if (i32.lt_u (get_local $24) - (set_local $21 + (tee_local $21 (i32.load (i32.const 192) ) @@ -4319,9 +4319,9 @@ (get_local $23) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $6) (i32.const 16) @@ -4349,7 +4349,7 @@ ) (br_if $label$break$L331 (i32.eqz - (set_local $11 + (tee_local $11 (i32.load offset=4 (get_local $2) ) @@ -4382,15 +4382,15 @@ (get_local $6) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne - (set_local $11 + (tee_local $11 (i32.load offset=8 (get_local $6) ) ) - (set_local $23 + (tee_local $23 (i32.add (i32.const 216) (i32.shl @@ -4411,7 +4411,7 @@ ) (call_import $_abort) ) - (br_if $do-once$61 + (br_if $do-once$55 (i32.eq (i32.load offset=12 (get_local $11) @@ -4447,7 +4447,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $21) @@ -4470,7 +4470,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $21) (i32.const 8) @@ -4483,7 +4483,7 @@ (set_local $42 (get_local $2) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -4562,15 +4562,15 @@ ) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.and - (set_local $23 + (tee_local $23 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $5) @@ -4580,9 +4580,9 @@ (block (if (i32.ge_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 8) @@ -4601,7 +4601,7 @@ (set_local $35 (get_local $8) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -4642,24 +4642,24 @@ (get_local $3) (get_local $1) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 - (block $do-once$67 + (tee_local $0 + (block $do-once$69 (if - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $15) (i32.const 8) ) ) (block - (br_if $do-once$67 + (br_if $do-once$69 (i32.const 31) (i32.gt_u (get_local $15) @@ -4671,20 +4671,20 @@ (i32.shr_u (get_local $15) (i32.add - (set_local $14 + (tee_local $14 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $8 + (tee_local $8 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $2) - (set_local $23 + (tee_local $23 (i32.and (i32.shr_u (i32.add @@ -4707,11 +4707,11 @@ ) (get_local $23) ) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $5 (i32.shl (get_local $7) (get_local $8) @@ -4759,7 +4759,7 @@ (get_local $0) ) (i32.store offset=4 - (set_local $1 + (tee_local $1 (i32.add (get_local $3) (i32.const 16) @@ -4774,12 +4774,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $14 + (tee_local $14 (i32.shl (i32.const 1) (get_local $0) @@ -4811,7 +4811,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $14 @@ -4838,7 +4838,7 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$71 $while-in$72 (if (i32.eq (i32.and @@ -4856,13 +4856,13 @@ (set_local $9 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $1) @@ -4900,10 +4900,10 @@ (set_local $9 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) ) - (br $while-in$70) + (br $while-in$72) ) (if (i32.eq @@ -4945,9 +4945,9 @@ (if (i32.and (i32.ge_u - (set_local $14 + (tee_local $14 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $36) (i32.const 8) @@ -4955,7 +4955,7 @@ ) ) ) - (set_local $7 + (tee_local $7 (i32.load (i32.const 192) ) @@ -4996,7 +4996,7 @@ (block (i32.store (i32.const 188) - (set_local $14 + (tee_local $14 (i32.add (i32.load (i32.const 188) @@ -5028,11 +5028,11 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$73 $while-in$74 (if (if (i32.le_u - (set_local $3 + (tee_local $3 (i32.load (get_local $28) ) @@ -5040,7 +5040,7 @@ (get_local $13) ) (i32.gt_u - (set_local $15 + (tee_local $15 (i32.add (get_local $3) (i32.load offset=4 @@ -5056,7 +5056,7 @@ (set_local $5 (get_local $15) ) - (br $while-out$71) + (br $while-out$73) ) ) (set_local $28 @@ -5064,11 +5064,11 @@ (get_local $28) ) ) - (br $while-in$72) + (br $while-in$74) ) (set_local $15 (i32.add - (set_local $12 + (tee_local $12 (i32.add (get_local $5) (i32.const -47) @@ -5079,10 +5079,10 @@ ) (set_local $3 (i32.add - (set_local $12 + (tee_local $12 (select (get_local $13) - (set_local $3 + (tee_local $3 (i32.add (get_local $12) (select @@ -5106,7 +5106,7 @@ ) (i32.lt_u (get_local $3) - (set_local $15 + (tee_local $15 (i32.add (get_local $13) (i32.const 16) @@ -5120,16 +5120,16 @@ ) (i32.store (i32.const 200) - (set_local $6 + (tee_local $6 (i32.add (get_local $20) - (set_local $17 + (tee_local $17 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $6 + (tee_local $6 (i32.add (get_local $20) (i32.const 8) @@ -5152,7 +5152,7 @@ ) (i32.store (i32.const 188) - (set_local $14 + (tee_local $14 (i32.sub (i32.add (get_local $22) @@ -5183,7 +5183,7 @@ ) ) (i32.store - (set_local $14 + (tee_local $14 (i32.add (get_local $12) (i32.const 4) @@ -5237,9 +5237,9 @@ (i32.const 24) ) ) - (loop $do-in$74 + (loop $do-in$76 (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (i32.const 4) @@ -5247,7 +5247,7 @@ ) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$76 (i32.lt_u (i32.add (get_local $3) @@ -5275,7 +5275,7 @@ (i32.store offset=4 (get_local $13) (i32.or - (set_local $3 + (tee_local $3 (i32.sub (get_local $12) (get_local $13) @@ -5314,12 +5314,12 @@ ) (if (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $7 + (tee_local $7 (i32.shl (i32.const 1) (get_local $6) @@ -5328,9 +5328,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $17) (i32.const 8) @@ -5394,9 +5394,9 @@ (i32.add (i32.const 480) (i32.shl - (set_local $5 + (tee_local $5 (if - (set_local $17 + (tee_local $17 (i32.shr_u (get_local $3) (i32.const 8) @@ -5413,20 +5413,20 @@ (i32.shr_u (get_local $3) (i32.add - (set_local $6 + (tee_local $6 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $17) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add @@ -5449,11 +5449,11 @@ ) (get_local $7) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $1) (get_local $17) @@ -5510,12 +5510,12 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $5) @@ -5574,7 +5574,7 @@ (get_local $6) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$77 $while-in$78 (if (i32.eq (i32.and @@ -5592,13 +5592,13 @@ (set_local $9 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.add (get_local $1) @@ -5636,10 +5636,10 @@ (set_local $9 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) ) - (br $while-in$76) + (br $while-in$78) ) (if (i32.eq @@ -5681,9 +5681,9 @@ (if (i32.and (i32.ge_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $38) (i32.const 8) @@ -5691,7 +5691,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 192) ) @@ -5735,7 +5735,7 @@ (if (i32.or (i32.eq - (set_local $2 + (tee_local $2 (i32.load (i32.const 192) ) @@ -5777,9 +5777,9 @@ (set_local $2 (i32.const 0) ) - (loop $do-in$78 + (loop $do-in$47 (i32.store offset=12 - (set_local $1 + (tee_local $1 (i32.add (i32.const 216) (i32.shl @@ -5797,9 +5797,9 @@ (get_local $1) (get_local $1) ) - (br_if $do-in$78 + (br_if $do-in$47 (i32.ne - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const 1) @@ -5811,16 +5811,16 @@ ) (i32.store (i32.const 200) - (set_local $2 + (tee_local $2 (i32.add (get_local $20) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $2 + (tee_local $2 (i32.add (get_local $20) (i32.const 8) @@ -5843,7 +5843,7 @@ ) (i32.store (i32.const 188) - (set_local $3 + (tee_local $3 (i32.sub (i32.add (get_local $22) @@ -5878,7 +5878,7 @@ ) (if (i32.gt_u - (set_local $22 + (tee_local $22 (i32.load (i32.const 188) ) @@ -5888,7 +5888,7 @@ (block (i32.store (i32.const 188) - (set_local $20 + (tee_local $20 (i32.sub (get_local $22) (get_local $0) @@ -5897,9 +5897,9 @@ ) (i32.store (i32.const 200) - (set_local $13 + (tee_local $13 (i32.add - (set_local $22 + (tee_local $22 (i32.load (i32.const 200) ) @@ -5966,13 +5966,13 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $14 + (tee_local $14 (i32.load (i32.const 192) ) @@ -5982,9 +5982,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.add (get_local $0) @@ -6002,7 +6002,7 @@ (set_local $8 (i32.add (get_local $1) - (set_local $3 + (tee_local $3 (i32.and (get_local $9) (i32.const -8) @@ -6044,7 +6044,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.sub @@ -6068,9 +6068,9 @@ (if (i32.ne (i32.and - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $8) (i32.const 4) @@ -6139,12 +6139,12 @@ ) (if (i32.ne - (set_local $9 + (tee_local $9 (i32.load offset=8 (get_local $0) ) ) - (set_local $6 + (tee_local $6 (i32.add (i32.const 216) (i32.shl @@ -6222,7 +6222,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 8) @@ -6269,7 +6269,7 @@ (block $do-once$2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $0) ) @@ -6278,11 +6278,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 16) @@ -6303,7 +6303,7 @@ ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load (get_local $6) ) @@ -6319,9 +6319,9 @@ ) (loop $while-out$4 $while-in$5 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 20) @@ -6340,9 +6340,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $1) (i32.const 16) @@ -6390,7 +6390,7 @@ (block (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load offset=8 (get_local $0) ) @@ -6402,7 +6402,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $5) (i32.const 12) @@ -6416,7 +6416,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 8) @@ -6450,11 +6450,11 @@ (i32.eq (get_local $0) (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $0) ) @@ -6513,7 +6513,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 16) @@ -6550,7 +6550,7 @@ (if (i32.lt_u (get_local $4) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -6563,9 +6563,9 @@ (get_local $9) ) (if - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 16) @@ -6592,7 +6592,7 @@ ) ) (if - (set_local $6 + (tee_local $6 (i32.load offset=4 (get_local $5) ) @@ -6654,9 +6654,9 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $8) (i32.const 4) @@ -6711,7 +6711,7 @@ (block (i32.store (i32.const 188) - (set_local $4 + (tee_local $4 (i32.add (i32.load (i32.const 188) @@ -6761,7 +6761,7 @@ (block (i32.store (i32.const 184) - (set_local $4 + (tee_local $4 (i32.add (i32.load (i32.const 184) @@ -6821,7 +6821,7 @@ (block $do-once$10 (if (i32.eq - (set_local $10 + (tee_local $10 (i32.load offset=12 (get_local $8) ) @@ -6830,11 +6830,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $6 + (tee_local $6 (i32.add (get_local $8) (i32.const 16) @@ -6855,7 +6855,7 @@ ) (if (i32.eqz - (set_local $0 + (tee_local $0 (i32.load (get_local $6) ) @@ -6871,9 +6871,9 @@ ) (loop $while-out$12 $while-in$13 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -6892,9 +6892,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -6936,7 +6936,7 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $8) ) @@ -6950,7 +6950,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $1) (i32.const 12) @@ -6964,7 +6964,7 @@ (if (i32.eq (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $10) (i32.const 8) @@ -6998,11 +6998,11 @@ (i32.eq (get_local $8) (i32.load - (set_local $3 + (tee_local $3 (i32.add (i32.const 480) (i32.shl - (set_local $10 + (tee_local $10 (i32.load offset=28 (get_local $8) ) @@ -7055,7 +7055,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $5) (i32.const 16) @@ -7083,7 +7083,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 192) ) @@ -7096,9 +7096,9 @@ (get_local $5) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $8) (i32.const 16) @@ -7125,7 +7125,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $3) ) @@ -7161,12 +7161,12 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $8) ) ) - (set_local $5 + (tee_local $5 (i32.add (i32.const 216) (i32.shl @@ -7242,7 +7242,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $10) (i32.const 8) @@ -7335,12 +7335,12 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.load (i32.const 176) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $7) @@ -7349,9 +7349,9 @@ ) (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -7415,9 +7415,9 @@ (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (if - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $0) (i32.const 8) @@ -7434,20 +7434,20 @@ (i32.shr_u (get_local $0) (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $15 + (tee_local $15 (i32.shl (get_local $1) - (set_local $13 + (tee_local $13 (i32.and (i32.shr_u (i32.add @@ -7470,11 +7470,11 @@ ) (get_local $13) ) - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $15) (get_local $1) @@ -7530,12 +7530,12 @@ ) (if (i32.and - (set_local $15 + (tee_local $15 (i32.load (i32.const 180) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $1) @@ -7589,9 +7589,9 @@ ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $16 + (tee_local $16 (i32.add (i32.add (get_local $1) @@ -7674,9 +7674,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $17) (i32.const 8) @@ -7684,7 +7684,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 192) ) @@ -7750,7 +7750,7 @@ ) (i32.store (i32.const 208) - (set_local $2 + (tee_local $2 (i32.add (i32.load (i32.const 208) @@ -7768,7 +7768,7 @@ ) (loop $while-out$20 $while-in$21 (if - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -7829,15 +7829,15 @@ (get_local $11) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $11) (i32.const 32) ) ) - (set_local $8 + (tee_local $8 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $0) (i32.const 28) @@ -7848,10 +7848,10 @@ ) (i32.store offset=4 (get_local $3) - (set_local $10 + (tee_local $10 (i32.sub (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 20) @@ -7898,7 +7898,7 @@ (if (i32.eq (get_local $5) - (set_local $6 + (tee_local $6 (if (i32.load (i32.const 8) @@ -7995,7 +7995,7 @@ (if (i32.le_u (get_local $6) - (set_local $5 + (tee_local $5 (i32.load offset=4 (get_local $4) ) @@ -8037,7 +8037,7 @@ (block (i32.store (get_local $9) - (set_local $7 + (tee_local $7 (i32.load (get_local $8) ) @@ -8107,7 +8107,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $5 + (tee_local $5 (i32.load (get_local $8) ) @@ -8119,7 +8119,7 @@ ) (i32.store (get_local $9) - (set_local $8 + (tee_local $8 (get_local $5) ) ) @@ -8189,9 +8189,9 @@ (local $6 i32) (local $7 i32) (if - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $2) (i32.const 16) @@ -8234,9 +8234,9 @@ ) (block (set_local $6 - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -8308,7 +8308,7 @@ (i32.load8_s (i32.add (get_local $0) - (set_local $7 + (tee_local $7 (i32.add (get_local $3) (i32.const -1) @@ -8381,10 +8381,12 @@ ) ) ) - (call $_memcpy - (get_local $6) - (get_local $2) - (get_local $0) + (drop + (call $_memcpy + (get_local $6) + (get_local $2) + (get_local $0) + ) ) (i32.store (get_local $5) @@ -8468,7 +8470,7 @@ (i32.const 36) ) (if - (set_local $2 + (tee_local $2 (i32.load (i32.const 32) ) @@ -8521,12 +8523,13 @@ ) ) (if - (set_local $1 - (i32.load offset=56 - (get_local $1) + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - (get_local $2) (block (set_local $0 (get_local $2) @@ -8537,7 +8540,6 @@ (br $while-in$3) ) ) - (get_local $0) ) (call_import $___unlock (i32.const 36) @@ -8556,7 +8558,7 @@ (block $label$break$L1 (if (i32.and - (set_local $3 + (tee_local $3 (get_local $0) ) (i32.const 3) @@ -8580,18 +8582,19 @@ ) ) (if - (i32.and - (set_local $4 - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -8629,7 +8632,7 @@ (i32.and (i32.xor (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $1) ) @@ -8671,7 +8674,7 @@ (loop $while-out$5 $while-in$6 (if (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 1) @@ -8686,7 +8689,6 @@ (br $while-in$6) ) ) - (get_local $1) ) (set_local $5 (get_local $1) @@ -8723,10 +8725,10 @@ ) ) (i32.store8 - (set_local $6 + (tee_local $6 (get_local $5) ) - (set_local $9 + (tee_local $9 (i32.and (get_local $1) (i32.const 255) @@ -8734,9 +8736,9 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 16) @@ -8781,9 +8783,9 @@ (if (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8794,7 +8796,7 @@ (get_local $7) ) (i32.ne - (set_local $10 + (tee_local $10 (i32.and (get_local $1) (i32.const 255) @@ -8869,7 +8871,7 @@ (if (i32.gt_u (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -8877,7 +8879,7 @@ ) ) (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 28) @@ -8886,19 +8888,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (i32.eq (i32.load @@ -8913,9 +8917,9 @@ (block (if (i32.lt_u - (set_local $4 + (tee_local $4 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 4) @@ -8923,9 +8927,9 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 8) @@ -9143,7 +9147,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -9172,7 +9176,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -9263,7 +9267,7 @@ (if (i32.gt_s (i32.load offset=76 - (set_local $1 + (tee_local $1 (i32.load (i32.const 52) ) @@ -9298,9 +9302,9 @@ (i32.const 10) ) (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 20) @@ -9374,7 +9378,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -9391,7 +9395,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -9436,7 +9440,7 @@ (local $2 i32) (set_local $2 (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 74) @@ -9456,7 +9460,7 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -9484,7 +9488,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -9518,7 +9522,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.gt_s (i32.load offset=76 @@ -9734,7 +9738,7 @@ ) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -9977,8 +9981,10 @@ ) ) (func $_main (result i32) - (call $_puts - (i32.const 672) + (drop + (call $_puts + (i32.const 672) + ) ) (i32.const 0) ) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 494915489..df7888820 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -227,7 +227,7 @@ (get_local $i10) ) ) - (block $do-once$2 + (block $do-once$19 (if (i32.ne (get_local $i7) @@ -265,7 +265,7 @@ (get_local $i8) (get_local $i11) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $_abort) ) @@ -498,7 +498,7 @@ (get_local $i12) ) ) - (block $do-once$4 + (block $do-once$21 (if (i32.ne (get_local $i15) @@ -541,7 +541,7 @@ (i32.const 184) ) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $_abort) ) @@ -880,7 +880,7 @@ (set_local $i7 (get_local $i10) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $i10 (i32.load (i32.add @@ -913,7 +913,7 @@ (set_local $i22 (get_local $i7) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $i23 (get_local $i15) @@ -961,7 +961,7 @@ (get_local $i7) ) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $i7 (i32.load @@ -1004,7 +1004,7 @@ ) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq (get_local $i12) @@ -1046,7 +1046,7 @@ (set_local $i24 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $i25 @@ -1067,7 +1067,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $i14 (i32.add (get_local $i25) @@ -1088,7 +1088,7 @@ (set_local $i26 (get_local $i14) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $i14 @@ -1113,7 +1113,7 @@ (set_local $i28 (get_local $i26) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $i25 @@ -1124,7 +1124,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -1140,7 +1140,7 @@ (set_local $i24 (get_local $i27) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -1200,14 +1200,14 @@ (set_local $i24 (get_local $i12) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $_abort) ) ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $i5) (block @@ -1260,7 +1260,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1303,7 +1303,7 @@ (i32.eqz (get_local $i24) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1334,7 +1334,7 @@ ) ) ) - (block $do-once$14 + (block $do-once$31 (if (get_local $i7) (if @@ -1358,7 +1358,7 @@ ) (get_local $i24) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -1396,7 +1396,7 @@ ) (get_local $i24) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1829,7 +1829,7 @@ (set_local $i8 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $i16 (i32.and (i32.load @@ -1952,7 +1952,7 @@ (set_local $i36 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $i12 @@ -1978,7 +1978,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -2179,7 +2179,7 @@ (get_local $i36) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $i36 (i32.const 0) ) @@ -2240,7 +2240,7 @@ (set_local $i36 (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $i38 @@ -2262,7 +2262,7 @@ (set_local $i44 (get_local $i8) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $i37 @@ -2276,7 +2276,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2338,7 +2338,7 @@ ) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq (get_local $i7) @@ -2380,7 +2380,7 @@ (set_local $i45 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $i46 @@ -2401,7 +2401,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $i2 (i32.add (get_local $i46) @@ -2422,7 +2422,7 @@ (set_local $i47 (get_local $i2) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $i2 @@ -2447,7 +2447,7 @@ (set_local $i49 (get_local $i47) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $i46 @@ -2458,7 +2458,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2474,7 +2474,7 @@ (set_local $i45 (get_local $i48) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -2534,14 +2534,14 @@ (set_local $i45 (get_local $i7) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $_abort) ) ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $i3) (block @@ -2594,7 +2594,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2637,7 +2637,7 @@ (i32.eqz (get_local $i45) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2668,7 +2668,7 @@ ) ) ) - (block $do-once$27 + (block $do-once$13 (if (get_local $i15) (if @@ -2692,7 +2692,7 @@ ) (get_local $i45) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -2730,14 +2730,14 @@ ) (get_local $i45) ) - (br $do-once$25) + (br $do-once$11) ) ) ) ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.ge_u (get_local $i43) @@ -2885,7 +2885,7 @@ ) (get_local $i15) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $i15 @@ -3082,7 +3082,7 @@ ) (get_local $i8) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $i4 @@ -3109,7 +3109,7 @@ (get_local $i3) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -3130,7 +3130,7 @@ (set_local $i36 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $i3 @@ -3167,7 +3167,7 @@ (set_local $i36 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $i4 @@ -3181,7 +3181,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -3222,7 +3222,7 @@ ) (get_local $i8) ) - (br $do-once$29) + (br $do-once$15) ) ) (if @@ -3291,7 +3291,7 @@ ) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $_abort) ) @@ -4091,8 +4091,10 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $i45) + (drop + (call_import $_sbrk + (get_local $i45) + ) ) (br $label$break$L279) ) @@ -4267,7 +4269,7 @@ (set_local $i63 (i32.const 624) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$48 $do-in$49 (set_local $i43 (i32.load (get_local $i63) @@ -4308,7 +4310,7 @@ (set_local $i36 (i32.const 203) ) - (br $do-out$46) + (br $do-out$48) ) ) (set_local $i63 @@ -4319,7 +4321,7 @@ ) ) ) - (br_if $do-in$47 + (br_if $do-in$49 (i32.ne (get_local $i63) (i32.const 0) @@ -4478,7 +4480,7 @@ (set_local $i63 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$50 $while-in$51 (if (i32.eq (i32.load @@ -4496,7 +4498,7 @@ (set_local $i36 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (set_local $i63 @@ -4515,10 +4517,10 @@ (set_local $i71 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) (if (i32.eq @@ -4638,7 +4640,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.ne (get_local $i43) @@ -4686,7 +4688,7 @@ ) (get_local $i62) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i62 @@ -4741,7 +4743,7 @@ ) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq (get_local $i55) @@ -4783,7 +4785,7 @@ (set_local $i72 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $i73 @@ -4804,7 +4806,7 @@ ) ) ) - (loop $while-out$55 $while-in$56 + (loop $while-out$61 $while-in$62 (set_local $i5 (i32.add (get_local $i73) @@ -4825,7 +4827,7 @@ (set_local $i74 (get_local $i5) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $i5 @@ -4850,7 +4852,7 @@ (set_local $i76 (get_local $i74) ) - (br $while-out$55) + (br $while-out$61) ) (block (set_local $i73 @@ -4861,7 +4863,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) (if (i32.lt_u @@ -4877,7 +4879,7 @@ (set_local $i72 (get_local $i75) ) - (br $do-once$53) + (br $do-once$59) ) ) ) @@ -4937,7 +4939,7 @@ (set_local $i72 (get_local $i55) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $_abort) ) @@ -4967,7 +4969,7 @@ ) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.ne (get_local $i43) @@ -5024,7 +5026,7 @@ ) (if (get_local $i72) - (br $do-once$57) + (br $do-once$63) ) (i32.store (i32.const 180) @@ -5075,7 +5077,7 @@ (get_local $i5) ) ) - (block $do-once$59 + (block $do-once$65 (if (get_local $i45) (if @@ -5099,7 +5101,7 @@ ) (get_local $i72) ) - (br $do-once$59) + (br $do-once$65) ) ) ) @@ -5174,7 +5176,7 @@ ) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne (get_local $i45) @@ -5198,7 +5200,7 @@ ) (get_local $i43) ) - (br $do-once$61) + (br $do-once$55) ) (call_import $_abort) ) @@ -5228,7 +5230,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $i55) @@ -5265,7 +5267,7 @@ (set_local $i77 (get_local $i5) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -5375,7 +5377,7 @@ (get_local $i56) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eqz (i32.and @@ -5427,7 +5429,7 @@ (set_local $i81 (get_local $i52) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -5459,7 +5461,7 @@ ) (get_local $i62) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i5 @@ -5468,7 +5470,7 @@ (i32.const 8) ) ) - (block $do-once$67 + (block $do-once$69 (if (i32.eqz (get_local $i5) @@ -5486,7 +5488,7 @@ (set_local $i82 (i32.const 31) ) - (br $do-once$67) + (br $do-once$69) ) ) (set_local $i54 @@ -5663,7 +5665,7 @@ ) (get_local $i63) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i50 @@ -5690,7 +5692,7 @@ (get_local $i5) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$71 $while-in$72 (if (i32.eq (i32.and @@ -5711,7 +5713,7 @@ (set_local $i36 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $i5 @@ -5748,7 +5750,7 @@ (set_local $i36 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $i50 @@ -5762,7 +5764,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) (if (i32.eq @@ -5803,7 +5805,7 @@ ) (get_local $i63) ) - (br $do-once$50) + (br $do-once$52) ) ) (if @@ -5872,7 +5874,7 @@ ) (i32.const 0) ) - (br $do-once$50) + (br $do-once$52) ) (call_import $_abort) ) @@ -5925,7 +5927,7 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$73 $while-in$74 (set_local $i63 (i32.load (get_local $i71) @@ -5960,7 +5962,7 @@ (set_local $i86 (get_local $i53) ) - (br $while-out$71) + (br $while-out$73) ) ) (set_local $i71 @@ -5971,7 +5973,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$74) ) (set_local $i44 (i32.add @@ -6168,7 +6170,7 @@ (i32.const 24) ) ) - (loop $do-out$73 $do-in$74 + (loop $do-out$75 $do-in$76 (set_local $i63 (i32.add (get_local $i63) @@ -6179,7 +6181,7 @@ (get_local $i63) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$76 (i32.lt_u (i32.add (get_local $i63) @@ -6556,7 +6558,7 @@ (get_local $i43) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$77 $while-in$78 (if (i32.eq (i32.and @@ -6577,7 +6579,7 @@ (set_local $i36 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $i43 @@ -6614,7 +6616,7 @@ (set_local $i36 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $i5 @@ -6628,7 +6630,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) (if (i32.eq @@ -6795,7 +6797,7 @@ (set_local $i5 (i32.const 0) ) - (loop $do-out$77 $do-in$78 + (loop $do-out$46 $do-in$47 (set_local $i62 (i32.add (i32.const 216) @@ -6828,7 +6830,7 @@ (i32.const 1) ) ) - (br_if $do-in$78 + (br_if $do-in$47 (i32.ne (get_local $i5) (i32.const 32) @@ -9873,10 +9875,12 @@ ) ) ) - (call $_memcpy - (get_local $i12) - (get_local $i11) - (get_local $i10) + (drop + (call $_memcpy + (get_local $i12) + (get_local $i11) + (get_local $i10) + ) ) (i32.store (get_local $i5) @@ -10498,22 +10502,24 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load - (i32.add - (get_local $i1) - (i32.const 36) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load + (i32.add + (get_local $i1) + (i32.const 36) + ) ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $i1) + (i32.const 0) + (i32.const 0) ) - (get_local $i1) - (i32.const 0) - (i32.const 0) ) (i32.eq (i32.load @@ -11873,8 +11879,10 @@ ) ) (func $_main (result i32) - (call $_puts - (i32.const 672) + (drop + (call $_puts + (i32.const 672) + ) ) (return (i32.const 0) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index e75c5e4b2..2c1f718ff 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -228,7 +228,7 @@ (get_local $i10) ) ) - (block $do-once$2 + (block $do-once$19 (if (i32.ne (get_local $i7) @@ -266,7 +266,7 @@ (get_local $i8) (get_local $i11) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $_abort) ) @@ -499,7 +499,7 @@ (get_local $i12) ) ) - (block $do-once$4 + (block $do-once$21 (if (i32.ne (get_local $i15) @@ -542,7 +542,7 @@ (i32.const 184) ) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $_abort) ) @@ -881,7 +881,7 @@ (set_local $i7 (get_local $i10) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $i10 (i32.load (i32.add @@ -914,7 +914,7 @@ (set_local $i22 (get_local $i7) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $i23 (get_local $i15) @@ -962,7 +962,7 @@ (get_local $i7) ) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $i7 (i32.load @@ -1005,7 +1005,7 @@ ) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq (get_local $i12) @@ -1047,7 +1047,7 @@ (set_local $i24 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $i25 @@ -1068,7 +1068,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $i14 (i32.add (get_local $i25) @@ -1089,7 +1089,7 @@ (set_local $i26 (get_local $i14) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $i14 @@ -1114,7 +1114,7 @@ (set_local $i28 (get_local $i26) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $i25 @@ -1125,7 +1125,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -1141,7 +1141,7 @@ (set_local $i24 (get_local $i27) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -1201,14 +1201,14 @@ (set_local $i24 (get_local $i12) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $_abort) ) ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $i5) (block @@ -1261,7 +1261,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1304,7 +1304,7 @@ (i32.eqz (get_local $i24) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1335,7 +1335,7 @@ ) ) ) - (block $do-once$14 + (block $do-once$31 (if (get_local $i7) (if @@ -1359,7 +1359,7 @@ ) (get_local $i24) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -1397,7 +1397,7 @@ ) (get_local $i24) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1830,7 +1830,7 @@ (set_local $i8 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $i16 (i32.and (i32.load @@ -1953,7 +1953,7 @@ (set_local $i36 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $i12 @@ -1979,7 +1979,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -2180,7 +2180,7 @@ (get_local $i36) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $i36 (i32.const 0) ) @@ -2241,7 +2241,7 @@ (set_local $i36 (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $i38 @@ -2263,7 +2263,7 @@ (set_local $i44 (get_local $i8) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $i37 @@ -2277,7 +2277,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2339,7 +2339,7 @@ ) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq (get_local $i7) @@ -2381,7 +2381,7 @@ (set_local $i45 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $i46 @@ -2402,7 +2402,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $i2 (i32.add (get_local $i46) @@ -2423,7 +2423,7 @@ (set_local $i47 (get_local $i2) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $i2 @@ -2448,7 +2448,7 @@ (set_local $i49 (get_local $i47) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $i46 @@ -2459,7 +2459,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2475,7 +2475,7 @@ (set_local $i45 (get_local $i48) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -2535,14 +2535,14 @@ (set_local $i45 (get_local $i7) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $_abort) ) ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $i3) (block @@ -2595,7 +2595,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2638,7 +2638,7 @@ (i32.eqz (get_local $i45) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2669,7 +2669,7 @@ ) ) ) - (block $do-once$27 + (block $do-once$13 (if (get_local $i15) (if @@ -2693,7 +2693,7 @@ ) (get_local $i45) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -2731,14 +2731,14 @@ ) (get_local $i45) ) - (br $do-once$25) + (br $do-once$11) ) ) ) ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.ge_u (get_local $i43) @@ -2886,7 +2886,7 @@ ) (get_local $i15) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $i15 @@ -3083,7 +3083,7 @@ ) (get_local $i8) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $i4 @@ -3110,7 +3110,7 @@ (get_local $i3) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -3131,7 +3131,7 @@ (set_local $i36 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $i3 @@ -3168,7 +3168,7 @@ (set_local $i36 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $i4 @@ -3182,7 +3182,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -3223,7 +3223,7 @@ ) (get_local $i8) ) - (br $do-once$29) + (br $do-once$15) ) ) (if @@ -3292,7 +3292,7 @@ ) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $_abort) ) @@ -4092,8 +4092,10 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $i45) + (drop + (call_import $_sbrk + (get_local $i45) + ) ) (br $label$break$L279) ) @@ -4268,7 +4270,7 @@ (set_local $i63 (i32.const 624) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$48 $do-in$49 (set_local $i43 (i32.load (get_local $i63) @@ -4309,7 +4311,7 @@ (set_local $i36 (i32.const 203) ) - (br $do-out$46) + (br $do-out$48) ) ) (set_local $i63 @@ -4320,7 +4322,7 @@ ) ) ) - (br_if $do-in$47 + (br_if $do-in$49 (i32.ne (get_local $i63) (i32.const 0) @@ -4479,7 +4481,7 @@ (set_local $i63 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$50 $while-in$51 (if (i32.eq (i32.load @@ -4497,7 +4499,7 @@ (set_local $i36 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (set_local $i63 @@ -4516,10 +4518,10 @@ (set_local $i71 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) (if (i32.eq @@ -4639,7 +4641,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.ne (get_local $i43) @@ -4687,7 +4689,7 @@ ) (get_local $i62) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i62 @@ -4742,7 +4744,7 @@ ) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq (get_local $i55) @@ -4784,7 +4786,7 @@ (set_local $i72 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $i73 @@ -4805,7 +4807,7 @@ ) ) ) - (loop $while-out$55 $while-in$56 + (loop $while-out$61 $while-in$62 (set_local $i5 (i32.add (get_local $i73) @@ -4826,7 +4828,7 @@ (set_local $i74 (get_local $i5) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $i5 @@ -4851,7 +4853,7 @@ (set_local $i76 (get_local $i74) ) - (br $while-out$55) + (br $while-out$61) ) (block (set_local $i73 @@ -4862,7 +4864,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) (if (i32.lt_u @@ -4878,7 +4880,7 @@ (set_local $i72 (get_local $i75) ) - (br $do-once$53) + (br $do-once$59) ) ) ) @@ -4938,7 +4940,7 @@ (set_local $i72 (get_local $i55) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $_abort) ) @@ -4968,7 +4970,7 @@ ) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.ne (get_local $i43) @@ -5025,7 +5027,7 @@ ) (if (get_local $i72) - (br $do-once$57) + (br $do-once$63) ) (i32.store (i32.const 180) @@ -5076,7 +5078,7 @@ (get_local $i5) ) ) - (block $do-once$59 + (block $do-once$65 (if (get_local $i45) (if @@ -5100,7 +5102,7 @@ ) (get_local $i72) ) - (br $do-once$59) + (br $do-once$65) ) ) ) @@ -5175,7 +5177,7 @@ ) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne (get_local $i45) @@ -5199,7 +5201,7 @@ ) (get_local $i43) ) - (br $do-once$61) + (br $do-once$55) ) (call_import $_abort) ) @@ -5229,7 +5231,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $i55) @@ -5266,7 +5268,7 @@ (set_local $i77 (get_local $i5) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -5376,7 +5378,7 @@ (get_local $i56) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eqz (i32.and @@ -5428,7 +5430,7 @@ (set_local $i81 (get_local $i52) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -5460,7 +5462,7 @@ ) (get_local $i62) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i5 @@ -5469,7 +5471,7 @@ (i32.const 8) ) ) - (block $do-once$67 + (block $do-once$69 (if (i32.eqz (get_local $i5) @@ -5487,7 +5489,7 @@ (set_local $i82 (i32.const 31) ) - (br $do-once$67) + (br $do-once$69) ) ) (set_local $i54 @@ -5664,7 +5666,7 @@ ) (get_local $i63) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $i50 @@ -5691,7 +5693,7 @@ (get_local $i5) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$71 $while-in$72 (if (i32.eq (i32.and @@ -5712,7 +5714,7 @@ (set_local $i36 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $i5 @@ -5749,7 +5751,7 @@ (set_local $i36 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $i50 @@ -5763,7 +5765,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) (if (i32.eq @@ -5804,7 +5806,7 @@ ) (get_local $i63) ) - (br $do-once$50) + (br $do-once$52) ) ) (if @@ -5873,7 +5875,7 @@ ) (i32.const 0) ) - (br $do-once$50) + (br $do-once$52) ) (call_import $_abort) ) @@ -5926,7 +5928,7 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$73 $while-in$74 (set_local $i63 (i32.load (get_local $i71) @@ -5961,7 +5963,7 @@ (set_local $i86 (get_local $i53) ) - (br $while-out$71) + (br $while-out$73) ) ) (set_local $i71 @@ -5972,7 +5974,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$74) ) (set_local $i44 (i32.add @@ -6169,7 +6171,7 @@ (i32.const 24) ) ) - (loop $do-out$73 $do-in$74 + (loop $do-out$75 $do-in$76 (set_local $i63 (i32.add (get_local $i63) @@ -6180,7 +6182,7 @@ (get_local $i63) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$76 (i32.lt_u (i32.add (get_local $i63) @@ -6557,7 +6559,7 @@ (get_local $i43) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$77 $while-in$78 (if (i32.eq (i32.and @@ -6578,7 +6580,7 @@ (set_local $i36 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $i43 @@ -6615,7 +6617,7 @@ (set_local $i36 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $i5 @@ -6629,7 +6631,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) (if (i32.eq @@ -6796,7 +6798,7 @@ (set_local $i5 (i32.const 0) ) - (loop $do-out$77 $do-in$78 + (loop $do-out$46 $do-in$47 (set_local $i62 (i32.add (i32.const 216) @@ -6829,7 +6831,7 @@ (i32.const 1) ) ) - (br_if $do-in$78 + (br_if $do-in$47 (i32.ne (get_local $i5) (i32.const 32) @@ -9874,10 +9876,12 @@ ) ) ) - (call $_memcpy - (get_local $i12) - (get_local $i11) - (get_local $i10) + (drop + (call $_memcpy + (get_local $i12) + (get_local $i11) + (get_local $i10) + ) ) (i32.store (get_local $i5) @@ -10499,22 +10503,24 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load - (i32.add - (get_local $i1) - (i32.const 36) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load + (i32.add + (get_local $i1) + (i32.const 36) + ) ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $i1) + (i32.const 0) + (i32.const 0) ) - (get_local $i1) - (i32.const 0) - (i32.const 0) ) (i32.eq (i32.load @@ -11874,8 +11880,10 @@ ) ) (func $_main (result i32) - (call $_puts - (i32.const 672) + (drop + (call $_puts + (i32.const 672) + ) ) (return (i32.const 0) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 1ef3b9017..edcebd3ed 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -277,9 +277,11 @@ ) (call_import $abort) ) - (call $_printf - (i32.const 672) - (get_local $0) + (drop + (call $_printf + (i32.const 672) + (get_local $0) + ) ) (i32.store (i32.const 8) @@ -291,9 +293,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (i32.load - (i32.const 8) - ) (f64.store (i32.load (i32.const 24) @@ -302,14 +301,14 @@ ) (set_local $2 (call $_bitshift64Lshr - (set_local $3 + (tee_local $3 (i32.load (i32.load (i32.const 24) ) ) ) - (set_local $4 + (tee_local $4 (i32.load offset=4 (i32.load (i32.const 24) @@ -319,16 +318,13 @@ (i32.const 52) ) ) - (i32.load - (i32.const 168) - ) (block $switch$0 (block $switch-default$3 (block $switch-case$2 (block $switch-case$1 (br_table $switch-case$1 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-case$2 $switch-default$3 (i32.sub - (set_local $2 + (tee_local $2 (i32.and (get_local $2) (i32.const 2047) @@ -406,9 +402,6 @@ ) ) (func $_frexpl (param $0 f64) (param $1 i32) (result f64) - (i32.load - (i32.const 8) - ) (call $_frexp (get_local $0) (get_local $1) @@ -420,9 +413,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (i32.load - (i32.const 8) - ) (set_local $1 (i32.const 0) ) @@ -449,7 +439,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -469,7 +459,6 @@ ) (br $while-out$0) ) - (get_local $1) ) (br $while-in$1) ) @@ -539,7 +528,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const -1) @@ -568,9 +557,6 @@ (get_local $5) ) (func $___errno_location (result i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (i32.load @@ -613,7 +599,7 @@ (call_import $abort) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -758,7 +744,7 @@ (call_import $abort) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -775,7 +761,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -818,9 +804,6 @@ (func $_fflush (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.eq @@ -848,15 +831,14 @@ (i32.const 44) ) (if - (i32.eq - (set_local $1 + (i32.ne + (tee_local $1 (i32.load (i32.const 40) ) ) (i32.const 0) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -906,7 +888,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=56 (get_local $1) ) @@ -1002,7 +984,7 @@ (call_import $abort) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $2) ) (get_local $1) @@ -1023,9 +1005,6 @@ (get_local $0) ) (func $___lockfile (param $0 i32) (result i32) - (i32.load - (i32.const 8) - ) (i32.const 0) ) (func $___unlockfile (param $0 i32) @@ -1082,15 +1061,15 @@ (get_local $8) ) (i32.store - (set_local $4 + (tee_local $4 (i32.add (get_local $8) (i32.const 32) ) ) - (set_local $3 + (tee_local $3 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 28) @@ -1101,10 +1080,10 @@ ) (i32.store offset=4 (get_local $4) - (set_local $3 + (tee_local $3 (i32.sub (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $0) (i32.const 20) @@ -1148,7 +1127,7 @@ (if (i32.eq (get_local $3) - (set_local $5 + (tee_local $5 (if (i32.eq (i32.load @@ -1248,7 +1227,7 @@ (if (i32.gt_u (get_local $5) - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $4) ) @@ -1257,7 +1236,7 @@ (block (i32.store (get_local $7) - (set_local $3 + (tee_local $3 (i32.load (get_local $13) ) @@ -1354,7 +1333,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $1 + (tee_local $1 (i32.load (get_local $13) ) @@ -1482,8 +1461,8 @@ ) (set_local $7 (i32.add - (set_local $4 - (set_local $9 + (tee_local $4 + (tee_local $9 (i32.add (get_local $3) (i32.const 80) @@ -1500,7 +1479,7 @@ ) (br_if $do-in$1 (i32.lt_s - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const 4) @@ -1546,7 +1525,7 @@ ) (set_local $4 (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -1580,7 +1559,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $0) (i32.const 48) @@ -1592,7 +1571,7 @@ (block (set_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 44) @@ -1605,7 +1584,7 @@ (get_local $6) ) (i32.store - (set_local $13 + (tee_local $13 (i32.add (get_local $0) (i32.const 28) @@ -1614,7 +1593,7 @@ (get_local $6) ) (i32.store - (set_local $11 + (tee_local $11 (i32.add (get_local $0) (i32.const 20) @@ -1627,7 +1606,7 @@ (i32.const 80) ) (i32.store - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 16) @@ -1654,19 +1633,21 @@ ) (get_local $1) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (set_local $1 (select @@ -1715,7 +1696,7 @@ (i32.const -1) (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -1758,14 +1739,11 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 16) @@ -1816,9 +1794,9 @@ (i32.lt_u (i32.sub (get_local $3) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -1852,122 +1830,124 @@ (br $label$break$L5) ) ) - (call $_memcpy - (block $label$break$L10 - (if - (i32.gt_s - (i32.shr_s - (i32.shl - (i32.load8_s offset=75 - (get_local $2) + (drop + (call $_memcpy + (block $label$break$L10 + (if + (i32.gt_s + (i32.shr_s + (i32.shl + (i32.load8_s offset=75 + (get_local $2) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.const -1) - ) - (block - (set_local $3 - (get_local $1) + (i32.const -1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eq - (get_local $3) - (i32.const 0) - ) - (block - (set_local $2 + (block + (set_local $3 + (get_local $1) + ) + (loop $while-out$2 $while-in$3 + (if + (i32.eq + (get_local $3) (i32.const 0) ) - (br $label$break$L10 - (get_local $6) + (block + (set_local $2 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $6) + ) ) ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (i32.add - (get_local $0) - (set_local $4 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $4 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) + ) + (br $while-out$2) + (set_local $3 + (get_local $4) ) - (i32.const 10) - ) - (br $while-out$2) - (set_local $3 - (get_local $4) ) + (br $while-in$3) ) - (br $while-in$3) - ) - (if - (i32.lt_u - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $2) + (if + (i32.lt_u + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $2) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $2) + (get_local $0) + (get_local $3) ) - (get_local $2) - (get_local $0) (get_local $3) ) + (block + (set_local $4 + (get_local $3) + ) + (br $label$break$L5) + ) + ) + (set_local $2 (get_local $3) ) - (block - (set_local $4 + (set_local $1 + (i32.sub + (get_local $1) (get_local $3) ) - (br $label$break$L5) ) - ) - (set_local $2 - (get_local $3) - ) - (set_local $1 - (i32.sub - (get_local $1) - (get_local $3) + (set_local $0 + (i32.add + (get_local $0) + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add - (get_local $0) - (get_local $3) + (i32.load + (get_local $5) ) ) - (i32.load - (get_local $5) - ) - ) - (block - (set_local $2 - (i32.const 0) + (block + (set_local $2 + (i32.const 0) + ) + (get_local $6) ) - (get_local $6) ) ) + (get_local $0) + (get_local $1) ) - (get_local $0) - (get_local $1) ) (i32.store (get_local $5) @@ -1992,18 +1972,15 @@ (func $___towrite (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (i32.load - (i32.const 8) - ) (set_local $1 (i32.and (i32.or (i32.add - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.load8_s - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 74) @@ -2029,7 +2006,7 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -2049,7 +2026,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -2083,9 +2060,6 @@ ) ) (func $_wcrtomb (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.eq @@ -2293,9 +2267,6 @@ ) ) (func $_wctomb (param $0 i32) (param $1 i32) (result i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (get_local $0) @@ -2324,9 +2295,6 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (i32.load - (i32.const 8) - ) (set_local $16 (i32.and (get_local $1) @@ -2336,7 +2304,7 @@ (block $label$break$L1 (if (i32.and - (set_local $6 + (tee_local $6 (i32.ne (get_local $2) (i32.const 0) @@ -2398,9 +2366,9 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.ne - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const -1) @@ -2411,7 +2379,7 @@ ) (i32.ne (i32.and - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const 1) @@ -2507,7 +2475,7 @@ ) (i32.shr_s (i32.shl - (set_local $0 + (tee_local $0 (i32.and (get_local $1) (i32.const 255) @@ -2543,7 +2511,7 @@ (loop $while-out$5 $while-in$6 (set_local $1 (i32.add - (set_local $6 + (tee_local $6 (i32.xor (i32.load (get_local $5) @@ -2578,7 +2546,7 @@ ) (if (i32.gt_u - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const -4) @@ -2691,7 +2659,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $10) (i32.const -1) @@ -2733,9 +2701,6 @@ ) ) (func $___syscall_ret (param $0 i32) (result i32) - (i32.load - (i32.const 8) - ) (if (i32.gt_u (get_local $0) @@ -2761,13 +2726,10 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (i32.load - (i32.const 8) - ) (if (i32.gt_u (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -2775,7 +2737,7 @@ ) ) (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 28) @@ -2784,19 +2746,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) - ) - (i32.const 7) - ) - (i32.const 2) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) + ) + (i32.const 2) + ) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (if (i32.eq @@ -2825,9 +2789,9 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 4) @@ -2835,9 +2799,9 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 8) @@ -2892,9 +2856,6 @@ (get_local $1) ) (func $_cleanup (param $0 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (i32.load offset=68 @@ -2917,8 +2878,8 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) - (local $15 f64) + (local $14 f64) + (local $15 i32) (local $16 i32) (local $17 i32) (local $18 i32) @@ -3034,9 +2995,9 @@ ) ) (set_local $71 - (set_local $28 + (tee_local $28 (i32.add - (set_local $5 + (tee_local $5 (i32.add (get_local $31) (i32.const 536) @@ -3054,7 +3015,7 @@ ) (set_local $76 (i32.add - (set_local $73 + (tee_local $73 (i32.add (get_local $31) (i32.const 8) @@ -3065,7 +3026,7 @@ ) (set_local $52 (i32.add - (set_local $5 + (tee_local $5 (i32.add (get_local $31) (i32.const 576) @@ -3082,11 +3043,11 @@ ) (set_local $77 (i32.sub - (set_local $40 + (tee_local $40 (get_local $52) ) - (set_local $64 - (set_local $29 + (tee_local $64 + (tee_local $29 (i32.add (get_local $31) (i32.const 588) @@ -3109,7 +3070,7 @@ ) (set_local $81 (i32.add - (set_local $80 + (tee_local $80 (i32.add (get_local $31) (i32.const 24) @@ -3119,7 +3080,7 @@ ) ) (set_local $75 - (set_local $45 + (tee_local $45 (i32.add (get_local $29) (i32.const 9) @@ -3178,7 +3139,7 @@ (i32.eq (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s (get_local $20) ) @@ -3243,7 +3204,7 @@ ) (set_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 1) @@ -3297,7 +3258,7 @@ (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $54) (i32.const 2) @@ -3375,13 +3336,13 @@ (set_local $7 (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $41) (i32.const 1) @@ -3401,14 +3362,14 @@ (block (set_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (select (i32.add (get_local $41) (i32.const 3) ) (get_local $5) - (set_local $7 + (tee_local $7 (i32.eq (i32.shr_s (i32.shl @@ -3457,7 +3418,7 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.shr_s (i32.shl (get_local $1) @@ -3512,12 +3473,12 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 1) @@ -3567,12 +3528,12 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 1) @@ -3612,33 +3573,28 @@ ) (i32.const 10) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const -48) ) + (i32.const 3) ) ) ) ) - (i32.load offset=4 - (get_local $1) - ) (set_local $66 (i32.const 1) ) @@ -3649,7 +3605,7 @@ ) ) (set_local $56 - (get_local $5) + (get_local $1) ) ) (set_local $12 @@ -3700,7 +3656,7 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -3772,7 +3728,7 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl @@ -3805,12 +3761,12 @@ ) (if (i32.ge_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -3885,9 +3841,9 @@ (i32.ne (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $9) (i32.const 1) @@ -3904,7 +3860,7 @@ (block (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl @@ -3947,12 +3903,12 @@ ) (if (i32.ge_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -3983,12 +3939,12 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 2) @@ -4028,35 +3984,30 @@ ) (i32.const 10) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const -48) ) + (i32.const 3) ) ) ) ) - (i32.load offset=4 - (get_local $1) - ) (set_local $10 - (get_local $5) + (get_local $1) ) (br $label$break$L46 (i32.add @@ -4084,7 +4035,7 @@ (block (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -4132,7 +4083,7 @@ (loop $while-out$19 $while-in$20 (if (i32.gt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl @@ -4164,9 +4115,9 @@ (if (i32.lt_u (i32.add - (set_local $5 + (tee_local $5 (i32.and - (set_local $1 + (tee_local $1 (i32.load8_s (i32.add (i32.add @@ -4268,7 +4219,7 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $3) (i32.shl @@ -4285,7 +4236,7 @@ ) ) (i32.store - (set_local $7 + (tee_local $7 (get_local $19) ) (get_local $5) @@ -4355,7 +4306,7 @@ ) (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.load8_s @@ -4375,7 +4326,7 @@ (set_local $18 (select (get_local $8) - (set_local $7 + (tee_local $7 (i32.and (get_local $8) (i32.const -65537) @@ -4406,7 +4357,7 @@ (block $switch-case$34 (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 (i32.sub - (set_local $26 + (tee_local $26 (select (i32.and (get_local $1) @@ -4470,7 +4421,7 @@ (br $label$continue$L1) ) (i32.store - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4559,7 +4510,7 @@ (br $label$continue$L1) ) (i32.store - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4642,9 +4593,9 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -4652,7 +4603,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $1) ) @@ -4669,7 +4620,7 @@ ) (loop $while-out$38 $while-in$39 (i32.store8 - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -1) @@ -4689,7 +4640,7 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (call $_bitshift64Lshr (get_local $5) (get_local $1) @@ -4699,7 +4650,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.const 168) ) @@ -4744,7 +4695,7 @@ (set_local $5 (i32.lt_s (get_local $10) - (set_local $1 + (tee_local $1 (i32.add (i32.sub (get_local $71) @@ -4782,14 +4733,14 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) ) (if (i32.lt_s - (set_local $33 + (tee_local $33 (i32.load offset=4 (get_local $1) ) @@ -4811,7 +4762,7 @@ ) ) (i32.store - (set_local $33 + (tee_local $33 (get_local $19) ) (get_local $1) @@ -4853,7 +4804,7 @@ (i32.const 4091) (i32.const 4093) (i32.eq - (set_local $6 + (tee_local $6 (i32.and (get_local $18) (i32.const 1) @@ -4898,7 +4849,7 @@ ) (set_local $33 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -4919,20 +4870,15 @@ ) (br $switch$24) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (i32.load offset=4 - (get_local $1) - ) (i32.store8 (get_local $72) (i32.and - (get_local $5) + (get_local $1) (i32.const 255) ) ) @@ -4970,7 +4916,7 @@ ) (set_local $5 (i32.ne - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4990,19 +4936,14 @@ ) (br $switch$24) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (i32.load offset=4 - (get_local $1) - ) (i32.store (get_local $73) - (get_local $5) + (get_local $1) ) (i32.store (get_local $76) @@ -5049,7 +4990,7 @@ ) (br $switch$24) ) - (set_local $15 + (set_local $14 (f64.load (get_local $19) ) @@ -5062,12 +5003,7 @@ (i32.load (i32.const 24) ) - (get_local $15) - ) - (i32.load - (i32.load - (i32.const 24) - ) + (get_local $14) ) (set_local $51 (if @@ -5083,9 +5019,9 @@ (set_local $39 (i32.const 4108) ) - (set_local $15 + (set_local $14 (f64.neg - (get_local $15) + (get_local $14) ) ) (i32.const 1) @@ -5104,7 +5040,7 @@ (i32.const 4109) (i32.const 4114) (i32.eq - (set_local $1 + (tee_local $1 (i32.and (get_local $18) (i32.const 1) @@ -5129,12 +5065,7 @@ (i32.load (i32.const 24) ) - (get_local $15) - ) - (i32.load - (i32.load - (i32.const 24) - ) + (get_local $14) ) (set_local $20 (get_local $9) @@ -5144,7 +5075,7 @@ (if (i32.or (i32.lt_u - (set_local $1 + (tee_local $1 (i32.and (i32.load offset=4 (i32.load @@ -5166,12 +5097,12 @@ ) (block (if - (set_local $5 + (tee_local $5 (f64.ne - (set_local $15 + (tee_local $14 (f64.mul (call $_frexpl - (get_local $15) + (get_local $14) (get_local $25) ) (f64.const 2) @@ -5192,7 +5123,7 @@ ) (if (i32.eq - (set_local $14 + (tee_local $15 (i32.or (get_local $26) (i32.const 32) @@ -5209,7 +5140,7 @@ (i32.const 9) ) (i32.eq - (set_local $6 + (tee_local $6 (i32.and (get_local $26) (i32.const 32) @@ -5225,7 +5156,7 @@ (i32.const 2) ) ) - (set_local $15 + (set_local $14 (if (i32.or (i32.gt_u @@ -5233,7 +5164,7 @@ (i32.const 11) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.sub (i32.const 12) (get_local $10) @@ -5242,7 +5173,7 @@ (i32.const 0) ) ) - (get_local $15) + (get_local $14) (block (set_local $30 (f64.const 8) @@ -5256,7 +5187,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -5274,7 +5205,7 @@ (get_local $30) (f64.sub (f64.neg - (get_local $15) + (get_local $14) ) (get_local $30) ) @@ -5282,7 +5213,7 @@ ) (f64.sub (f64.add - (get_local $15) + (get_local $14) (get_local $30) ) (get_local $30) @@ -5305,7 +5236,7 @@ ) (set_local $5 (i32.lt_s - (set_local $1 + (tee_local $1 (i32.load (get_local $25) ) @@ -5317,7 +5248,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $8 + (tee_local $8 (select (i32.sub (i32.const 0) @@ -5336,10 +5267,10 @@ ) (i32.store8 (i32.add - (set_local $5 + (tee_local $5 (if (i32.eq - (set_local $5 + (tee_local $5 (call $_fmt_u (get_local $8) (get_local $5) @@ -5375,7 +5306,7 @@ ) ) (i32.store8 - (set_local $8 + (tee_local $8 (i32.add (get_local $5) (i32.const -2) @@ -5415,9 +5346,9 @@ (i32.and (i32.load8_s (i32.add - (set_local $1 + (tee_local $1 (call_import $f64-to-int - (get_local $15) + (get_local $14) ) ) (i32.const 4075) @@ -5430,10 +5361,10 @@ (i32.const 255) ) ) - (set_local $15 + (set_local $14 (f64.mul (f64.sub - (get_local $15) + (get_local $14) (f64.convert_s/i32 (get_local $1) ) @@ -5446,7 +5377,7 @@ (if (i32.eq (i32.sub - (set_local $1 + (tee_local $1 (i32.add (get_local $11) (i32.const 1) @@ -5464,7 +5395,7 @@ (i32.and (get_local $5) (f64.eq - (get_local $15) + (get_local $14) (f64.const 0) ) ) @@ -5485,7 +5416,7 @@ ) (if (f64.eq - (get_local $15) + (get_local $14) (f64.const 0) ) (block @@ -5516,9 +5447,9 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $5 + (tee_local $5 (i32.add - (set_local $6 + (tee_local $6 (select (i32.sub (i32.add @@ -5597,7 +5528,7 @@ (get_local $6) (i32.add (get_local $1) - (set_local $1 + (tee_local $1 (i32.sub (get_local $40) (get_local $8) @@ -5657,7 +5588,7 @@ ) ) (set_local $62 - (set_local $9 + (tee_local $9 (select (get_local $80) (get_local $81) @@ -5667,7 +5598,7 @@ (block (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $25) @@ -5676,9 +5607,9 @@ ) ) ) - (set_local $15 + (set_local $14 (f64.mul - (get_local $15) + (get_local $14) (f64.const 268435456) ) ) @@ -5699,9 +5630,9 @@ (loop $while-out$66 $while-in$67 (i32.store (get_local $7) - (set_local $5 + (tee_local $5 (call_import $f64-to-int - (get_local $15) + (get_local $14) ) ) ) @@ -5713,10 +5644,10 @@ ) (if (f64.eq - (set_local $15 + (tee_local $14 (f64.mul (f64.sub - (get_local $15) + (get_local $14) (f64.convert_u/i32 (get_local $5) ) @@ -5737,7 +5668,7 @@ ) (if (i32.gt_s - (set_local $5 + (tee_local $5 (i32.load (get_local $25) ) @@ -5766,7 +5697,7 @@ (block $do-once$70 (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $13) (i32.const -4) @@ -5785,7 +5716,7 @@ (loop $while-out$72 $while-in$73 (set_local $6 (call $___uremdi3 - (set_local $5 + (tee_local $5 (call $_i64Add (call $_bitshift64Shl (i32.load @@ -5801,7 +5732,7 @@ (i32.const 0) ) ) - (set_local $7 + (tee_local $7 (i32.load (i32.const 168) ) @@ -5810,9 +5741,6 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (i32.store (get_local $10) (get_local $6) @@ -5825,12 +5753,9 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $10) (i32.const -4) @@ -5853,7 +5778,7 @@ ) ) (i32.store - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const -4) @@ -5877,7 +5802,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $13) (i32.const -4) @@ -5895,7 +5820,7 @@ ) (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.sub (i32.load (get_local $25) @@ -5949,7 +5874,7 @@ ) (set_local $10 (i32.eq - (get_local $14) + (get_local $15) (i32.const 102) ) ) @@ -5959,7 +5884,7 @@ (loop $while-out$76 $while-in$77 (set_local $5 (i32.gt_s - (set_local $6 + (tee_local $6 (i32.sub (i32.const 0) (get_local $5) @@ -6007,7 +5932,7 @@ (loop $while-out$80 $while-in$81 (set_local $6 (i32.and - (set_local $5 + (tee_local $5 (i32.load (get_local $17) ) @@ -6033,7 +5958,7 @@ ) (if (i32.ge_u - (set_local $17 + (tee_local $17 (i32.add (get_local $17) (i32.const 4) @@ -6102,7 +6027,7 @@ (i32.shr_s (i32.sub (get_local $23) - (set_local $7 + (tee_local $7 (select (get_local $9) (get_local $11) @@ -6130,7 +6055,7 @@ ) (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $25) @@ -6190,7 +6115,7 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load (get_local $7) ) @@ -6217,7 +6142,7 @@ (if (i32.lt_u (get_local $5) - (set_local $8 + (tee_local $8 (i32.mul (get_local $8) (i32.const 10) @@ -6242,7 +6167,7 @@ (set_local $7 (if (i32.lt_s - (set_local $5 + (tee_local $5 (i32.add (i32.sub (get_local $1) @@ -6250,7 +6175,7 @@ (get_local $13) (i32.const 0) (i32.ne - (get_local $14) + (get_local $15) (i32.const 102) ) ) @@ -6258,15 +6183,15 @@ (i32.shr_s (i32.shl (i32.and - (set_local $70 + (tee_local $70 (i32.ne (get_local $1) (i32.const 0) ) ) - (set_local $8 + (tee_local $8 (i32.eq - (get_local $14) + (get_local $15) (i32.const 103) ) ) @@ -6302,7 +6227,7 @@ (i32.add (i32.and (call_import $i32s-div - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 9216) @@ -6320,7 +6245,7 @@ ) (if (i32.lt_s - (set_local $11 + (tee_local $11 (i32.add (i32.and (call_import $i32s-rem @@ -6347,7 +6272,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (i32.add (get_local $11) (i32.const 1) @@ -6373,7 +6298,7 @@ (if (i32.eqz (i32.and - (set_local $11 + (tee_local $11 (i32.eq (i32.add (get_local $6) @@ -6383,10 +6308,10 @@ ) ) (i32.eq - (set_local $14 + (tee_local $15 (i32.and (call_import $i32u-rem - (set_local $5 + (tee_local $5 (i32.load (get_local $6) ) @@ -6401,7 +6326,7 @@ ) ) (block - (set_local $15 + (set_local $14 (select (f64.const 9007199254740992) (f64.const 9007199254740994) @@ -6423,8 +6348,8 @@ (set_local $30 (if (i32.lt_u - (get_local $14) - (set_local $10 + (get_local $15) + (tee_local $10 (i32.and (call_import $i32s-div (get_local $17) @@ -6441,21 +6366,21 @@ (i32.and (get_local $11) (i32.eq - (get_local $14) + (get_local $15) (get_local $10) ) ) ) ) ) - (set_local $15 + (set_local $14 (block $do-once$90 (if (i32.eq (get_local $51) (i32.const 0) ) - (get_local $15) + (get_local $14) (block (if (i32.ne @@ -6471,7 +6396,7 @@ (i32.const 45) ) (br $do-once$90 - (get_local $15) + (get_local $14) ) ) (set_local $30 @@ -6480,7 +6405,7 @@ ) ) (f64.neg - (get_local $15) + (get_local $14) ) ) ) @@ -6488,26 +6413,26 @@ ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.sub (get_local $5) - (get_local $14) + (get_local $15) ) ) ) (if (f64.eq (f64.add - (get_local $15) + (get_local $14) (get_local $30) ) - (get_local $15) + (get_local $14) ) (br $do-once$88) ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (get_local $17) @@ -6527,7 +6452,7 @@ (set_local $7 (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -4) @@ -6537,7 +6462,7 @@ ) (block (i32.store - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const -4) @@ -6552,7 +6477,7 @@ ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $6) @@ -6585,7 +6510,7 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load (get_local $7) ) @@ -6612,7 +6537,7 @@ (if (i32.lt_u (get_local $5) - (set_local $10 + (tee_local $10 (i32.mul (get_local $10) (i32.const 10) @@ -6634,7 +6559,7 @@ (set_local $6 (i32.gt_u (get_local $27) - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const 4) @@ -6684,7 +6609,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const -4) @@ -6717,7 +6642,7 @@ (if (i32.and (i32.gt_s - (set_local $1 + (tee_local $1 (i32.add (i32.xor (i32.and @@ -6767,7 +6692,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.and (get_local $18) (i32.const 8) @@ -6776,7 +6701,7 @@ (i32.const 0) ) (block - (set_local $14 + (set_local $15 (get_local $8) ) (set_local $26 @@ -6793,7 +6718,7 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.add (get_local $23) @@ -6848,7 +6773,7 @@ (i32.and (call_import $i32u-rem (get_local $1) - (set_local $5 + (tee_local $5 (i32.mul (get_local $5) (i32.const 10) @@ -6895,7 +6820,7 @@ (block (set_local $1 (i32.lt_s - (set_local $5 + (tee_local $5 (i32.sub (get_local $1) (get_local $6) @@ -6907,7 +6832,7 @@ (set_local $5 (i32.lt_s (get_local $8) - (set_local $1 + (tee_local $1 (select (i32.const 0) (get_local $5) @@ -6916,7 +6841,7 @@ ) ) ) - (set_local $14 + (set_local $15 (select (get_local $8) (get_local $1) @@ -6931,7 +6856,7 @@ (block (set_local $1 (i32.lt_s - (set_local $5 + (tee_local $5 (i32.sub (i32.add (get_local $1) @@ -6946,7 +6871,7 @@ (set_local $5 (i32.lt_s (get_local $8) - (set_local $1 + (tee_local $1 (select (i32.const 0) (get_local $5) @@ -6955,7 +6880,7 @@ ) ) ) - (set_local $14 + (set_local $15 (select (get_local $8) (get_local $1) @@ -6970,7 +6895,7 @@ ) ) (block - (set_local $14 + (set_local $15 (get_local $1) ) (i32.and @@ -6984,9 +6909,9 @@ (set_local $17 (i32.and (i32.ne - (set_local $1 + (tee_local $1 (i32.or - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -6997,7 +6922,7 @@ ) (set_local $13 (if - (set_local $10 + (tee_local $10 (i32.eq (i32.or (get_local $26) @@ -7024,7 +6949,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $6 + (tee_local $6 (select (get_local $27) (get_local $13) @@ -7045,7 +6970,7 @@ (i32.lt_s (i32.sub (get_local $40) - (set_local $5 + (tee_local $5 (call $_fmt_u (get_local $6) (get_local $5) @@ -7057,7 +6982,7 @@ ) (loop $while-out$104 $while-in$105 (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -1) @@ -7066,19 +6991,17 @@ (i32.const 48) ) (if - (i32.lt_s + (i32.ge_s (i32.sub (get_local $40) (get_local $5) ) (i32.const 2) ) - (get_local $5) (br $while-out$104) ) (br $while-in$105) ) - (get_local $5) ) (i32.store8 (i32.add @@ -7100,7 +7023,7 @@ ) ) (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -2) @@ -7125,7 +7048,7 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $6 + (tee_local $6 (i32.add (i32.add (i32.add @@ -7133,7 +7056,7 @@ (get_local $51) (i32.const 1) ) - (get_local $14) + (get_local $15) ) (get_local $17) ) @@ -7173,7 +7096,7 @@ (get_local $10) (block (set_local $7 - (set_local $8 + (tee_local $8 (select (get_local $9) (get_local $7) @@ -7184,7 +7107,7 @@ ) ) ) - (loop $while-out$108 $while-in$109 + (loop $while-out$114 $while-in$115 (set_local $5 (call $_fmt_u (i32.load @@ -7194,7 +7117,7 @@ (get_local $45) ) ) - (block $do-once$110 + (block $do-once$116 (if (i32.eq (get_local $7) @@ -7206,7 +7129,7 @@ (get_local $5) (get_local $45) ) - (br $do-once$110) + (br $do-once$116) ) (i32.store8 (get_local $53) @@ -7218,16 +7141,15 @@ ) (block (if - (i32.gt_u + (i32.le_u (get_local $5) (get_local $29) ) - (get_local $5) - (br $do-once$110) + (br $do-once$116) ) - (loop $while-out$112 $while-in$113 + (loop $while-out$118 $while-in$119 (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -1) @@ -7236,14 +7158,13 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $5) (get_local $29) ) - (get_local $5) - (br $while-out$112) + (br $while-out$118) ) - (br $while-in$113) + (br $while-in$119) ) ) ) @@ -7269,7 +7190,7 @@ ) (if (i32.gt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $7) (i32.const 4) @@ -7281,20 +7202,19 @@ (set_local $5 (get_local $7) ) - (br $while-out$108) + (br $while-out$114) ) - (get_local $7) ) - (br $while-in$109) + (br $while-in$115) ) - (block $do-once$114 + (block $do-once$120 (if (i32.ne (get_local $1) (i32.const 0) ) (block - (br_if $do-once$114 + (br_if $do-once$120 (i32.ne (i32.and (i32.load @@ -7316,7 +7236,7 @@ (if (i32.and (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 0) ) (i32.lt_u @@ -7324,10 +7244,10 @@ (get_local $23) ) ) - (loop $while-out$116 $while-in$117 + (loop $while-out$122 $while-in$123 (if (i32.gt_u - (set_local $1 + (tee_local $1 (call $_fmt_u (i32.load (get_local $5) @@ -7338,9 +7258,9 @@ ) (get_local $29) ) - (loop $while-out$118 $while-in$119 + (loop $while-out$124 $while-in$125 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -7349,16 +7269,14 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $1) (get_local $29) ) - (get_local $1) - (br $while-out$118) + (br $while-out$124) ) - (br $while-in$119) + (br $while-in$125) ) - (get_local $1) ) (if (i32.eq @@ -7374,9 +7292,9 @@ (get_local $1) (select (i32.const 9) - (get_local $14) + (get_local $15) (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 9) ) ) @@ -7385,18 +7303,18 @@ ) (set_local $1 (i32.add - (get_local $14) + (get_local $15) (i32.const -9) ) ) (if (i32.and (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 9) ) (i32.lt_u - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 4) @@ -7405,25 +7323,24 @@ (get_local $23) ) ) - (set_local $14 + (set_local $15 (get_local $1) ) (block - (set_local $14 + (set_local $15 (get_local $1) ) - (br $while-out$116) + (br $while-out$122) ) ) - (br $while-in$117) + (br $while-in$123) ) - (get_local $14) ) (call $_pad (get_local $0) (i32.const 48) (i32.add - (get_local $14) + (get_local $15) (i32.const 9) ) (i32.const 9) @@ -7443,7 +7360,7 @@ ) (if (i32.gt_s - (get_local $14) + (get_local $15) (i32.const -1) ) (block @@ -7456,11 +7373,11 @@ (set_local $5 (get_local $7) ) - (loop $while-out$120 $while-in$121 + (loop $while-out$108 $while-in$109 (set_local $8 (if (i32.eq - (set_local $1 + (tee_local $1 (call $_fmt_u (i32.load (get_local $5) @@ -7481,7 +7398,7 @@ (get_local $1) ) ) - (block $do-once$122 + (block $do-once$110 (if (i32.eq (get_local $5) @@ -7514,11 +7431,11 @@ (i32.and (get_local $9) (i32.lt_s - (get_local $14) + (get_local $15) (i32.const 1) ) ) - (br $do-once$122) + (br $do-once$110) ) (if (i32.ne @@ -7530,7 +7447,7 @@ ) (i32.const 0) ) - (br $do-once$122) + (br $do-once$110) ) (call $___fwritex (i32.const 4143) @@ -7551,12 +7468,12 @@ (set_local $1 (get_local $8) ) - (br $do-once$122) + (br $do-once$110) ) ) - (loop $while-out$124 $while-in$125 + (loop $while-out$112 $while-in$113 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -7565,14 +7482,13 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $1) (get_local $29) ) - (get_local $1) - (br $while-out$124) + (br $while-out$112) ) - (br $while-in$125) + (br $while-in$113) ) ) ) @@ -7597,9 +7513,9 @@ (get_local $1) (select (get_local $8) - (get_local $14) + (get_local $15) (i32.gt_s - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -7610,7 +7526,7 @@ (i32.eqz (i32.and (i32.lt_u - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 4) @@ -7619,9 +7535,9 @@ (get_local $11) ) (i32.gt_s - (set_local $14 + (tee_local $15 (i32.sub - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -7629,18 +7545,17 @@ ) ) ) - (br $while-out$120) + (br $while-out$108) ) - (br $while-in$121) + (br $while-in$109) ) ) - (get_local $14) ) (call $_pad (get_local $0) (i32.const 48) (i32.add - (get_local $14) + (get_local $15) (i32.const 18) ) (i32.const 18) @@ -7692,7 +7607,7 @@ (select (i32.const 4127) (i32.const 4131) - (set_local $8 + (tee_local $8 (i32.ne (i32.and (get_local $26) @@ -7707,11 +7622,11 @@ (select (i32.const 0) (get_local $51) - (set_local $1 + (tee_local $1 (i32.or (f64.ne - (get_local $15) - (get_local $15) + (get_local $14) + (get_local $14) ) (i32.const 0) ) @@ -7733,7 +7648,7 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const 3) @@ -7747,7 +7662,7 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -7757,10 +7672,12 @@ (i32.const 0) ) (block - (call $___fwritex - (get_local $39) - (get_local $6) - (get_local $0) + (drop + (call $___fwritex + (get_local $39) + (get_local $6) + (get_local $0) + ) ) (i32.load (get_local $0) @@ -7841,9 +7758,9 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -7851,7 +7768,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $1) ) @@ -7881,9 +7798,9 @@ (set_local $6 (get_local $28) ) - (loop $while-out$129 $while-in$130 + (loop $while-out$133 $while-in$134 (i32.store8 - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -1) @@ -7911,7 +7828,7 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (call $_bitshift64Lshr (get_local $5) (get_local $1) @@ -7921,7 +7838,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.const 168) ) @@ -7929,9 +7846,9 @@ (i32.const 0) ) ) - (br $while-out$129) + (br $while-out$133) ) - (br $while-in$130) + (br $while-in$134) ) (if (i32.or @@ -7945,7 +7862,7 @@ (i32.and (i32.eq (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -8046,7 +7963,7 @@ ) (set_local $5 (i32.eq - (set_local $1 + (tee_local $1 (call $_memchr (get_local $50) (i32.const 0) @@ -8109,22 +8026,22 @@ (get_local $19) ) ) - (loop $while-out$131 $while-in$132 + (loop $while-out$129 $while-in$130 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $6) ) ) (i32.const 0) ) - (br $while-out$131) + (br $while-out$129) ) (if (i32.or (i32.lt_s - (set_local $5 + (tee_local $5 (call $_wctomb (get_local $63) (get_local $1) @@ -8140,7 +8057,7 @@ ) ) ) - (br $while-out$131) + (br $while-out$129) ) (set_local $6 (i32.add @@ -8151,7 +8068,7 @@ (if (i32.gt_u (get_local $69) - (set_local $1 + (tee_local $1 (i32.add (get_local $5) (get_local $7) @@ -8165,10 +8082,10 @@ (set_local $7 (get_local $1) ) - (br $while-out$131) + (br $while-out$129) ) ) - (br $while-in$132) + (br $while-in$130) ) (if (i32.lt_s @@ -8211,10 +8128,10 @@ (get_local $19) ) ) - (loop $while-out$133 $while-in$134 + (loop $while-out$131 $while-in$132 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $8) ) @@ -8239,9 +8156,9 @@ ) (if (i32.gt_s - (set_local $1 + (tee_local $1 (i32.add - (set_local $5 + (tee_local $5 (call $_wctomb (get_local $63) (get_local $1) @@ -8293,10 +8210,10 @@ (set_local $12 (i32.const 98) ) - (br $while-out$133) + (br $while-out$131) ) ) - (br $while-in$134) + (br $while-in$132) ) ) ) @@ -8373,11 +8290,11 @@ (get_local $32) (i32.const 0) ) - (set_local $1 + (tee_local $1 (i32.or (i32.ne (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -8396,7 +8313,7 @@ (set_local $7 (i32.gt_s (get_local $32) - (set_local $1 + (tee_local $1 (i32.add (i32.xor (i32.and @@ -8459,7 +8376,7 @@ (set_local $1 (i32.lt_s (get_local $42) - (set_local $7 + (tee_local $7 (i32.sub (get_local $49) (get_local $47) @@ -8470,10 +8387,10 @@ (set_local $5 (i32.lt_s (get_local $16) - (set_local $1 + (tee_local $1 (i32.add (get_local $43) - (set_local $6 + (tee_local $6 (select (get_local $7) (get_local $42) @@ -8487,7 +8404,7 @@ (call $_pad (get_local $0) (i32.const 32) - (set_local $5 + (tee_local $5 (select (get_local $1) (get_local $16) @@ -8593,7 +8510,7 @@ (loop $while-out$136 $while-in$137 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.add (get_local $4) @@ -8620,8 +8537,8 @@ (get_local $2) ) (if - (i32.lt_s - (set_local $1 + (i32.ge_s + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -8629,7 +8546,6 @@ ) (i32.const 10) ) - (get_local $1) (block (set_local $24 (i32.const 1) @@ -8710,9 +8626,6 @@ (local $3 i32) (local $4 f64) (local $5 i32) - (i32.load - (i32.const 8) - ) (block $label$break$L1 (if (i32.le_u @@ -8739,7 +8652,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8767,7 +8680,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8808,7 +8721,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8840,8 +8753,8 @@ ) (set_local $5 (i32.load - (set_local $3 - (set_local $1 + (tee_local $3 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8879,7 +8792,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8903,7 +8816,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.and @@ -8934,7 +8847,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8969,7 +8882,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8993,7 +8906,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.and @@ -9024,7 +8937,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9059,7 +8972,7 @@ ) (set_local $4 (f64.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9087,7 +9000,7 @@ ) (set_local $4 (f64.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9118,9 +9031,6 @@ (func $_fmt_u (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (i32.load - (i32.const 8) - ) (set_local $0 (if (i32.or @@ -9155,11 +9065,8 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (i32.store8 - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const -1) @@ -9229,18 +9136,17 @@ ) ) (if - (i32.eq + (i32.ne (get_local $3) (i32.const 0) ) - (get_local $0) (block (set_local $1 (get_local $0) ) (loop $while-out$2 $while-in$3 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -9340,7 +9246,7 @@ (block (set_local $4 (i32.gt_u - (set_local $5 + (tee_local $5 (i32.sub (get_local $2) (get_local $3) @@ -9349,19 +9255,21 @@ (i32.const 256) ) ) - (call $_memset - (get_local $6) - (get_local $1) - (select - (i32.const 256) - (get_local $5) - (get_local $4) + (drop + (call $_memset + (get_local $6) + (get_local $1) + (select + (i32.const 256) + (get_local $5) + (get_local $4) + ) ) ) (set_local $4 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -9390,14 +9298,16 @@ (set_local $4 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (if (get_local $4) (block - (call $___fwritex - (get_local $6) - (i32.const 256) - (get_local $0) + (drop + (call $___fwritex + (get_local $6) + (i32.const 256) + (get_local $0) + ) ) (i32.load (get_local $0) @@ -9413,7 +9323,7 @@ ) (if (i32.le_u - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (i32.const -256) @@ -9432,8 +9342,9 @@ ) ) (if - (get_local $4) - (get_local $1) + (i32.eqz + (get_local $4) + ) (br $do-once$0) ) ) @@ -9505,9 +9416,6 @@ (local $44 i32) (local $45 i32) (local $46 i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.lt_u @@ -9518,16 +9426,16 @@ (if (i32.ne (i32.and - (set_local $25 + (tee_local $25 (i32.shr_u - (set_local $4 + (tee_local $4 (i32.load (i32.const 176) ) ) - (set_local $22 + (tee_local $22 (i32.shr_u - (set_local $6 + (tee_local $6 (select (i32.const 16) (i32.and @@ -9555,18 +9463,18 @@ (block (set_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add - (set_local $9 + (tee_local $9 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $8 + (tee_local $8 (i32.add (i32.xor (i32.and @@ -9625,7 +9533,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const 12) @@ -9651,7 +9559,7 @@ (i32.store offset=4 (get_local $1) (i32.or - (set_local $0 + (tee_local $0 (i32.shl (get_local $8) (i32.const 3) @@ -9663,7 +9571,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $1) @@ -9688,7 +9596,7 @@ (if (i32.gt_u (get_local $6) - (set_local $10 + (tee_local $10 (i32.load (i32.const 184) ) @@ -9704,7 +9612,7 @@ (set_local $1 (i32.sub (i32.const 0) - (set_local $0 + (tee_local $0 (i32.shl (i32.const 2) (get_local $22) @@ -9715,7 +9623,7 @@ (set_local $1 (i32.sub (i32.const 0) - (set_local $0 + (tee_local $0 (i32.and (i32.shl (get_local $25) @@ -9732,7 +9640,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.add (i32.and (get_local $0) @@ -9748,27 +9656,27 @@ ) (set_local $0 (i32.load - (set_local $3 + (tee_local $3 (i32.add - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $9 + (tee_local $9 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $8 + (tee_local $8 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $0) @@ -9781,10 +9689,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $2) (get_local $1) @@ -9796,10 +9704,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -9811,10 +9719,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -9884,7 +9792,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 12) @@ -9920,14 +9828,14 @@ ) ) (i32.store offset=4 - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (get_local $6) ) ) (i32.or - (set_local $9 + (tee_local $9 (i32.sub (i32.shl (get_local $8) @@ -9962,7 +9870,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $7) (i32.const 3) @@ -9977,12 +9885,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -10011,9 +9919,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $8) (i32.const 8) @@ -10068,20 +9976,19 @@ ) ) (if - (i32.eq - (set_local $0 + (i32.ne + (tee_local $0 (i32.load (i32.const 180) ) ) (i32.const 0) ) - (get_local $6) (block (set_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.add (i32.and (get_local $0) @@ -10102,7 +10009,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $0 + (tee_local $0 (i32.load offset=480 (i32.shl (i32.add @@ -10110,10 +10017,10 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $0) @@ -10126,10 +10033,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $2) (get_local $1) @@ -10141,10 +10048,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -10156,10 +10063,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -10192,10 +10099,10 @@ (set_local $8 (get_local $0) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=16 (get_local $4) ) @@ -10204,7 +10111,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $4) ) @@ -10218,7 +10125,7 @@ (set_local $10 (get_local $8) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $1 (get_local $0) @@ -10230,7 +10137,7 @@ ) (set_local $0 (i32.lt_u - (set_local $4 + (tee_local $4 (i32.sub (i32.and (i32.load offset=4 @@ -10261,12 +10168,12 @@ (get_local $0) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $10) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -10277,7 +10184,7 @@ (if (i32.ge_u (get_local $10) - (set_local $9 + (tee_local $9 (i32.add (get_local $10) (get_local $6) @@ -10291,10 +10198,10 @@ (get_local $10) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $10) ) @@ -10304,9 +10211,9 @@ (block (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $10) (i32.const 20) @@ -10318,9 +10225,9 @@ ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $10) (i32.const 16) @@ -10334,7 +10241,7 @@ (set_local $15 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (set_local $4 (get_local $2) @@ -10344,12 +10251,12 @@ (get_local $2) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if (i32.ne - (set_local $2 + (tee_local $2 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (i32.const 20) @@ -10366,14 +10273,14 @@ (set_local $8 (get_local $5) ) - (br $while-in$11) + (br $while-in$28) ) ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (i32.const 16) @@ -10383,7 +10290,7 @@ ) (i32.const 0) ) - (br $while-out$10) + (br $while-out$27) (block (set_local $4 (get_local $2) @@ -10393,7 +10300,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -10415,7 +10322,7 @@ (block (if (i32.lt_u - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $10) ) @@ -10427,7 +10334,7 @@ (if (i32.ne (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 12) @@ -10441,7 +10348,7 @@ (if (i32.eq (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 8) @@ -10468,7 +10375,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (i32.ne (get_local $1) @@ -10479,11 +10386,11 @@ (i32.eq (get_local $10) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 (get_local $10) ) @@ -10520,7 +10427,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -10537,7 +10444,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 16) @@ -10555,7 +10462,7 @@ (get_local $15) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eq (get_local $15) (i32.const 0) @@ -10566,7 +10473,7 @@ (if (i32.lt_u (get_local $15) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -10580,7 +10487,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $10) ) @@ -10607,7 +10514,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $10) ) @@ -10646,7 +10553,7 @@ (i32.store offset=4 (get_local $10) (i32.or - (set_local $0 + (tee_local $0 (i32.add (get_local $7) (get_local $6) @@ -10658,7 +10565,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $10) @@ -10700,7 +10607,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 184) ) @@ -10718,7 +10625,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $0) (i32.const 3) @@ -10733,12 +10640,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -10767,9 +10674,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 8) @@ -10829,7 +10736,6 @@ ) ) ) - (get_local $6) ) ) (if @@ -10843,7 +10749,7 @@ (block (set_local $5 (i32.and - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 11) @@ -10854,7 +10760,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) @@ -10874,13 +10780,13 @@ (block $label$break$L123 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=480 (i32.shl - (set_local $12 + (tee_local $12 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (i32.const 8) @@ -10898,20 +10804,20 @@ (block (set_local $7 (i32.shl - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $12 + (tee_local $12 (i32.shl (get_local $3) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -10934,11 +10840,11 @@ ) (get_local $3) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $12) (get_local $7) @@ -11034,12 +10940,12 @@ (set_local $36 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.sub - (set_local $3 + (tee_local $3 (i32.and (i32.load offset=4 (get_local $23) @@ -11082,7 +10988,7 @@ ) (set_local $7 (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=20 (get_local $23) ) @@ -11098,7 +11004,7 @@ (get_local $7) (i32.eq (get_local $3) - (set_local $3 + (tee_local $3 (i32.load (i32.add (i32.add @@ -11124,7 +11030,7 @@ (get_local $11) (i32.xor (i32.and - (set_local $7 + (tee_local $7 (i32.eq (get_local $3) (i32.const 0) @@ -11151,7 +11057,7 @@ (set_local $11 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $7 @@ -11162,7 +11068,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -11174,7 +11080,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -11190,7 +11096,7 @@ (set_local $7 (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.shl (i32.const 2) (get_local $12) @@ -11200,7 +11106,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and (get_local $0) (i32.or @@ -11221,7 +11127,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.add (i32.and (get_local $0) @@ -11245,10 +11151,10 @@ (i32.or (i32.or (i32.or - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $7 + (tee_local $7 (i32.shr_u (get_local $3) (get_local $0) @@ -11261,10 +11167,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $7) (get_local $3) @@ -11276,10 +11182,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (get_local $0) @@ -11291,10 +11197,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (get_local $0) @@ -11349,13 +11255,13 @@ (get_local $11) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $11 (i32.const 0) ) (set_local $0 (i32.lt_u - (set_local $3 + (tee_local $3 (i32.sub (i32.and (i32.load offset=4 @@ -11385,7 +11291,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=16 (get_local $24) ) @@ -11402,12 +11308,12 @@ (set_local $29 (get_local $3) ) - (br $while-in$20) + (br $while-in$6) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $24) ) @@ -11418,7 +11324,7 @@ (set_local $13 (get_local $3) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $26 @@ -11432,7 +11338,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -11457,7 +11363,7 @@ (if (i32.lt_u (get_local $13) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -11468,7 +11374,7 @@ (if (i32.ge_u (get_local $13) - (set_local $3 + (tee_local $3 (i32.add (get_local $13) (get_local $5) @@ -11482,10 +11388,10 @@ (get_local $13) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $13) ) @@ -11495,9 +11401,9 @@ (block (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $13) (i32.const 20) @@ -11509,9 +11415,9 @@ ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $13) (i32.const 16) @@ -11525,7 +11431,7 @@ (set_local $6 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (set_local $8 (get_local $2) @@ -11535,12 +11441,12 @@ (get_local $2) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if (i32.ne - (set_local $2 + (tee_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 20) @@ -11557,14 +11463,14 @@ (set_local $9 (get_local $7) ) - (br $while-in$24) + (br $while-in$10) ) ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 16) @@ -11574,7 +11480,7 @@ ) (i32.const 0) ) - (br $while-out$23) + (br $while-out$9) (block (set_local $8 (get_local $2) @@ -11584,7 +11490,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -11606,7 +11512,7 @@ (block (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load offset=8 (get_local $13) ) @@ -11618,7 +11524,7 @@ (if (i32.ne (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 12) @@ -11632,7 +11538,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 8) @@ -11659,7 +11565,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (i32.ne (get_local $1) @@ -11670,11 +11576,11 @@ (i32.eq (get_local $13) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 (get_local $13) ) @@ -11711,7 +11617,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -11728,7 +11634,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 16) @@ -11746,7 +11652,7 @@ (get_local $6) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eq (get_local $6) (i32.const 0) @@ -11757,7 +11663,7 @@ (if (i32.lt_u (get_local $6) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -11771,7 +11677,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $13) ) @@ -11798,7 +11704,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $13) ) @@ -11828,7 +11734,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $17) @@ -11838,7 +11744,7 @@ (i32.store offset=4 (get_local $13) (i32.or - (set_local $0 + (tee_local $0 (i32.add (get_local $17) (get_local $5) @@ -11850,7 +11756,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $13) @@ -11917,12 +11823,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -11951,9 +11857,9 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -11992,17 +11898,17 @@ (get_local $3) (get_local $2) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $17) (i32.const 8) @@ -12020,20 +11926,20 @@ (block (set_local $1 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -12056,11 +11962,11 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $2) (get_local $1) @@ -12113,7 +12019,7 @@ (get_local $1) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const 16) @@ -12128,12 +12034,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $1) @@ -12166,7 +12072,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $1 @@ -12193,7 +12099,7 @@ (get_local $2) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -12211,7 +12117,7 @@ (set_local $11 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $4 @@ -12222,9 +12128,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $2) @@ -12253,7 +12159,7 @@ (set_local $11 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $1 @@ -12264,7 +12170,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -12306,9 +12212,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $22) (i32.const 8) @@ -12316,7 +12222,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -12376,7 +12282,7 @@ ) (if (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 184) ) @@ -12391,7 +12297,7 @@ ) (if (i32.gt_u - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -12402,7 +12308,7 @@ (block (i32.store (i32.const 196) - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (get_local $6) @@ -12454,7 +12360,7 @@ (set_local $2 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $1) @@ -12483,7 +12389,7 @@ ) (if (i32.gt_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 188) ) @@ -12493,7 +12399,7 @@ (block (i32.store (i32.const 188) - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -12502,9 +12408,9 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -12546,7 +12452,7 @@ (i32.eq (i32.and (i32.add - (set_local $0 + (tee_local $0 (call_import $_sysconf (i32.const 30) ) @@ -12606,16 +12512,16 @@ ) (if (i32.le_u - (set_local $10 + (tee_local $10 (i32.and - (set_local $7 + (tee_local $7 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 656) ) ) - (set_local $15 + (tee_local $15 (i32.add (get_local $6) (i32.const 47) @@ -12623,7 +12529,7 @@ ) ) ) - (set_local $12 + (tee_local $12 (i32.sub (i32.const 0) (get_local $0) @@ -12639,7 +12545,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 616) ) @@ -12649,9 +12555,9 @@ (if (i32.or (i32.le_u - (set_local $3 + (tee_local $3 (i32.add - (set_local $4 + (tee_local $4 (i32.load (i32.const 608) ) @@ -12673,7 +12579,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (block $label$break$L257 (if (i32.eq @@ -12689,7 +12595,7 @@ (block $label$break$L259 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -12706,7 +12612,7 @@ (loop $while-out$37 $while-in$38 (if (i32.le_u - (set_local $4 + (tee_local $4 (i32.load (get_local $16) ) @@ -12718,7 +12624,7 @@ (i32.add (get_local $4) (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $16) (i32.const 4) @@ -12741,7 +12647,7 @@ ) (if (i32.eq - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $16) ) @@ -12762,7 +12668,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.and (i32.sub (get_local $7) @@ -12777,7 +12683,7 @@ ) (if (i32.eq - (set_local $3 + (tee_local $3 (call_import $_sbrk (get_local $0) ) @@ -12812,7 +12718,7 @@ (set_local $30 (get_local $3) ) - (set_local $20 + (set_local $21 (get_local $0) ) (set_local $11 @@ -12832,7 +12738,7 @@ ) (if (i32.ne - (set_local $7 + (tee_local $7 (call_import $_sbrk (i32.const 0) ) @@ -12842,18 +12748,18 @@ (block (set_local $4 (i32.add - (set_local $3 + (tee_local $3 (i32.load (i32.const 608) ) ) - (set_local $12 + (tee_local $12 (if (i32.eq (i32.and - (set_local $12 + (tee_local $12 (i32.add - (set_local $4 + (tee_local $4 (i32.load (i32.const 652) ) @@ -12861,7 +12767,7 @@ (i32.const -1) ) ) - (set_local $0 + (tee_local $0 (get_local $7) ) ) @@ -12902,7 +12808,7 @@ (block (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 616) ) @@ -12924,7 +12830,7 @@ ) (if (i32.eq - (set_local $30 + (tee_local $30 (call_import $_sbrk (get_local $12) ) @@ -12943,7 +12849,7 @@ ) ) (block - (set_local $20 + (set_local $21 (get_local $12) ) (set_local $11 @@ -12967,18 +12873,18 @@ (set_local $4 (i32.sub (i32.const 0) - (get_local $20) + (get_local $21) ) ) (if (i32.and (i32.gt_u (get_local $5) - (get_local $20) + (get_local $21) ) (i32.and (i32.lt_u - (get_local $20) + (get_local $21) (i32.const 2147483647) ) (i32.ne @@ -12989,14 +12895,14 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.and (i32.add (i32.sub (get_local $15) - (get_local $20) + (get_local $21) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 656) ) @@ -13018,21 +12924,21 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $4) + (drop + (call_import $_sbrk + (get_local $4) + ) ) (br $label$break$L279) ) - (set_local $20 + (set_local $21 (i32.add (get_local $0) - (get_local $20) + (get_local $21) ) ) ) - (get_local $20) ) - (get_local $20) ) (if (i32.ne @@ -13044,7 +12950,7 @@ (get_local $30) ) (set_local $19 - (get_local $20) + (get_local $21) ) (br $label$break$L257 (i32.const 193) @@ -13080,7 +12986,7 @@ (set_local $3 (i32.and (i32.ne - (set_local $0 + (tee_local $0 (call_import $_sbrk (get_local $10) ) @@ -13088,7 +12994,7 @@ (i32.const -1) ) (i32.ne - (set_local $4 + (tee_local $4 (call_import $_sbrk (i32.const 0) ) @@ -13107,7 +13013,7 @@ ) (if (i32.gt_u - (set_local $4 + (tee_local $4 (i32.sub (get_local $4) (get_local $0) @@ -13142,7 +13048,7 @@ (block (i32.store (i32.const 608) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 608) @@ -13166,7 +13072,7 @@ (block $do-once$44 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -13177,7 +13083,7 @@ (if (i32.or (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -13219,9 +13125,9 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$46 $while-in$47 + (loop $while-out$77 $while-in$78 (i32.store offset=12 - (set_local $0 + (tee_local $0 (i32.add (i32.const 216) (i32.shl @@ -13241,7 +13147,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -13249,15 +13155,14 @@ ) (i32.const 32) ) - (br $while-out$46) - (get_local $1) + (br $while-out$77) ) - (br $while-in$47) + (br $while-in$78) ) (set_local $1 (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.add (get_local $14) (i32.const 8) @@ -13270,10 +13175,10 @@ ) (i32.store (i32.const 200) - (set_local $0 + (tee_local $0 (i32.add (get_local $14) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and @@ -13291,7 +13196,7 @@ ) (i32.store (i32.const 188) - (set_local $1 + (tee_local $1 (i32.sub (i32.add (get_local $19) @@ -13326,19 +13231,19 @@ (set_local $7 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (get_local $14) (i32.add - (set_local $4 + (tee_local $4 (i32.load (get_local $7) ) ) - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 4) @@ -13364,24 +13269,24 @@ (set_local $11 (i32.const 203) ) - (br $while-out$48) + (br $while-out$46) ) ) (if (i32.eq - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $7) ) ) (i32.const 0) ) - (br $while-out$48) + (br $while-out$46) (set_local $7 (get_local $4) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -13420,7 +13325,7 @@ (set_local $2 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 8) @@ -13434,7 +13339,7 @@ (set_local $0 (i32.add (get_local $0) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and @@ -13497,7 +13402,7 @@ (if (i32.lt_u (get_local $14) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -13522,7 +13427,7 @@ (set_local $1 (i32.const 624) ) - (loop $while-out$50 $while-in$51 + (loop $while-out$48 $while-in$49 (if (i32.eq (i32.load @@ -13540,12 +13445,12 @@ (set_local $11 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -13556,11 +13461,10 @@ (set_local $27 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) - (get_local $1) ) - (br $while-in$51) + (br $while-in$49) ) (if (i32.eq @@ -13585,7 +13489,7 @@ (set_local $1 (i32.add (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $38) (i32.const 4) @@ -13602,7 +13506,7 @@ (set_local $9 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $14) (i32.const 8) @@ -13616,7 +13520,7 @@ (set_local $5 (i32.eq (i32.and - (set_local $2 + (tee_local $2 (i32.add (get_local $3) (i32.const 8) @@ -13629,7 +13533,7 @@ ) (set_local $1 (i32.sub - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (select @@ -13645,7 +13549,7 @@ ) ) ) - (set_local $7 + (tee_local $7 (i32.add (get_local $14) (select @@ -13682,7 +13586,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.eq (get_local $3) @@ -13691,7 +13595,7 @@ (block (i32.store (i32.const 188) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 188) @@ -13723,7 +13627,7 @@ (block (i32.store (i32.const 184) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 184) @@ -13750,18 +13654,18 @@ ) (get_local $0) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $0 (i32.and (i32.load - (set_local $1 + (tee_local $1 (i32.add (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $3) ) @@ -13795,15 +13699,15 @@ (get_local $3) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $3) ) ) - (set_local $2 + (tee_local $2 (i32.add (i32.const 216) (i32.shl @@ -13824,7 +13728,7 @@ ) (call_import $_abort) ) - (br_if $do-once$55 + (br_if $do-once$61 (i32.eq (i32.load offset=12 (get_local $0) @@ -13860,7 +13764,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $1) @@ -13883,7 +13787,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 8) @@ -13896,7 +13800,7 @@ (set_local $39 (get_local $2) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -13918,10 +13822,10 @@ (get_local $3) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $3) ) @@ -13931,11 +13835,11 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $9 + (tee_local $9 (i32.add - (set_local $21 + (tee_local $20 (i32.add (get_local $3) (i32.const 16) @@ -13950,9 +13854,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (get_local $21) + (get_local $20) ) ) (i32.const 0) @@ -13961,14 +13865,14 @@ (set_local $18 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $2 (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) ) ) @@ -13976,12 +13880,12 @@ (get_local $1) ) ) - (loop $while-out$61 $while-in$62 + (loop $while-out$55 $while-in$56 (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $21 + (tee_local $20 (i32.add (get_local $2) (i32.const 20) @@ -13996,16 +13900,16 @@ (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) - (br $while-in$62) + (br $while-in$56) ) ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $21 + (tee_local $20 (i32.add (get_local $2) (i32.const 16) @@ -14015,17 +13919,17 @@ ) (i32.const 0) ) - (br $while-out$61) + (br $while-out$55) (block (set_local $2 (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) ) ) - (br $while-in$62) + (br $while-in$56) ) (if (i32.lt_u @@ -14047,7 +13951,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $3) ) @@ -14059,7 +13963,7 @@ (if (i32.ne (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const 12) @@ -14073,7 +13977,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $1) (i32.const 8) @@ -14106,16 +14010,16 @@ (i32.const 0) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $3) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $3) ) @@ -14131,7 +14035,7 @@ (get_local $2) (get_local $18) ) - (br_if $do-once$63 + (br_if $do-once$57 (i32.ne (get_local $18) (i32.const 0) @@ -14167,7 +14071,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -14197,7 +14101,7 @@ (if (i32.lt_u (get_local $18) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -14211,9 +14115,9 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $3) (i32.const 16) @@ -14243,7 +14147,7 @@ ) (br_if $label$break$L331 (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -14340,16 +14244,16 @@ ) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -14379,9 +14283,9 @@ (block (if (i32.ge_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -14400,7 +14304,7 @@ (set_local $33 (get_local $1) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -14423,18 +14327,18 @@ (get_local $5) (get_local $2) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 - (block $do-once$69 + (tee_local $1 + (block $do-once$67 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $4) (i32.const 8) @@ -14444,7 +14348,7 @@ ) (i32.const 0) (block - (br_if $do-once$69 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $4) @@ -14453,20 +14357,20 @@ ) (set_local $1 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -14489,11 +14393,11 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $2) (get_local $1) @@ -14546,7 +14450,7 @@ (get_local $1) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 16) @@ -14561,12 +14465,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $1) @@ -14599,7 +14503,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $1 @@ -14626,7 +14530,7 @@ (get_local $2) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (if (i32.eq (i32.and @@ -14644,7 +14548,7 @@ (set_local $11 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $8 @@ -14655,9 +14559,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $2) @@ -14686,7 +14590,7 @@ (set_local $11 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $1 @@ -14697,7 +14601,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (if (i32.eq @@ -14739,9 +14643,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $34) (i32.const 8) @@ -14749,7 +14653,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -14801,10 +14705,10 @@ ) ) ) - (loop $while-out$73 $while-in$74 + (loop $while-out$71 $while-in$72 (if (i32.le_u - (set_local $1 + (tee_local $1 (i32.load (get_local $27) ) @@ -14813,7 +14717,7 @@ ) (if (i32.gt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.load offset=4 @@ -14827,7 +14731,7 @@ (set_local $2 (get_local $1) ) - (br $while-out$73) + (br $while-out$71) ) ) ) @@ -14836,14 +14740,14 @@ (get_local $27) ) ) - (br $while-in$74) + (br $while-in$72) ) (set_local $8 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const -47) @@ -14859,7 +14763,7 @@ ) (set_local $4 (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (select @@ -14875,7 +14779,7 @@ ) ) ) - (set_local $8 + (tee_local $8 (i32.add (get_local $0) (i32.const 16) @@ -14885,7 +14789,7 @@ ) (set_local $4 (i32.add - (set_local $5 + (tee_local $5 (select (get_local $0) (get_local $1) @@ -14898,7 +14802,7 @@ (set_local $3 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $14) (i32.const 8) @@ -14911,10 +14815,10 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add (get_local $14) - (set_local $3 + (tee_local $3 (select (i32.const 0) (i32.and @@ -14932,7 +14836,7 @@ ) (i32.store (i32.const 188) - (set_local $3 + (tee_local $3 (i32.sub (i32.add (get_local $19) @@ -14963,7 +14867,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $5) (i32.const 4) @@ -15017,9 +14921,9 @@ (i32.const 24) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 4) @@ -15028,17 +14932,16 @@ (i32.const 7) ) (if - (i32.lt_u + (i32.ge_u (i32.add (get_local $1) (i32.const 4) ) (get_local $2) ) - (get_local $1) - (br $while-out$75) + (br $while-out$73) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.ne @@ -15058,7 +14961,7 @@ (i32.store offset=4 (get_local $0) (i32.or - (set_local $3 + (tee_local $3 (i32.sub (get_local $5) (get_local $0) @@ -15098,12 +15001,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -15126,15 +15029,15 @@ (i32.const 8) ) ) - (set_local $21 + (set_local $20 (get_local $4) ) ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (i32.const 8) @@ -15151,7 +15054,7 @@ (set_local $9 (get_local $1) ) - (set_local $21 + (set_local $20 (get_local $2) ) ) @@ -15162,12 +15065,12 @@ (get_local $0) ) (i32.store offset=12 - (get_local $21) + (get_local $20) (get_local $0) ) (i32.store offset=8 (get_local $0) - (get_local $21) + (get_local $20) ) (i32.store offset=12 (get_local $0) @@ -15180,10 +15083,10 @@ (i32.add (i32.const 480) (i32.shl - (set_local $2 + (tee_local $2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $3) (i32.const 8) @@ -15201,20 +15104,20 @@ (block (set_local $2 (i32.shl - (set_local $1 + (tee_local $1 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $1) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add @@ -15237,11 +15140,11 @@ ) (get_local $1) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $4) (get_local $2) @@ -15304,12 +15207,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $2) @@ -15369,7 +15272,7 @@ (get_local $4) ) ) - (loop $while-out$77 $while-in$78 + (loop $while-out$75 $while-in$76 (if (i32.eq (i32.and @@ -15387,7 +15290,7 @@ (set_local $11 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $8 @@ -15398,9 +15301,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $4) @@ -15429,7 +15332,7 @@ (set_local $11 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $2 @@ -15440,7 +15343,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) (if (i32.eq @@ -15482,9 +15385,9 @@ (if (i32.and (i32.ge_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $35) (i32.const 8) @@ -15492,7 +15395,7 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.load (i32.const 192) ) @@ -15536,7 +15439,7 @@ ) (if (i32.gt_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 188) ) @@ -15546,7 +15449,7 @@ (block (i32.store (i32.const 188) - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -15555,9 +15458,9 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -15615,9 +15518,6 @@ (local $16 i32) (local $17 i32) (local $18 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (get_local $0) @@ -15627,13 +15527,13 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -15643,9 +15543,9 @@ ) (if (i32.eq - (set_local $8 + (tee_local $8 (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.add (get_local $0) @@ -15663,7 +15563,7 @@ (set_local $9 (i32.add (get_local $2) - (set_local $7 + (tee_local $7 (i32.and (get_local $0) (i32.const -8) @@ -15701,7 +15601,7 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $4 (i32.add (get_local $2) (i32.sub @@ -15716,7 +15616,7 @@ ) (if (i32.eq - (get_local $6) + (get_local $4) (i32.load (i32.const 196) ) @@ -15725,9 +15625,9 @@ (if (i32.ne (i32.and - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 4) @@ -15741,7 +15641,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15761,7 +15661,7 @@ ) ) (i32.store offset=4 - (get_local $6) + (get_local $4) (i32.or (get_local $12) (i32.const 1) @@ -15769,7 +15669,7 @@ ) (i32.store (i32.add - (get_local $6) + (get_local $4) (get_local $12) ) (get_local $12) @@ -15791,17 +15691,17 @@ (block (set_local $2 (i32.load offset=12 - (get_local $6) + (get_local $4) ) ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 - (get_local $6) + (get_local $4) ) ) - (set_local $8 + (tee_local $8 (i32.add (i32.const 216) (i32.shl @@ -15827,7 +15727,7 @@ (i32.load offset=12 (get_local $0) ) - (get_local $6) + (get_local $4) ) (call_import $_abort) ) @@ -15855,7 +15755,7 @@ ) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15885,14 +15785,14 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 8) ) ) ) - (get_local $6) + (get_local $4) ) (set_local $13 (get_local $1) @@ -15910,7 +15810,7 @@ (get_local $0) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15920,29 +15820,29 @@ ) (set_local $8 (i32.load offset=24 - (get_local $6) + (get_local $4) ) ) (block $do-once$2 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=12 - (get_local $6) + (get_local $4) ) ) - (get_local $6) + (get_local $4) ) (block (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $7 + (tee_local $7 (i32.add - (set_local $13 + (tee_local $13 (i32.add - (get_local $6) + (get_local $4) (i32.const 16) ) ) @@ -15955,7 +15855,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (get_local $13) ) @@ -15963,7 +15863,7 @@ (i32.const 0) ) (block - (set_local $4 + (set_local $5 (i32.const 0) ) (br $do-once$2) @@ -15984,9 +15884,9 @@ (loop $while-out$4 $while-in$5 (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $2) (i32.const 20) @@ -16008,9 +15908,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $2) (i32.const 16) @@ -16043,7 +15943,7 @@ (get_local $7) (i32.const 0) ) - (set_local $4 + (set_local $5 (get_local $2) ) ) @@ -16052,9 +15952,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 - (get_local $6) + (get_local $4) ) ) (get_local $1) @@ -16064,28 +15964,28 @@ (if (i32.ne (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 12) ) ) ) - (get_local $6) + (get_local $4) ) (call_import $_abort) ) (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 8) ) ) ) - (get_local $6) + (get_local $4) ) (block (i32.store @@ -16096,7 +15996,7 @@ (get_local $7) (get_local $2) ) - (set_local $4 + (set_local $5 (get_local $0) ) ) @@ -16112,7 +16012,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16121,15 +16021,15 @@ (block (if (i32.eq - (get_local $6) + (get_local $4) (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 - (get_local $6) + (get_local $4) ) ) (i32.const 2) @@ -16141,11 +16041,11 @@ (block (i32.store (get_local $1) - (get_local $4) + (get_local $5) ) (if (i32.eq - (get_local $4) + (get_local $5) (i32.const 0) ) (block @@ -16165,7 +16065,7 @@ ) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16187,32 +16087,32 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 16) ) ) ) - (get_local $6) + (get_local $4) ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=20 (get_local $8) - (get_local $4) + (get_local $5) ) ) (if (i32.eq - (get_local $4) + (get_local $5) (i32.const 0) ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16224,8 +16124,8 @@ ) (if (i32.lt_u - (get_local $4) - (set_local $0 + (get_local $5) + (tee_local $0 (i32.load (i32.const 192) ) @@ -16234,16 +16134,16 @@ (call_import $_abort) ) (i32.store offset=24 - (get_local $4) + (get_local $5) (get_local $8) ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $2 + (tee_local $2 (i32.add - (get_local $6) + (get_local $4) (i32.const 16) ) ) @@ -16259,19 +16159,19 @@ (call_import $_abort) (block (i32.store offset=16 - (get_local $4) + (get_local $5) (get_local $1) ) (i32.store offset=24 (get_local $1) - (get_local $4) + (get_local $5) ) ) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -16280,7 +16180,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16296,15 +16196,15 @@ (call_import $_abort) (block (i32.store offset=20 - (get_local $4) + (get_local $5) (get_local $0) ) (i32.store offset=24 (get_local $0) - (get_local $4) + (get_local $5) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16335,9 +16235,9 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 4) @@ -16370,7 +16270,7 @@ (block (i32.store (i32.const 188) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 188) @@ -16420,7 +16320,7 @@ (block (i32.store (i32.const 184) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 184) @@ -16450,7 +16350,7 @@ (return) ) ) - (set_local $4 + (set_local $5 (i32.add (i32.and (get_local $0) @@ -16479,12 +16379,12 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $9) ) ) - (set_local $2 + (tee_local $2 (i32.add (i32.const 216) (i32.shl @@ -16566,7 +16466,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 8) @@ -16600,7 +16500,7 @@ (block $do-once$10 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $9) ) @@ -16610,11 +16510,11 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $8 + (tee_local $8 (i32.add - (set_local $7 + (tee_local $7 (i32.add (get_local $9) (i32.const 16) @@ -16629,7 +16529,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $7) ) @@ -16658,9 +16558,9 @@ (loop $while-out$12 $while-in$13 (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $2) (i32.const 20) @@ -16682,9 +16582,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $2) (i32.const 16) @@ -16728,7 +16628,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $9) ) @@ -16742,7 +16642,7 @@ (if (i32.ne (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 12) @@ -16756,7 +16656,7 @@ (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -16793,11 +16693,11 @@ (i32.eq (get_local $9) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $9) ) @@ -16851,7 +16751,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -16880,7 +16780,7 @@ (if (i32.lt_u (get_local $11) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -16894,9 +16794,9 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $9) (i32.const 16) @@ -16926,7 +16826,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -16961,16 +16861,16 @@ (i32.store offset=4 (get_local $3) (i32.or - (get_local $4) + (get_local $5) (i32.const 1) ) ) (i32.store (i32.add (get_local $3) - (get_local $4) + (get_local $5) ) - (get_local $4) + (get_local $5) ) (if (i32.eq @@ -16982,11 +16882,10 @@ (block (i32.store (i32.const 184) - (get_local $4) + (get_local $5) ) (return) ) - (get_local $4) ) ) (block @@ -17011,20 +16910,20 @@ ) (get_local $10) ) - (set_local $4 + (set_local $5 (get_local $10) ) ) ) (set_local $1 (i32.shr_u - (get_local $4) + (get_local $5) (i32.const 3) ) ) (if (i32.lt_u - (get_local $4) + (get_local $5) (i32.const 256) ) (block @@ -17043,12 +16942,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -17065,7 +16964,7 @@ (get_local $1) ) ) - (set_local $5 + (set_local $6 (i32.add (get_local $2) (i32.const 8) @@ -17077,9 +16976,9 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -17093,7 +16992,7 @@ ) (call_import $_abort) (block - (set_local $5 + (set_local $6 (get_local $0) ) (set_local $14 @@ -17103,7 +17002,7 @@ ) ) (i32.store - (get_local $5) + (get_local $6) (get_local $3) ) (i32.store offset=12 @@ -17125,12 +17024,12 @@ (i32.add (i32.const 480) (i32.shl - (set_local $5 + (tee_local $6 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u - (get_local $4) + (get_local $5) (i32.const 8) ) ) @@ -17139,27 +17038,27 @@ (i32.const 0) (if (i32.gt_u - (get_local $4) + (get_local $5) (i32.const 16777215) ) (i32.const 31) (block - (set_local $5 + (set_local $6 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $5 + (tee_local $6 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -17182,14 +17081,14 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $6 (i32.shl (get_local $1) - (get_local $5) + (get_local $6) ) ) (i32.const 245760) @@ -17203,7 +17102,7 @@ ) (i32.shr_u (i32.shl - (get_local $5) + (get_local $6) (get_local $0) ) (i32.const 15) @@ -17216,7 +17115,7 @@ (i32.or (i32.and (i32.shr_u - (get_local $4) + (get_local $5) (i32.add (get_local $0) (i32.const 7) @@ -17224,7 +17123,7 @@ ) (i32.const 1) ) - (get_local $5) + (get_local $6) ) ) ) @@ -17236,7 +17135,7 @@ ) (i32.store offset=28 (get_local $3) - (get_local $5) + (get_local $6) ) (i32.store offset=20 (get_local $3) @@ -17249,15 +17148,15 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) - (get_local $5) + (get_local $6) ) ) ) @@ -17289,20 +17188,20 @@ ) ) (block - (set_local $5 + (set_local $6 (i32.shl - (get_local $4) + (get_local $5) (select (i32.const 0) (i32.sub (i32.const 25) (i32.shr_u - (get_local $5) + (get_local $6) (i32.const 1) ) ) (i32.eq - (get_local $5) + (get_local $6) (i32.const 31) ) ) @@ -17322,7 +17221,7 @@ ) (i32.const -8) ) - (get_local $4) + (get_local $5) ) (block (set_local $15 @@ -17336,15 +17235,15 @@ ) (set_local $2 (i32.shl - (get_local $5) + (get_local $6) (i32.const 1) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $6 (i32.add (i32.add (get_local $1) @@ -17352,7 +17251,7 @@ ) (i32.shl (i32.shr_u - (get_local $5) + (get_local $6) (i32.const 31) ) (i32.const 2) @@ -17368,7 +17267,7 @@ (get_local $1) ) (set_local $17 - (get_local $5) + (get_local $6) ) (set_local $0 (i32.const 127) @@ -17376,7 +17275,7 @@ (br $while-out$18) ) (block - (set_local $5 + (set_local $6 (get_local $2) ) (set_local $1 @@ -17426,9 +17325,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -17436,7 +17335,7 @@ ) ) ) - (set_local $5 + (tee_local $6 (i32.load (i32.const 192) ) @@ -17444,7 +17343,7 @@ ) (i32.ge_u (get_local $15) - (get_local $5) + (get_local $6) ) ) (block @@ -17477,7 +17376,7 @@ ) (i32.store (i32.const 208) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 208) @@ -17491,7 +17390,7 @@ (get_local $0) (i32.const 0) ) - (set_local $5 + (set_local $6 (i32.const 632) ) (return) @@ -17499,24 +17398,23 @@ (loop $while-out$20 $while-in$21 (set_local $0 (i32.eq - (set_local $5 + (tee_local $6 (i32.load - (get_local $5) + (get_local $6) ) ) (i32.const 0) ) ) - (set_local $5 + (set_local $6 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) (if (get_local $0) (br $while-out$20) - (get_local $5) ) (br $while-in$21) ) @@ -17556,7 +17454,7 @@ (get_local $3) ) (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (get_local $2) @@ -17589,7 +17487,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -17618,7 +17516,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -18020,15 +17918,15 @@ (set_local $2 (i32.add (i32.shr_u - (set_local $4 + (tee_local $4 (i32.mul - (set_local $2 + (tee_local $2 (i32.and (get_local $1) (i32.const 65535) ) ) - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 65535) @@ -18040,7 +17938,7 @@ ) (i32.mul (get_local $2) - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $0) (i32.const 16) @@ -18051,7 +17949,7 @@ ) (set_local $3 (i32.mul - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (i32.const 16) @@ -18109,7 +18007,7 @@ (call $___udivmoddi4 (call $_i64Subtract (i32.xor - (set_local $4 + (tee_local $4 (i32.or (i32.shr_s (get_local $1) @@ -18131,7 +18029,7 @@ (get_local $0) ) (i32.xor - (set_local $0 + (tee_local $0 (i32.or (i32.shr_s (select @@ -18167,7 +18065,7 @@ ) (call $_i64Subtract (i32.xor - (set_local $1 + (tee_local $1 (i32.or (i32.shr_s (get_local $3) @@ -18189,7 +18087,7 @@ (get_local $2) ) (i32.xor - (set_local $2 + (tee_local $2 (i32.or (i32.shr_s (select @@ -18225,7 +18123,7 @@ ) (i32.const 0) ) - (set_local $1 + (tee_local $1 (i32.xor (get_local $1) (get_local $4) @@ -18236,7 +18134,7 @@ (i32.load (i32.const 168) ) - (set_local $0 + (tee_local $0 (i32.xor (get_local $2) (get_local $0) @@ -18265,125 +18163,127 @@ (i32.const 16) ) ) - (call $___udivmoddi4 - (call $_i64Subtract - (i32.xor - (set_local $4 - (i32.or - (i32.shr_s - (get_local $1) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (drop + (call $___udivmoddi4 + (call $_i64Subtract + (i32.xor + (tee_local $4 + (i32.or + (i32.shr_s + (get_local $1) + (i32.const 31) + ) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $0) ) - (get_local $0) - ) - (i32.xor - (set_local $5 - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (i32.xor + (tee_local $5 + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $1) ) - (get_local $1) + (get_local $4) + (get_local $5) ) - (get_local $4) - (get_local $5) - ) - (i32.load - (i32.const 168) - ) - (call $_i64Subtract - (i32.xor - (set_local $0 - (i32.or - (i32.shr_s - (get_local $3) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.load + (i32.const 168) + ) + (call $_i64Subtract + (i32.xor + (tee_local $0 + (i32.or + (i32.shr_s + (get_local $3) + (i32.const 31) + ) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $2) ) - (get_local $2) - ) - (i32.xor - (set_local $1 - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.xor + (tee_local $1 + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $3) ) - (get_local $3) + (get_local $0) + (get_local $1) + ) + (i32.load + (i32.const 168) + ) + (tee_local $0 + (get_local $6) ) - (get_local $0) - (get_local $1) - ) - (i32.load - (i32.const 168) - ) - (set_local $0 - (get_local $6) ) ) (set_local $0 @@ -18441,7 +18341,7 @@ (get_local $2) ) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 168) ) @@ -18486,13 +18386,15 @@ (i32.const 16) ) ) - (call $___udivmoddi4 - (get_local $0) - (get_local $1) - (get_local $2) - (get_local $3) - (set_local $0 - (get_local $4) + (drop + (call $___udivmoddi4 + (get_local $0) + (get_local $1) + (get_local $2) + (get_local $3) + (tee_local $0 + (get_local $4) + ) ) ) (i32.store @@ -18527,14 +18429,14 @@ (get_local $2) ) (set_local $7 - (set_local $14 + (tee_local $14 (get_local $3) ) ) (if (i32.eq - (set_local $6 - (set_local $9 + (tee_local $6 + (tee_local $9 (get_local $1) ) ) @@ -18716,7 +18618,7 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.sub (get_local $7) (i32.const 1) @@ -18774,7 +18676,7 @@ ) (if (i32.le_u - (set_local $5 + (tee_local $5 (i32.sub (i32.clz (get_local $7) @@ -18788,7 +18690,7 @@ ) (block (set_local $12 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 1) @@ -18799,7 +18701,7 @@ (i32.or (i32.shl (get_local $6) - (set_local $1 + (tee_local $1 (i32.sub (i32.const 31) (get_local $5) @@ -18881,7 +18783,7 @@ (block (if (i32.le_u - (set_local $5 + (tee_local $5 (i32.sub (i32.clz (get_local $7) @@ -18895,7 +18797,7 @@ ) (block (set_local $12 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 1) @@ -18909,7 +18811,7 @@ (get_local $8) (get_local $0) ) - (set_local $9 + (tee_local $9 (i32.shr_s (i32.sub (get_local $5) @@ -18921,7 +18823,7 @@ ) (i32.shl (get_local $6) - (set_local $1 + (tee_local $1 (i32.sub (i32.const 31) (get_local $5) @@ -18998,7 +18900,7 @@ (if (i32.ne (i32.and - (set_local $7 + (tee_local $7 (i32.sub (get_local $5) (i32.const 1) @@ -19012,7 +18914,7 @@ (set_local $1 (i32.sub (i32.const 64) - (set_local $0 + (tee_local $0 (i32.sub (i32.add (i32.clz @@ -19029,7 +18931,7 @@ ) (set_local $5 (i32.shr_s - (set_local $9 + (tee_local $9 (i32.sub (i32.const 32) (get_local $0) @@ -19040,7 +18942,7 @@ ) (set_local $10 (i32.shr_s - (set_local $7 + (tee_local $7 (i32.sub (get_local $0) (i32.const 32) @@ -19185,7 +19087,7 @@ (i32.const 0) (i32.shr_u (get_local $6) - (set_local $0 + (tee_local $0 (i32.ctz (get_local $5) ) @@ -19231,7 +19133,7 @@ (block (set_local $3 (call $_i64Add - (set_local $1 + (tee_local $1 (i32.or (i32.const 0) (i32.and @@ -19240,7 +19142,7 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.or (get_local $14) (i32.and @@ -19286,43 +19188,45 @@ ) ) ) - (call $_i64Subtract - (get_local $3) - (get_local $8) - (set_local $0 - (i32.or - (i32.const 0) + (drop + (call $_i64Subtract + (get_local $3) + (get_local $8) + (tee_local $0 (i32.or - (i32.shl - (get_local $11) - (i32.const 1) + (i32.const 0) + (i32.or + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.shr_u + (get_local $9) + (i32.const 31) + ) ) + ) + ) + (tee_local $9 + (i32.or (i32.shr_u - (get_local $9) + (get_local $11) (i32.const 31) ) - ) - ) - ) - (set_local $9 - (i32.or - (i32.shr_u - (get_local $11) - (i32.const 31) - ) - (i32.shl - (get_local $13) - (i32.const 1) + (i32.shl + (get_local $13) + (i32.const 1) + ) ) ) ) ) (set_local $7 (i32.and - (set_local $14 + (tee_local $14 (i32.or (i32.shr_s - (set_local $5 + (tee_local $5 (i32.load (i32.const 168) ) @@ -19389,7 +19293,7 @@ ) (if (i32.eq - (set_local $12 + (tee_local $12 (i32.sub (get_local $12) (i32.const 1) @@ -19419,7 +19323,7 @@ (set_local $3 (i32.or (get_local $6) - (set_local $2 + (tee_local $2 (i32.const 0) ) ) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 13c8baec6..f0e3e992d 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -271,9 +271,11 @@ ) (call_import $abort) ) - (call $_printf - (i32.const 672) - (get_local $0) + (drop + (call $_printf + (i32.const 672) + (get_local $0) + ) ) (i32.store (i32.const 8) @@ -285,9 +287,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (i32.load - (i32.const 8) - ) (f64.store (i32.load (i32.const 24) @@ -296,14 +295,14 @@ ) (set_local $2 (call $_bitshift64Lshr - (set_local $3 + (tee_local $3 (i32.load (i32.load (i32.const 24) ) ) ) - (set_local $4 + (tee_local $4 (i32.load offset=4 (i32.load (i32.const 24) @@ -313,16 +312,13 @@ (i32.const 52) ) ) - (i32.load - (i32.const 168) - ) (block $switch$0 (block $switch-default$3 (block $switch-case$2 (block $switch-case$1 (br_table $switch-case$1 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-default$3 $switch-case$2 $switch-default$3 (i32.sub - (set_local $2 + (tee_local $2 (i32.and (get_local $2) (i32.const 2047) @@ -400,9 +396,6 @@ ) ) (func $_frexpl (param $0 f64) (param $1 i32) (result f64) - (i32.load - (i32.const 8) - ) (call $_frexp (get_local $0) (get_local $1) @@ -414,9 +407,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (i32.load - (i32.const 8) - ) (set_local $1 (i32.const 0) ) @@ -443,7 +433,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -463,7 +453,6 @@ ) (br $while-out$0) ) - (get_local $1) ) (br $while-in$1) ) @@ -533,7 +522,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const -1) @@ -562,9 +551,6 @@ (get_local $5) ) (func $___errno_location (result i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (i32.load @@ -607,7 +593,7 @@ (call_import $abort) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -752,7 +738,7 @@ (call_import $abort) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -769,7 +755,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -812,9 +798,6 @@ (func $_fflush (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.eq @@ -842,15 +825,14 @@ (i32.const 44) ) (if - (i32.eq - (set_local $1 + (i32.ne + (tee_local $1 (i32.load (i32.const 40) ) ) (i32.const 0) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -900,7 +882,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=56 (get_local $1) ) @@ -996,7 +978,7 @@ (call_import $abort) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $2) ) (get_local $1) @@ -1017,9 +999,6 @@ (get_local $0) ) (func $___lockfile (param $0 i32) (result i32) - (i32.load - (i32.const 8) - ) (i32.const 0) ) (func $___unlockfile (param $0 i32) @@ -1076,15 +1055,15 @@ (get_local $8) ) (i32.store - (set_local $4 + (tee_local $4 (i32.add (get_local $8) (i32.const 32) ) ) - (set_local $3 + (tee_local $3 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 28) @@ -1095,10 +1074,10 @@ ) (i32.store offset=4 (get_local $4) - (set_local $3 + (tee_local $3 (i32.sub (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $0) (i32.const 20) @@ -1142,7 +1121,7 @@ (if (i32.eq (get_local $3) - (set_local $5 + (tee_local $5 (if (i32.eq (i32.load @@ -1242,7 +1221,7 @@ (if (i32.gt_u (get_local $5) - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $4) ) @@ -1251,7 +1230,7 @@ (block (i32.store (get_local $7) - (set_local $3 + (tee_local $3 (i32.load (get_local $13) ) @@ -1348,7 +1327,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $1 + (tee_local $1 (i32.load (get_local $13) ) @@ -1476,8 +1455,8 @@ ) (set_local $7 (i32.add - (set_local $4 - (set_local $9 + (tee_local $4 + (tee_local $9 (i32.add (get_local $3) (i32.const 80) @@ -1494,7 +1473,7 @@ ) (br_if $do-in$1 (i32.lt_s - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const 4) @@ -1540,7 +1519,7 @@ ) (set_local $4 (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -1574,7 +1553,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $0) (i32.const 48) @@ -1586,7 +1565,7 @@ (block (set_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 44) @@ -1599,7 +1578,7 @@ (get_local $6) ) (i32.store - (set_local $13 + (tee_local $13 (i32.add (get_local $0) (i32.const 28) @@ -1608,7 +1587,7 @@ (get_local $6) ) (i32.store - (set_local $11 + (tee_local $11 (i32.add (get_local $0) (i32.const 20) @@ -1621,7 +1600,7 @@ (i32.const 80) ) (i32.store - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 16) @@ -1648,19 +1627,21 @@ ) (get_local $1) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (set_local $1 (select @@ -1709,7 +1690,7 @@ (i32.const -1) (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -1752,14 +1733,11 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 16) @@ -1810,9 +1788,9 @@ (i32.lt_u (i32.sub (get_local $3) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -1846,122 +1824,124 @@ (br $label$break$L5) ) ) - (call $_memcpy - (block $label$break$L10 - (if - (i32.gt_s - (i32.shr_s - (i32.shl - (i32.load8_s offset=75 - (get_local $2) + (drop + (call $_memcpy + (block $label$break$L10 + (if + (i32.gt_s + (i32.shr_s + (i32.shl + (i32.load8_s offset=75 + (get_local $2) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.const -1) - ) - (block - (set_local $3 - (get_local $1) + (i32.const -1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eq - (get_local $3) - (i32.const 0) - ) - (block - (set_local $2 + (block + (set_local $3 + (get_local $1) + ) + (loop $while-out$2 $while-in$3 + (if + (i32.eq + (get_local $3) (i32.const 0) ) - (br $label$break$L10 - (get_local $6) + (block + (set_local $2 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $6) + ) ) ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (i32.add - (get_local $0) - (set_local $4 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $4 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) + ) + (br $while-out$2) + (set_local $3 + (get_local $4) ) - (i32.const 10) - ) - (br $while-out$2) - (set_local $3 - (get_local $4) ) + (br $while-in$3) ) - (br $while-in$3) - ) - (if - (i32.lt_u - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $2) + (if + (i32.lt_u + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $2) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) + (get_local $2) + (get_local $0) + (get_local $3) ) - (get_local $2) - (get_local $0) (get_local $3) ) + (block + (set_local $4 + (get_local $3) + ) + (br $label$break$L5) + ) + ) + (set_local $2 (get_local $3) ) - (block - (set_local $4 + (set_local $1 + (i32.sub + (get_local $1) (get_local $3) ) - (br $label$break$L5) ) - ) - (set_local $2 - (get_local $3) - ) - (set_local $1 - (i32.sub - (get_local $1) - (get_local $3) + (set_local $0 + (i32.add + (get_local $0) + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add - (get_local $0) - (get_local $3) + (i32.load + (get_local $5) ) ) - (i32.load - (get_local $5) - ) - ) - (block - (set_local $2 - (i32.const 0) + (block + (set_local $2 + (i32.const 0) + ) + (get_local $6) ) - (get_local $6) ) ) + (get_local $0) + (get_local $1) ) - (get_local $0) - (get_local $1) ) (i32.store (get_local $5) @@ -1986,18 +1966,15 @@ (func $___towrite (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (i32.load - (i32.const 8) - ) (set_local $1 (i32.and (i32.or (i32.add - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.load8_s - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 74) @@ -2023,7 +2000,7 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -2043,7 +2020,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -2077,9 +2054,6 @@ ) ) (func $_wcrtomb (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.eq @@ -2287,9 +2261,6 @@ ) ) (func $_wctomb (param $0 i32) (param $1 i32) (result i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (get_local $0) @@ -2318,9 +2289,6 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (i32.load - (i32.const 8) - ) (set_local $16 (i32.and (get_local $1) @@ -2330,7 +2298,7 @@ (block $label$break$L1 (if (i32.and - (set_local $6 + (tee_local $6 (i32.ne (get_local $2) (i32.const 0) @@ -2392,9 +2360,9 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.ne - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const -1) @@ -2405,7 +2373,7 @@ ) (i32.ne (i32.and - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const 1) @@ -2501,7 +2469,7 @@ ) (i32.shr_s (i32.shl - (set_local $0 + (tee_local $0 (i32.and (get_local $1) (i32.const 255) @@ -2537,7 +2505,7 @@ (loop $while-out$5 $while-in$6 (set_local $1 (i32.add - (set_local $6 + (tee_local $6 (i32.xor (i32.load (get_local $5) @@ -2572,7 +2540,7 @@ ) (if (i32.gt_u - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const -4) @@ -2685,7 +2653,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $10) (i32.const -1) @@ -2727,9 +2695,6 @@ ) ) (func $___syscall_ret (param $0 i32) (result i32) - (i32.load - (i32.const 8) - ) (if (i32.gt_u (get_local $0) @@ -2755,13 +2720,10 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (i32.load - (i32.const 8) - ) (if (i32.gt_u (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -2769,7 +2731,7 @@ ) ) (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 28) @@ -2778,19 +2740,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) - ) - (i32.const 7) - ) - (i32.const 2) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 7) + ) + (i32.const 2) + ) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (if (i32.eq @@ -2819,9 +2783,9 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 4) @@ -2829,9 +2793,9 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 8) @@ -2886,9 +2850,6 @@ (get_local $1) ) (func $_cleanup (param $0 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (i32.load offset=68 @@ -2911,8 +2872,8 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) - (local $15 f64) + (local $14 f64) + (local $15 i32) (local $16 i32) (local $17 i32) (local $18 i32) @@ -3028,9 +2989,9 @@ ) ) (set_local $71 - (set_local $28 + (tee_local $28 (i32.add - (set_local $5 + (tee_local $5 (i32.add (get_local $31) (i32.const 536) @@ -3048,7 +3009,7 @@ ) (set_local $76 (i32.add - (set_local $73 + (tee_local $73 (i32.add (get_local $31) (i32.const 8) @@ -3059,7 +3020,7 @@ ) (set_local $52 (i32.add - (set_local $5 + (tee_local $5 (i32.add (get_local $31) (i32.const 576) @@ -3076,11 +3037,11 @@ ) (set_local $77 (i32.sub - (set_local $40 + (tee_local $40 (get_local $52) ) - (set_local $64 - (set_local $29 + (tee_local $64 + (tee_local $29 (i32.add (get_local $31) (i32.const 588) @@ -3103,7 +3064,7 @@ ) (set_local $81 (i32.add - (set_local $80 + (tee_local $80 (i32.add (get_local $31) (i32.const 24) @@ -3113,7 +3074,7 @@ ) ) (set_local $75 - (set_local $45 + (tee_local $45 (i32.add (get_local $29) (i32.const 9) @@ -3172,7 +3133,7 @@ (i32.eq (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s (get_local $20) ) @@ -3237,7 +3198,7 @@ ) (set_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 1) @@ -3291,7 +3252,7 @@ (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $54) (i32.const 2) @@ -3369,13 +3330,13 @@ (set_local $7 (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $41) (i32.const 1) @@ -3395,14 +3356,14 @@ (block (set_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (select (i32.add (get_local $41) (i32.const 3) ) (get_local $5) - (set_local $7 + (tee_local $7 (i32.eq (i32.shr_s (i32.shl @@ -3451,7 +3412,7 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.shr_s (i32.shl (get_local $1) @@ -3506,12 +3467,12 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 1) @@ -3561,12 +3522,12 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 1) @@ -3606,33 +3567,28 @@ ) (i32.const 10) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const -48) ) + (i32.const 3) ) ) ) ) - (i32.load offset=4 - (get_local $1) - ) (set_local $66 (i32.const 1) ) @@ -3643,7 +3599,7 @@ ) ) (set_local $56 - (get_local $5) + (get_local $1) ) ) (set_local $12 @@ -3694,7 +3650,7 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -3766,7 +3722,7 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl @@ -3799,12 +3755,12 @@ ) (if (i32.ge_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -3879,9 +3835,9 @@ (i32.ne (i32.shr_s (i32.shl - (set_local $1 + (tee_local $1 (i32.load8_s - (set_local $5 + (tee_local $5 (i32.add (get_local $9) (i32.const 1) @@ -3898,7 +3854,7 @@ (block (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl @@ -3941,12 +3897,12 @@ ) (if (i32.ge_u - (set_local $6 + (tee_local $6 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -3977,12 +3933,12 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl (i32.load8_s - (set_local $6 + (tee_local $6 (i32.add (get_local $9) (i32.const 2) @@ -4022,35 +3978,30 @@ ) (i32.const 10) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const -48) ) + (i32.const 3) ) ) ) ) - (i32.load offset=4 - (get_local $1) - ) (set_local $10 - (get_local $5) + (get_local $1) ) (br $label$break$L46 (i32.add @@ -4078,7 +4029,7 @@ (block (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -4126,7 +4077,7 @@ (loop $while-out$19 $while-in$20 (if (i32.gt_u - (set_local $1 + (tee_local $1 (i32.add (i32.shr_s (i32.shl @@ -4158,9 +4109,9 @@ (if (i32.lt_u (i32.add - (set_local $5 + (tee_local $5 (i32.and - (set_local $1 + (tee_local $1 (i32.load8_s (i32.add (i32.add @@ -4262,7 +4213,7 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $3) (i32.shl @@ -4279,7 +4230,7 @@ ) ) (i32.store - (set_local $7 + (tee_local $7 (get_local $19) ) (get_local $5) @@ -4349,7 +4300,7 @@ ) (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.load8_s @@ -4369,7 +4320,7 @@ (set_local $18 (select (get_local $8) - (set_local $7 + (tee_local $7 (i32.and (get_local $8) (i32.const -65537) @@ -4400,7 +4351,7 @@ (block $switch-case$34 (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 (i32.sub - (set_local $26 + (tee_local $26 (select (i32.and (get_local $1) @@ -4464,7 +4415,7 @@ (br $label$continue$L1) ) (i32.store - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4553,7 +4504,7 @@ (br $label$continue$L1) ) (i32.store - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4636,9 +4587,9 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -4646,7 +4597,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $1) ) @@ -4663,7 +4614,7 @@ ) (loop $while-out$38 $while-in$39 (i32.store8 - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -1) @@ -4683,7 +4634,7 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (call $_bitshift64Lshr (get_local $5) (get_local $1) @@ -4693,7 +4644,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.const 168) ) @@ -4738,7 +4689,7 @@ (set_local $5 (i32.lt_s (get_local $10) - (set_local $1 + (tee_local $1 (i32.add (i32.sub (get_local $71) @@ -4776,14 +4727,14 @@ ) (set_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) ) (if (i32.lt_s - (set_local $33 + (tee_local $33 (i32.load offset=4 (get_local $1) ) @@ -4805,7 +4756,7 @@ ) ) (i32.store - (set_local $33 + (tee_local $33 (get_local $19) ) (get_local $1) @@ -4847,7 +4798,7 @@ (i32.const 4091) (i32.const 4093) (i32.eq - (set_local $6 + (tee_local $6 (i32.and (get_local $18) (i32.const 1) @@ -4892,7 +4843,7 @@ ) (set_local $33 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -4913,20 +4864,15 @@ ) (br $switch$24) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (i32.load offset=4 - (get_local $1) - ) (i32.store8 (get_local $72) (i32.and - (get_local $5) + (get_local $1) (i32.const 255) ) ) @@ -4964,7 +4910,7 @@ ) (set_local $5 (i32.ne - (set_local $1 + (tee_local $1 (i32.load (get_local $19) ) @@ -4984,19 +4930,14 @@ ) (br $switch$24) ) - (set_local $5 + (set_local $1 (i32.load - (set_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (i32.load offset=4 - (get_local $1) - ) (i32.store (get_local $73) - (get_local $5) + (get_local $1) ) (i32.store (get_local $76) @@ -5043,7 +4984,7 @@ ) (br $switch$24) ) - (set_local $15 + (set_local $14 (f64.load (get_local $19) ) @@ -5056,12 +4997,7 @@ (i32.load (i32.const 24) ) - (get_local $15) - ) - (i32.load - (i32.load - (i32.const 24) - ) + (get_local $14) ) (set_local $51 (if @@ -5077,9 +5013,9 @@ (set_local $39 (i32.const 4108) ) - (set_local $15 + (set_local $14 (f64.neg - (get_local $15) + (get_local $14) ) ) (i32.const 1) @@ -5098,7 +5034,7 @@ (i32.const 4109) (i32.const 4114) (i32.eq - (set_local $1 + (tee_local $1 (i32.and (get_local $18) (i32.const 1) @@ -5123,12 +5059,7 @@ (i32.load (i32.const 24) ) - (get_local $15) - ) - (i32.load - (i32.load - (i32.const 24) - ) + (get_local $14) ) (set_local $20 (get_local $9) @@ -5138,7 +5069,7 @@ (if (i32.or (i32.lt_u - (set_local $1 + (tee_local $1 (i32.and (i32.load offset=4 (i32.load @@ -5160,12 +5091,12 @@ ) (block (if - (set_local $5 + (tee_local $5 (f64.ne - (set_local $15 + (tee_local $14 (f64.mul (call $_frexpl - (get_local $15) + (get_local $14) (get_local $25) ) (f64.const 2) @@ -5186,7 +5117,7 @@ ) (if (i32.eq - (set_local $14 + (tee_local $15 (i32.or (get_local $26) (i32.const 32) @@ -5203,7 +5134,7 @@ (i32.const 9) ) (i32.eq - (set_local $6 + (tee_local $6 (i32.and (get_local $26) (i32.const 32) @@ -5219,7 +5150,7 @@ (i32.const 2) ) ) - (set_local $15 + (set_local $14 (if (i32.or (i32.gt_u @@ -5227,7 +5158,7 @@ (i32.const 11) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.sub (i32.const 12) (get_local $10) @@ -5236,7 +5167,7 @@ (i32.const 0) ) ) - (get_local $15) + (get_local $14) (block (set_local $30 (f64.const 8) @@ -5250,7 +5181,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -5268,7 +5199,7 @@ (get_local $30) (f64.sub (f64.neg - (get_local $15) + (get_local $14) ) (get_local $30) ) @@ -5276,7 +5207,7 @@ ) (f64.sub (f64.add - (get_local $15) + (get_local $14) (get_local $30) ) (get_local $30) @@ -5299,7 +5230,7 @@ ) (set_local $5 (i32.lt_s - (set_local $1 + (tee_local $1 (i32.load (get_local $25) ) @@ -5311,7 +5242,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $8 + (tee_local $8 (select (i32.sub (i32.const 0) @@ -5330,10 +5261,10 @@ ) (i32.store8 (i32.add - (set_local $5 + (tee_local $5 (if (i32.eq - (set_local $5 + (tee_local $5 (call $_fmt_u (get_local $8) (get_local $5) @@ -5369,7 +5300,7 @@ ) ) (i32.store8 - (set_local $8 + (tee_local $8 (i32.add (get_local $5) (i32.const -2) @@ -5409,9 +5340,9 @@ (i32.and (i32.load8_s (i32.add - (set_local $1 + (tee_local $1 (i32.trunc_s/f64 - (get_local $15) + (get_local $14) ) ) (i32.const 4075) @@ -5424,10 +5355,10 @@ (i32.const 255) ) ) - (set_local $15 + (set_local $14 (f64.mul (f64.sub - (get_local $15) + (get_local $14) (f64.convert_s/i32 (get_local $1) ) @@ -5440,7 +5371,7 @@ (if (i32.eq (i32.sub - (set_local $1 + (tee_local $1 (i32.add (get_local $11) (i32.const 1) @@ -5458,7 +5389,7 @@ (i32.and (get_local $5) (f64.eq - (get_local $15) + (get_local $14) (f64.const 0) ) ) @@ -5479,7 +5410,7 @@ ) (if (f64.eq - (get_local $15) + (get_local $14) (f64.const 0) ) (block @@ -5510,9 +5441,9 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $5 + (tee_local $5 (i32.add - (set_local $6 + (tee_local $6 (select (i32.sub (i32.add @@ -5591,7 +5522,7 @@ (get_local $6) (i32.add (get_local $1) - (set_local $1 + (tee_local $1 (i32.sub (get_local $40) (get_local $8) @@ -5651,7 +5582,7 @@ ) ) (set_local $62 - (set_local $9 + (tee_local $9 (select (get_local $80) (get_local $81) @@ -5661,7 +5592,7 @@ (block (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $25) @@ -5670,9 +5601,9 @@ ) ) ) - (set_local $15 + (set_local $14 (f64.mul - (get_local $15) + (get_local $14) (f64.const 268435456) ) ) @@ -5693,9 +5624,9 @@ (loop $while-out$66 $while-in$67 (i32.store (get_local $7) - (set_local $5 + (tee_local $5 (i32.trunc_s/f64 - (get_local $15) + (get_local $14) ) ) ) @@ -5707,10 +5638,10 @@ ) (if (f64.eq - (set_local $15 + (tee_local $14 (f64.mul (f64.sub - (get_local $15) + (get_local $14) (f64.convert_u/i32 (get_local $5) ) @@ -5731,7 +5662,7 @@ ) (if (i32.gt_s - (set_local $5 + (tee_local $5 (i32.load (get_local $25) ) @@ -5760,7 +5691,7 @@ (block $do-once$70 (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $13) (i32.const -4) @@ -5779,7 +5710,7 @@ (loop $while-out$72 $while-in$73 (set_local $6 (call $___uremdi3 - (set_local $5 + (tee_local $5 (call $_i64Add (call $_bitshift64Shl (i32.load @@ -5795,7 +5726,7 @@ (i32.const 0) ) ) - (set_local $7 + (tee_local $7 (i32.load (i32.const 168) ) @@ -5804,9 +5735,6 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (i32.store (get_local $10) (get_local $6) @@ -5819,12 +5747,9 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (if (i32.lt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $10) (i32.const -4) @@ -5847,7 +5772,7 @@ ) ) (i32.store - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const -4) @@ -5871,7 +5796,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $13) (i32.const -4) @@ -5889,7 +5814,7 @@ ) (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.sub (i32.load (get_local $25) @@ -5943,7 +5868,7 @@ ) (set_local $10 (i32.eq - (get_local $14) + (get_local $15) (i32.const 102) ) ) @@ -5953,7 +5878,7 @@ (loop $while-out$76 $while-in$77 (set_local $5 (i32.gt_s - (set_local $6 + (tee_local $6 (i32.sub (i32.const 0) (get_local $5) @@ -6001,7 +5926,7 @@ (loop $while-out$80 $while-in$81 (set_local $6 (i32.and - (set_local $5 + (tee_local $5 (i32.load (get_local $17) ) @@ -6027,7 +5952,7 @@ ) (if (i32.ge_u - (set_local $17 + (tee_local $17 (i32.add (get_local $17) (i32.const 4) @@ -6096,7 +6021,7 @@ (i32.shr_s (i32.sub (get_local $23) - (set_local $7 + (tee_local $7 (select (get_local $9) (get_local $11) @@ -6124,7 +6049,7 @@ ) (i32.store (get_local $25) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $25) @@ -6184,7 +6109,7 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load (get_local $7) ) @@ -6211,7 +6136,7 @@ (if (i32.lt_u (get_local $5) - (set_local $8 + (tee_local $8 (i32.mul (get_local $8) (i32.const 10) @@ -6236,7 +6161,7 @@ (set_local $7 (if (i32.lt_s - (set_local $5 + (tee_local $5 (i32.add (i32.sub (get_local $1) @@ -6244,7 +6169,7 @@ (get_local $13) (i32.const 0) (i32.ne - (get_local $14) + (get_local $15) (i32.const 102) ) ) @@ -6252,15 +6177,15 @@ (i32.shr_s (i32.shl (i32.and - (set_local $70 + (tee_local $70 (i32.ne (get_local $1) (i32.const 0) ) ) - (set_local $8 + (tee_local $8 (i32.eq - (get_local $14) + (get_local $15) (i32.const 103) ) ) @@ -6296,7 +6221,7 @@ (i32.add (i32.and (i32.div_s - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 9216) @@ -6314,7 +6239,7 @@ ) (if (i32.lt_s - (set_local $11 + (tee_local $11 (i32.add (i32.and (i32.rem_s @@ -6341,7 +6266,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (i32.add (get_local $11) (i32.const 1) @@ -6367,7 +6292,7 @@ (if (i32.eqz (i32.and - (set_local $11 + (tee_local $11 (i32.eq (i32.add (get_local $6) @@ -6377,10 +6302,10 @@ ) ) (i32.eq - (set_local $14 + (tee_local $15 (i32.and (i32.rem_u - (set_local $5 + (tee_local $5 (i32.load (get_local $6) ) @@ -6395,7 +6320,7 @@ ) ) (block - (set_local $15 + (set_local $14 (select (f64.const 9007199254740992) (f64.const 9007199254740994) @@ -6417,8 +6342,8 @@ (set_local $30 (if (i32.lt_u - (get_local $14) - (set_local $10 + (get_local $15) + (tee_local $10 (i32.and (i32.div_s (get_local $17) @@ -6435,21 +6360,21 @@ (i32.and (get_local $11) (i32.eq - (get_local $14) + (get_local $15) (get_local $10) ) ) ) ) ) - (set_local $15 + (set_local $14 (block $do-once$90 (if (i32.eq (get_local $51) (i32.const 0) ) - (get_local $15) + (get_local $14) (block (if (i32.ne @@ -6465,7 +6390,7 @@ (i32.const 45) ) (br $do-once$90 - (get_local $15) + (get_local $14) ) ) (set_local $30 @@ -6474,7 +6399,7 @@ ) ) (f64.neg - (get_local $15) + (get_local $14) ) ) ) @@ -6482,26 +6407,26 @@ ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.sub (get_local $5) - (get_local $14) + (get_local $15) ) ) ) (if (f64.eq (f64.add - (get_local $15) + (get_local $14) (get_local $30) ) - (get_local $15) + (get_local $14) ) (br $do-once$88) ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (get_local $17) @@ -6521,7 +6446,7 @@ (set_local $7 (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -4) @@ -6531,7 +6456,7 @@ ) (block (i32.store - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const -4) @@ -6546,7 +6471,7 @@ ) (i32.store (get_local $6) - (set_local $5 + (tee_local $5 (i32.add (i32.load (get_local $6) @@ -6579,7 +6504,7 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load (get_local $7) ) @@ -6606,7 +6531,7 @@ (if (i32.lt_u (get_local $5) - (set_local $10 + (tee_local $10 (i32.mul (get_local $10) (i32.const 10) @@ -6628,7 +6553,7 @@ (set_local $6 (i32.gt_u (get_local $27) - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const 4) @@ -6678,7 +6603,7 @@ (if (i32.eq (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const -4) @@ -6711,7 +6636,7 @@ (if (i32.and (i32.gt_s - (set_local $1 + (tee_local $1 (i32.add (i32.xor (i32.and @@ -6761,7 +6686,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.and (get_local $18) (i32.const 8) @@ -6770,7 +6695,7 @@ (i32.const 0) ) (block - (set_local $14 + (set_local $15 (get_local $8) ) (set_local $26 @@ -6787,7 +6712,7 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.add (get_local $23) @@ -6842,7 +6767,7 @@ (i32.and (i32.rem_u (get_local $1) - (set_local $5 + (tee_local $5 (i32.mul (get_local $5) (i32.const 10) @@ -6889,7 +6814,7 @@ (block (set_local $1 (i32.lt_s - (set_local $5 + (tee_local $5 (i32.sub (get_local $1) (get_local $6) @@ -6901,7 +6826,7 @@ (set_local $5 (i32.lt_s (get_local $8) - (set_local $1 + (tee_local $1 (select (i32.const 0) (get_local $5) @@ -6910,7 +6835,7 @@ ) ) ) - (set_local $14 + (set_local $15 (select (get_local $8) (get_local $1) @@ -6925,7 +6850,7 @@ (block (set_local $1 (i32.lt_s - (set_local $5 + (tee_local $5 (i32.sub (i32.add (get_local $1) @@ -6940,7 +6865,7 @@ (set_local $5 (i32.lt_s (get_local $8) - (set_local $1 + (tee_local $1 (select (i32.const 0) (get_local $5) @@ -6949,7 +6874,7 @@ ) ) ) - (set_local $14 + (set_local $15 (select (get_local $8) (get_local $1) @@ -6964,7 +6889,7 @@ ) ) (block - (set_local $14 + (set_local $15 (get_local $1) ) (i32.and @@ -6978,9 +6903,9 @@ (set_local $17 (i32.and (i32.ne - (set_local $1 + (tee_local $1 (i32.or - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -6991,7 +6916,7 @@ ) (set_local $13 (if - (set_local $10 + (tee_local $10 (i32.eq (i32.or (get_local $26) @@ -7018,7 +6943,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $6 + (tee_local $6 (select (get_local $27) (get_local $13) @@ -7039,7 +6964,7 @@ (i32.lt_s (i32.sub (get_local $40) - (set_local $5 + (tee_local $5 (call $_fmt_u (get_local $6) (get_local $5) @@ -7051,7 +6976,7 @@ ) (loop $while-out$104 $while-in$105 (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -1) @@ -7060,19 +6985,17 @@ (i32.const 48) ) (if - (i32.lt_s + (i32.ge_s (i32.sub (get_local $40) (get_local $5) ) (i32.const 2) ) - (get_local $5) (br $while-out$104) ) (br $while-in$105) ) - (get_local $5) ) (i32.store8 (i32.add @@ -7094,7 +7017,7 @@ ) ) (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -2) @@ -7119,7 +7042,7 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $6 + (tee_local $6 (i32.add (i32.add (i32.add @@ -7127,7 +7050,7 @@ (get_local $51) (i32.const 1) ) - (get_local $14) + (get_local $15) ) (get_local $17) ) @@ -7167,7 +7090,7 @@ (get_local $10) (block (set_local $7 - (set_local $8 + (tee_local $8 (select (get_local $9) (get_local $7) @@ -7178,7 +7101,7 @@ ) ) ) - (loop $while-out$108 $while-in$109 + (loop $while-out$114 $while-in$115 (set_local $5 (call $_fmt_u (i32.load @@ -7188,7 +7111,7 @@ (get_local $45) ) ) - (block $do-once$110 + (block $do-once$116 (if (i32.eq (get_local $7) @@ -7200,7 +7123,7 @@ (get_local $5) (get_local $45) ) - (br $do-once$110) + (br $do-once$116) ) (i32.store8 (get_local $53) @@ -7212,16 +7135,15 @@ ) (block (if - (i32.gt_u + (i32.le_u (get_local $5) (get_local $29) ) - (get_local $5) - (br $do-once$110) + (br $do-once$116) ) - (loop $while-out$112 $while-in$113 + (loop $while-out$118 $while-in$119 (i32.store8 - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const -1) @@ -7230,14 +7152,13 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $5) (get_local $29) ) - (get_local $5) - (br $while-out$112) + (br $while-out$118) ) - (br $while-in$113) + (br $while-in$119) ) ) ) @@ -7263,7 +7184,7 @@ ) (if (i32.gt_u - (set_local $7 + (tee_local $7 (i32.add (get_local $7) (i32.const 4) @@ -7275,20 +7196,19 @@ (set_local $5 (get_local $7) ) - (br $while-out$108) + (br $while-out$114) ) - (get_local $7) ) - (br $while-in$109) + (br $while-in$115) ) - (block $do-once$114 + (block $do-once$120 (if (i32.ne (get_local $1) (i32.const 0) ) (block - (br_if $do-once$114 + (br_if $do-once$120 (i32.ne (i32.and (i32.load @@ -7310,7 +7230,7 @@ (if (i32.and (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 0) ) (i32.lt_u @@ -7318,10 +7238,10 @@ (get_local $23) ) ) - (loop $while-out$116 $while-in$117 + (loop $while-out$122 $while-in$123 (if (i32.gt_u - (set_local $1 + (tee_local $1 (call $_fmt_u (i32.load (get_local $5) @@ -7332,9 +7252,9 @@ ) (get_local $29) ) - (loop $while-out$118 $while-in$119 + (loop $while-out$124 $while-in$125 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -7343,16 +7263,14 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $1) (get_local $29) ) - (get_local $1) - (br $while-out$118) + (br $while-out$124) ) - (br $while-in$119) + (br $while-in$125) ) - (get_local $1) ) (if (i32.eq @@ -7368,9 +7286,9 @@ (get_local $1) (select (i32.const 9) - (get_local $14) + (get_local $15) (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 9) ) ) @@ -7379,18 +7297,18 @@ ) (set_local $1 (i32.add - (get_local $14) + (get_local $15) (i32.const -9) ) ) (if (i32.and (i32.gt_s - (get_local $14) + (get_local $15) (i32.const 9) ) (i32.lt_u - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 4) @@ -7399,25 +7317,24 @@ (get_local $23) ) ) - (set_local $14 + (set_local $15 (get_local $1) ) (block - (set_local $14 + (set_local $15 (get_local $1) ) - (br $while-out$116) + (br $while-out$122) ) ) - (br $while-in$117) + (br $while-in$123) ) - (get_local $14) ) (call $_pad (get_local $0) (i32.const 48) (i32.add - (get_local $14) + (get_local $15) (i32.const 9) ) (i32.const 9) @@ -7437,7 +7354,7 @@ ) (if (i32.gt_s - (get_local $14) + (get_local $15) (i32.const -1) ) (block @@ -7450,11 +7367,11 @@ (set_local $5 (get_local $7) ) - (loop $while-out$120 $while-in$121 + (loop $while-out$108 $while-in$109 (set_local $8 (if (i32.eq - (set_local $1 + (tee_local $1 (call $_fmt_u (i32.load (get_local $5) @@ -7475,7 +7392,7 @@ (get_local $1) ) ) - (block $do-once$122 + (block $do-once$110 (if (i32.eq (get_local $5) @@ -7508,11 +7425,11 @@ (i32.and (get_local $9) (i32.lt_s - (get_local $14) + (get_local $15) (i32.const 1) ) ) - (br $do-once$122) + (br $do-once$110) ) (if (i32.ne @@ -7524,7 +7441,7 @@ ) (i32.const 0) ) - (br $do-once$122) + (br $do-once$110) ) (call $___fwritex (i32.const 4143) @@ -7545,12 +7462,12 @@ (set_local $1 (get_local $8) ) - (br $do-once$122) + (br $do-once$110) ) ) - (loop $while-out$124 $while-in$125 + (loop $while-out$112 $while-in$113 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -7559,14 +7476,13 @@ (i32.const 48) ) (if - (i32.gt_u + (i32.le_u (get_local $1) (get_local $29) ) - (get_local $1) - (br $while-out$124) + (br $while-out$112) ) - (br $while-in$125) + (br $while-in$113) ) ) ) @@ -7591,9 +7507,9 @@ (get_local $1) (select (get_local $8) - (get_local $14) + (get_local $15) (i32.gt_s - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -7604,7 +7520,7 @@ (i32.eqz (i32.and (i32.lt_u - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 4) @@ -7613,9 +7529,9 @@ (get_local $11) ) (i32.gt_s - (set_local $14 + (tee_local $15 (i32.sub - (get_local $14) + (get_local $15) (get_local $8) ) ) @@ -7623,18 +7539,17 @@ ) ) ) - (br $while-out$120) + (br $while-out$108) ) - (br $while-in$121) + (br $while-in$109) ) ) - (get_local $14) ) (call $_pad (get_local $0) (i32.const 48) (i32.add - (get_local $14) + (get_local $15) (i32.const 18) ) (i32.const 18) @@ -7686,7 +7601,7 @@ (select (i32.const 4127) (i32.const 4131) - (set_local $8 + (tee_local $8 (i32.ne (i32.and (get_local $26) @@ -7701,11 +7616,11 @@ (select (i32.const 0) (get_local $51) - (set_local $1 + (tee_local $1 (i32.or (f64.ne - (get_local $15) - (get_local $15) + (get_local $14) + (get_local $14) ) (i32.const 0) ) @@ -7727,7 +7642,7 @@ (get_local $0) (i32.const 32) (get_local $16) - (set_local $5 + (tee_local $5 (i32.add (get_local $6) (i32.const 3) @@ -7741,7 +7656,7 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -7751,10 +7666,12 @@ (i32.const 0) ) (block - (call $___fwritex - (get_local $39) - (get_local $6) - (get_local $0) + (drop + (call $___fwritex + (get_local $39) + (get_local $6) + (get_local $0) + ) ) (i32.load (get_local $0) @@ -7835,9 +7752,9 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -7845,7 +7762,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=4 (get_local $1) ) @@ -7875,9 +7792,9 @@ (set_local $6 (get_local $28) ) - (loop $while-out$129 $while-in$130 + (loop $while-out$133 $while-in$134 (i32.store8 - (set_local $6 + (tee_local $6 (i32.add (get_local $6) (i32.const -1) @@ -7905,7 +7822,7 @@ (if (i32.and (i32.eq - (set_local $5 + (tee_local $5 (call $_bitshift64Lshr (get_local $5) (get_local $1) @@ -7915,7 +7832,7 @@ (i32.const 0) ) (i32.eq - (set_local $1 + (tee_local $1 (i32.load (i32.const 168) ) @@ -7923,9 +7840,9 @@ (i32.const 0) ) ) - (br $while-out$129) + (br $while-out$133) ) - (br $while-in$130) + (br $while-in$134) ) (if (i32.or @@ -7939,7 +7856,7 @@ (i32.and (i32.eq (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -8040,7 +7957,7 @@ ) (set_local $5 (i32.eq - (set_local $1 + (tee_local $1 (call $_memchr (get_local $50) (i32.const 0) @@ -8103,22 +8020,22 @@ (get_local $19) ) ) - (loop $while-out$131 $while-in$132 + (loop $while-out$129 $while-in$130 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $6) ) ) (i32.const 0) ) - (br $while-out$131) + (br $while-out$129) ) (if (i32.or (i32.lt_s - (set_local $5 + (tee_local $5 (call $_wctomb (get_local $63) (get_local $1) @@ -8134,7 +8051,7 @@ ) ) ) - (br $while-out$131) + (br $while-out$129) ) (set_local $6 (i32.add @@ -8145,7 +8062,7 @@ (if (i32.gt_u (get_local $69) - (set_local $1 + (tee_local $1 (i32.add (get_local $5) (get_local $7) @@ -8159,10 +8076,10 @@ (set_local $7 (get_local $1) ) - (br $while-out$131) + (br $while-out$129) ) ) - (br $while-in$132) + (br $while-in$130) ) (if (i32.lt_s @@ -8205,10 +8122,10 @@ (get_local $19) ) ) - (loop $while-out$133 $while-in$134 + (loop $while-out$131 $while-in$132 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $8) ) @@ -8233,9 +8150,9 @@ ) (if (i32.gt_s - (set_local $1 + (tee_local $1 (i32.add - (set_local $5 + (tee_local $5 (call $_wctomb (get_local $63) (get_local $1) @@ -8287,10 +8204,10 @@ (set_local $12 (i32.const 98) ) - (br $while-out$133) + (br $while-out$131) ) ) - (br $while-in$134) + (br $while-in$132) ) ) ) @@ -8367,11 +8284,11 @@ (get_local $32) (i32.const 0) ) - (set_local $1 + (tee_local $1 (i32.or (i32.ne (i32.load - (set_local $1 + (tee_local $1 (get_local $19) ) ) @@ -8390,7 +8307,7 @@ (set_local $7 (i32.gt_s (get_local $32) - (set_local $1 + (tee_local $1 (i32.add (i32.xor (i32.and @@ -8453,7 +8370,7 @@ (set_local $1 (i32.lt_s (get_local $42) - (set_local $7 + (tee_local $7 (i32.sub (get_local $49) (get_local $47) @@ -8464,10 +8381,10 @@ (set_local $5 (i32.lt_s (get_local $16) - (set_local $1 + (tee_local $1 (i32.add (get_local $43) - (set_local $6 + (tee_local $6 (select (get_local $7) (get_local $42) @@ -8481,7 +8398,7 @@ (call $_pad (get_local $0) (i32.const 32) - (set_local $5 + (tee_local $5 (select (get_local $1) (get_local $16) @@ -8587,7 +8504,7 @@ (loop $while-out$136 $while-in$137 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.add (get_local $4) @@ -8614,8 +8531,8 @@ (get_local $2) ) (if - (i32.lt_s - (set_local $1 + (i32.ge_s + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -8623,7 +8540,6 @@ ) (i32.const 10) ) - (get_local $1) (block (set_local $24 (i32.const 1) @@ -8704,9 +8620,6 @@ (local $3 i32) (local $4 f64) (local $5 i32) - (i32.load - (i32.const 8) - ) (block $label$break$L1 (if (i32.le_u @@ -8733,7 +8646,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8761,7 +8674,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8802,7 +8715,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8834,8 +8747,8 @@ ) (set_local $5 (i32.load - (set_local $3 - (set_local $1 + (tee_local $3 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8873,7 +8786,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8897,7 +8810,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.and @@ -8928,7 +8841,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8963,7 +8876,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -8987,7 +8900,7 @@ (i32.shr_s (i32.shl (i32.lt_s - (set_local $1 + (tee_local $1 (i32.shr_s (i32.shl (i32.and @@ -9018,7 +8931,7 @@ ) (set_local $3 (i32.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9053,7 +8966,7 @@ ) (set_local $4 (f64.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9081,7 +8994,7 @@ ) (set_local $4 (f64.load - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -9112,9 +9025,6 @@ (func $_fmt_u (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (i32.load - (i32.const 8) - ) (set_local $0 (if (i32.or @@ -9149,11 +9059,8 @@ (i32.const 0) ) ) - (i32.load - (i32.const 168) - ) (i32.store8 - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const -1) @@ -9223,18 +9130,17 @@ ) ) (if - (i32.eq + (i32.ne (get_local $3) (i32.const 0) ) - (get_local $0) (block (set_local $1 (get_local $0) ) (loop $while-out$2 $while-in$3 (i32.store8 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -9334,7 +9240,7 @@ (block (set_local $4 (i32.gt_u - (set_local $5 + (tee_local $5 (i32.sub (get_local $2) (get_local $3) @@ -9343,19 +9249,21 @@ (i32.const 256) ) ) - (call $_memset - (get_local $6) - (get_local $1) - (select - (i32.const 256) - (get_local $5) - (get_local $4) + (drop + (call $_memset + (get_local $6) + (get_local $1) + (select + (i32.const 256) + (get_local $5) + (get_local $4) + ) ) ) (set_local $4 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -9384,14 +9292,16 @@ (set_local $4 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (if (get_local $4) (block - (call $___fwritex - (get_local $6) - (i32.const 256) - (get_local $0) + (drop + (call $___fwritex + (get_local $6) + (i32.const 256) + (get_local $0) + ) ) (i32.load (get_local $0) @@ -9407,7 +9317,7 @@ ) (if (i32.le_u - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (i32.const -256) @@ -9426,8 +9336,9 @@ ) ) (if - (get_local $4) - (get_local $1) + (i32.eqz + (get_local $4) + ) (br $do-once$0) ) ) @@ -9499,9 +9410,6 @@ (local $44 i32) (local $45 i32) (local $46 i32) - (i32.load - (i32.const 8) - ) (block $do-once$0 (if (i32.lt_u @@ -9512,16 +9420,16 @@ (if (i32.ne (i32.and - (set_local $25 + (tee_local $25 (i32.shr_u - (set_local $4 + (tee_local $4 (i32.load (i32.const 176) ) ) - (set_local $22 + (tee_local $22 (i32.shr_u - (set_local $6 + (tee_local $6 (select (i32.const 16) (i32.and @@ -9549,18 +9457,18 @@ (block (set_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add - (set_local $9 + (tee_local $9 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $8 + (tee_local $8 (i32.add (i32.xor (i32.and @@ -9619,7 +9527,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const 12) @@ -9645,7 +9553,7 @@ (i32.store offset=4 (get_local $1) (i32.or - (set_local $0 + (tee_local $0 (i32.shl (get_local $8) (i32.const 3) @@ -9657,7 +9565,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $1) @@ -9682,7 +9590,7 @@ (if (i32.gt_u (get_local $6) - (set_local $10 + (tee_local $10 (i32.load (i32.const 184) ) @@ -9698,7 +9606,7 @@ (set_local $1 (i32.sub (i32.const 0) - (set_local $0 + (tee_local $0 (i32.shl (i32.const 2) (get_local $22) @@ -9709,7 +9617,7 @@ (set_local $1 (i32.sub (i32.const 0) - (set_local $0 + (tee_local $0 (i32.and (i32.shl (get_local $25) @@ -9726,7 +9634,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.add (i32.and (get_local $0) @@ -9742,27 +9650,27 @@ ) (set_local $0 (i32.load - (set_local $3 + (tee_local $3 (i32.add - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $9 + (tee_local $9 (i32.add (i32.const 216) (i32.shl (i32.shl - (set_local $8 + (tee_local $8 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $0) @@ -9775,10 +9683,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $2) (get_local $1) @@ -9790,10 +9698,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -9805,10 +9713,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -9878,7 +9786,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 12) @@ -9914,14 +9822,14 @@ ) ) (i32.store offset=4 - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (get_local $6) ) ) (i32.or - (set_local $9 + (tee_local $9 (i32.sub (i32.shl (get_local $8) @@ -9956,7 +9864,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $7) (i32.const 3) @@ -9971,12 +9879,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -10005,9 +9913,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $8) (i32.const 8) @@ -10062,20 +9970,19 @@ ) ) (if - (i32.eq - (set_local $0 + (i32.ne + (tee_local $0 (i32.load (i32.const 180) ) ) (i32.const 0) ) - (get_local $6) (block (set_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.add (i32.and (get_local $0) @@ -10096,7 +10003,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $0 + (tee_local $0 (i32.load offset=480 (i32.shl (i32.add @@ -10104,10 +10011,10 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $1) (get_local $0) @@ -10120,10 +10027,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $2) (get_local $1) @@ -10135,10 +10042,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -10150,10 +10057,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (get_local $0) @@ -10186,10 +10093,10 @@ (set_local $8 (get_local $0) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=16 (get_local $4) ) @@ -10198,7 +10105,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $4) ) @@ -10212,7 +10119,7 @@ (set_local $10 (get_local $8) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $1 (get_local $0) @@ -10224,7 +10131,7 @@ ) (set_local $0 (i32.lt_u - (set_local $4 + (tee_local $4 (i32.sub (i32.and (i32.load offset=4 @@ -10255,12 +10162,12 @@ (get_local $0) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $10) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -10271,7 +10178,7 @@ (if (i32.ge_u (get_local $10) - (set_local $9 + (tee_local $9 (i32.add (get_local $10) (get_local $6) @@ -10285,10 +10192,10 @@ (get_local $10) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $10) ) @@ -10298,9 +10205,9 @@ (block (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $10) (i32.const 20) @@ -10312,9 +10219,9 @@ ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $10) (i32.const 16) @@ -10328,7 +10235,7 @@ (set_local $15 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (set_local $4 (get_local $2) @@ -10338,12 +10245,12 @@ (get_local $2) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if (i32.ne - (set_local $2 + (tee_local $2 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (i32.const 20) @@ -10360,14 +10267,14 @@ (set_local $8 (get_local $5) ) - (br $while-in$11) + (br $while-in$28) ) ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $4) (i32.const 16) @@ -10377,7 +10284,7 @@ ) (i32.const 0) ) - (br $while-out$10) + (br $while-out$27) (block (set_local $4 (get_local $2) @@ -10387,7 +10294,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -10409,7 +10316,7 @@ (block (if (i32.lt_u - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $10) ) @@ -10421,7 +10328,7 @@ (if (i32.ne (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 12) @@ -10435,7 +10342,7 @@ (if (i32.eq (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 8) @@ -10462,7 +10369,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (i32.ne (get_local $1) @@ -10473,11 +10380,11 @@ (i32.eq (get_local $10) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 (get_local $10) ) @@ -10514,7 +10421,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -10531,7 +10438,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 16) @@ -10549,7 +10456,7 @@ (get_local $15) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eq (get_local $15) (i32.const 0) @@ -10560,7 +10467,7 @@ (if (i32.lt_u (get_local $15) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -10574,7 +10481,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $10) ) @@ -10601,7 +10508,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $10) ) @@ -10640,7 +10547,7 @@ (i32.store offset=4 (get_local $10) (i32.or - (set_local $0 + (tee_local $0 (i32.add (get_local $7) (get_local $6) @@ -10652,7 +10559,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $10) @@ -10694,7 +10601,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 184) ) @@ -10712,7 +10619,7 @@ (i32.const 216) (i32.shl (i32.shl - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $0) (i32.const 3) @@ -10727,12 +10634,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -10761,9 +10668,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 8) @@ -10823,7 +10730,6 @@ ) ) ) - (get_local $6) ) ) (if @@ -10837,7 +10743,7 @@ (block (set_local $5 (i32.and - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 11) @@ -10848,7 +10754,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) @@ -10868,13 +10774,13 @@ (block $label$break$L123 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=480 (i32.shl - (set_local $12 + (tee_local $12 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (i32.const 8) @@ -10892,20 +10798,20 @@ (block (set_local $7 (i32.shl - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $12 + (tee_local $12 (i32.shl (get_local $3) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -10928,11 +10834,11 @@ ) (get_local $3) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $12) (get_local $7) @@ -11028,12 +10934,12 @@ (set_local $36 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $16 + (tee_local $16 (i32.sub - (set_local $3 + (tee_local $3 (i32.and (i32.load offset=4 (get_local $23) @@ -11076,7 +10982,7 @@ ) (set_local $7 (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=20 (get_local $23) ) @@ -11092,7 +10998,7 @@ (get_local $7) (i32.eq (get_local $3) - (set_local $3 + (tee_local $3 (i32.load (i32.add (i32.add @@ -11118,7 +11024,7 @@ (get_local $11) (i32.xor (i32.and - (set_local $7 + (tee_local $7 (i32.eq (get_local $3) (i32.const 0) @@ -11145,7 +11051,7 @@ (set_local $11 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $7 @@ -11156,7 +11062,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -11168,7 +11074,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -11184,7 +11090,7 @@ (set_local $7 (i32.sub (i32.const 0) - (set_local $3 + (tee_local $3 (i32.shl (i32.const 2) (get_local $12) @@ -11194,7 +11100,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and (get_local $0) (i32.or @@ -11215,7 +11121,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.add (i32.and (get_local $0) @@ -11239,10 +11145,10 @@ (i32.or (i32.or (i32.or - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $7 + (tee_local $7 (i32.shr_u (get_local $3) (get_local $0) @@ -11255,10 +11161,10 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $7) (get_local $3) @@ -11270,10 +11176,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (get_local $0) @@ -11285,10 +11191,10 @@ ) ) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $3) (get_local $0) @@ -11343,13 +11249,13 @@ (get_local $11) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $11 (i32.const 0) ) (set_local $0 (i32.lt_u - (set_local $3 + (tee_local $3 (i32.sub (i32.and (i32.load offset=4 @@ -11379,7 +11285,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=16 (get_local $24) ) @@ -11396,12 +11302,12 @@ (set_local $29 (get_local $3) ) - (br $while-in$20) + (br $while-in$6) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $24) ) @@ -11412,7 +11318,7 @@ (set_local $13 (get_local $3) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $26 @@ -11426,7 +11332,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -11451,7 +11357,7 @@ (if (i32.lt_u (get_local $13) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -11462,7 +11368,7 @@ (if (i32.ge_u (get_local $13) - (set_local $3 + (tee_local $3 (i32.add (get_local $13) (get_local $5) @@ -11476,10 +11382,10 @@ (get_local $13) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $13) ) @@ -11489,9 +11395,9 @@ (block (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $13) (i32.const 20) @@ -11503,9 +11409,9 @@ ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $13) (i32.const 16) @@ -11519,7 +11425,7 @@ (set_local $6 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (set_local $8 (get_local $2) @@ -11529,12 +11435,12 @@ (get_local $2) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if (i32.ne - (set_local $2 + (tee_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 20) @@ -11551,14 +11457,14 @@ (set_local $9 (get_local $7) ) - (br $while-in$24) + (br $while-in$10) ) ) (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 16) @@ -11568,7 +11474,7 @@ ) (i32.const 0) ) - (br $while-out$23) + (br $while-out$9) (block (set_local $8 (get_local $2) @@ -11578,7 +11484,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -11600,7 +11506,7 @@ (block (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load offset=8 (get_local $13) ) @@ -11612,7 +11518,7 @@ (if (i32.ne (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 12) @@ -11626,7 +11532,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $2) (i32.const 8) @@ -11653,7 +11559,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (i32.ne (get_local $1) @@ -11664,11 +11570,11 @@ (i32.eq (get_local $13) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 (get_local $13) ) @@ -11705,7 +11611,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -11722,7 +11628,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 16) @@ -11740,7 +11646,7 @@ (get_local $6) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eq (get_local $6) (i32.const 0) @@ -11751,7 +11657,7 @@ (if (i32.lt_u (get_local $6) - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -11765,7 +11671,7 @@ ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=16 (get_local $13) ) @@ -11792,7 +11698,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=20 (get_local $13) ) @@ -11822,7 +11728,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $17) @@ -11832,7 +11738,7 @@ (i32.store offset=4 (get_local $13) (i32.or - (set_local $0 + (tee_local $0 (i32.add (get_local $17) (get_local $5) @@ -11844,7 +11750,7 @@ (set_local $1 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $13) @@ -11911,12 +11817,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -11945,9 +11851,9 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -11986,17 +11892,17 @@ (get_local $3) (get_local $2) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $17) (i32.const 8) @@ -12014,20 +11920,20 @@ (block (set_local $1 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -12050,11 +11956,11 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $2) (get_local $1) @@ -12107,7 +12013,7 @@ (get_local $1) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const 16) @@ -12122,12 +12028,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $1) @@ -12160,7 +12066,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $1 @@ -12187,7 +12093,7 @@ (get_local $2) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -12205,7 +12111,7 @@ (set_local $11 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $4 @@ -12216,9 +12122,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $2) @@ -12247,7 +12153,7 @@ (set_local $11 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $1 @@ -12258,7 +12164,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -12300,9 +12206,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $22) (i32.const 8) @@ -12310,7 +12216,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -12370,7 +12276,7 @@ ) (if (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 184) ) @@ -12385,7 +12291,7 @@ ) (if (i32.gt_u - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -12396,7 +12302,7 @@ (block (i32.store (i32.const 196) - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (get_local $6) @@ -12448,7 +12354,7 @@ (set_local $2 (i32.or (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $1) @@ -12477,7 +12383,7 @@ ) (if (i32.gt_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 188) ) @@ -12487,7 +12393,7 @@ (block (i32.store (i32.const 188) - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -12496,9 +12402,9 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -12540,7 +12446,7 @@ (i32.eq (i32.and (i32.add - (set_local $0 + (tee_local $0 (call_import $_sysconf (i32.const 30) ) @@ -12600,16 +12506,16 @@ ) (if (i32.le_u - (set_local $10 + (tee_local $10 (i32.and - (set_local $7 + (tee_local $7 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 656) ) ) - (set_local $15 + (tee_local $15 (i32.add (get_local $6) (i32.const 47) @@ -12617,7 +12523,7 @@ ) ) ) - (set_local $12 + (tee_local $12 (i32.sub (i32.const 0) (get_local $0) @@ -12633,7 +12539,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 616) ) @@ -12643,9 +12549,9 @@ (if (i32.or (i32.le_u - (set_local $3 + (tee_local $3 (i32.add - (set_local $4 + (tee_local $4 (i32.load (i32.const 608) ) @@ -12667,7 +12573,7 @@ ) (if (i32.eq - (set_local $11 + (tee_local $11 (block $label$break$L257 (if (i32.eq @@ -12683,7 +12589,7 @@ (block $label$break$L259 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -12700,7 +12606,7 @@ (loop $while-out$37 $while-in$38 (if (i32.le_u - (set_local $4 + (tee_local $4 (i32.load (get_local $16) ) @@ -12712,7 +12618,7 @@ (i32.add (get_local $4) (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $16) (i32.const 4) @@ -12735,7 +12641,7 @@ ) (if (i32.eq - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $16) ) @@ -12756,7 +12662,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.and (i32.sub (get_local $7) @@ -12771,7 +12677,7 @@ ) (if (i32.eq - (set_local $3 + (tee_local $3 (call_import $_sbrk (get_local $0) ) @@ -12806,7 +12712,7 @@ (set_local $30 (get_local $3) ) - (set_local $20 + (set_local $21 (get_local $0) ) (set_local $11 @@ -12826,7 +12732,7 @@ ) (if (i32.ne - (set_local $7 + (tee_local $7 (call_import $_sbrk (i32.const 0) ) @@ -12836,18 +12742,18 @@ (block (set_local $4 (i32.add - (set_local $3 + (tee_local $3 (i32.load (i32.const 608) ) ) - (set_local $12 + (tee_local $12 (if (i32.eq (i32.and - (set_local $12 + (tee_local $12 (i32.add - (set_local $4 + (tee_local $4 (i32.load (i32.const 652) ) @@ -12855,7 +12761,7 @@ (i32.const -1) ) ) - (set_local $0 + (tee_local $0 (get_local $7) ) ) @@ -12896,7 +12802,7 @@ (block (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load (i32.const 616) ) @@ -12918,7 +12824,7 @@ ) (if (i32.eq - (set_local $30 + (tee_local $30 (call_import $_sbrk (get_local $12) ) @@ -12937,7 +12843,7 @@ ) ) (block - (set_local $20 + (set_local $21 (get_local $12) ) (set_local $11 @@ -12961,18 +12867,18 @@ (set_local $4 (i32.sub (i32.const 0) - (get_local $20) + (get_local $21) ) ) (if (i32.and (i32.gt_u (get_local $5) - (get_local $20) + (get_local $21) ) (i32.and (i32.lt_u - (get_local $20) + (get_local $21) (i32.const 2147483647) ) (i32.ne @@ -12983,14 +12889,14 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.and (i32.add (i32.sub (get_local $15) - (get_local $20) + (get_local $21) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 656) ) @@ -13012,21 +12918,21 @@ (i32.const -1) ) (block - (call_import $_sbrk - (get_local $4) + (drop + (call_import $_sbrk + (get_local $4) + ) ) (br $label$break$L279) ) - (set_local $20 + (set_local $21 (i32.add (get_local $0) - (get_local $20) + (get_local $21) ) ) ) - (get_local $20) ) - (get_local $20) ) (if (i32.ne @@ -13038,7 +12944,7 @@ (get_local $30) ) (set_local $19 - (get_local $20) + (get_local $21) ) (br $label$break$L257 (i32.const 193) @@ -13074,7 +12980,7 @@ (set_local $3 (i32.and (i32.ne - (set_local $0 + (tee_local $0 (call_import $_sbrk (get_local $10) ) @@ -13082,7 +12988,7 @@ (i32.const -1) ) (i32.ne - (set_local $4 + (tee_local $4 (call_import $_sbrk (i32.const 0) ) @@ -13101,7 +13007,7 @@ ) (if (i32.gt_u - (set_local $4 + (tee_local $4 (i32.sub (get_local $4) (get_local $0) @@ -13136,7 +13042,7 @@ (block (i32.store (i32.const 608) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 608) @@ -13160,7 +13066,7 @@ (block $do-once$44 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -13171,7 +13077,7 @@ (if (i32.or (i32.eq - (set_local $0 + (tee_local $0 (i32.load (i32.const 192) ) @@ -13213,9 +13119,9 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$46 $while-in$47 + (loop $while-out$77 $while-in$78 (i32.store offset=12 - (set_local $0 + (tee_local $0 (i32.add (i32.const 216) (i32.shl @@ -13235,7 +13141,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -13243,15 +13149,14 @@ ) (i32.const 32) ) - (br $while-out$46) - (get_local $1) + (br $while-out$77) ) - (br $while-in$47) + (br $while-in$78) ) (set_local $1 (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.add (get_local $14) (i32.const 8) @@ -13264,10 +13169,10 @@ ) (i32.store (i32.const 200) - (set_local $0 + (tee_local $0 (i32.add (get_local $14) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and @@ -13285,7 +13190,7 @@ ) (i32.store (i32.const 188) - (set_local $1 + (tee_local $1 (i32.sub (i32.add (get_local $19) @@ -13320,19 +13225,19 @@ (set_local $7 (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (get_local $14) (i32.add - (set_local $4 + (tee_local $4 (i32.load (get_local $7) ) ) - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 4) @@ -13358,24 +13263,24 @@ (set_local $11 (i32.const 203) ) - (br $while-out$48) + (br $while-out$46) ) ) (if (i32.eq - (set_local $4 + (tee_local $4 (i32.load offset=8 (get_local $7) ) ) (i32.const 0) ) - (br $while-out$48) + (br $while-out$46) (set_local $7 (get_local $4) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -13414,7 +13319,7 @@ (set_local $2 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 8) @@ -13428,7 +13333,7 @@ (set_local $0 (i32.add (get_local $0) - (set_local $1 + (tee_local $1 (select (i32.const 0) (i32.and @@ -13491,7 +13396,7 @@ (if (i32.lt_u (get_local $14) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -13516,7 +13421,7 @@ (set_local $1 (i32.const 624) ) - (loop $while-out$50 $while-in$51 + (loop $while-out$48 $while-in$49 (if (i32.eq (i32.load @@ -13534,12 +13439,12 @@ (set_local $11 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -13550,11 +13455,10 @@ (set_local $27 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) - (get_local $1) ) - (br $while-in$51) + (br $while-in$49) ) (if (i32.eq @@ -13579,7 +13483,7 @@ (set_local $1 (i32.add (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $38) (i32.const 4) @@ -13596,7 +13500,7 @@ (set_local $9 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $14) (i32.const 8) @@ -13610,7 +13514,7 @@ (set_local $5 (i32.eq (i32.and - (set_local $2 + (tee_local $2 (i32.add (get_local $3) (i32.const 8) @@ -13623,7 +13527,7 @@ ) (set_local $1 (i32.sub - (set_local $3 + (tee_local $3 (i32.add (get_local $3) (select @@ -13639,7 +13543,7 @@ ) ) ) - (set_local $7 + (tee_local $7 (i32.add (get_local $14) (select @@ -13676,7 +13580,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.eq (get_local $3) @@ -13685,7 +13589,7 @@ (block (i32.store (i32.const 188) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 188) @@ -13717,7 +13621,7 @@ (block (i32.store (i32.const 184) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 184) @@ -13744,18 +13648,18 @@ ) (get_local $0) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $0 (i32.and (i32.load - (set_local $1 + (tee_local $1 (i32.add (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $3) ) @@ -13789,15 +13693,15 @@ (get_local $3) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $3) ) ) - (set_local $2 + (tee_local $2 (i32.add (i32.const 216) (i32.shl @@ -13818,7 +13722,7 @@ ) (call_import $_abort) ) - (br_if $do-once$55 + (br_if $do-once$61 (i32.eq (i32.load offset=12 (get_local $0) @@ -13854,7 +13758,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $1) @@ -13877,7 +13781,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 8) @@ -13890,7 +13794,7 @@ (set_local $39 (get_local $2) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -13912,10 +13816,10 @@ (get_local $3) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $3) ) @@ -13925,11 +13829,11 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $9 + (tee_local $9 (i32.add - (set_local $21 + (tee_local $20 (i32.add (get_local $3) (i32.const 16) @@ -13944,9 +13848,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (get_local $21) + (get_local $20) ) ) (i32.const 0) @@ -13955,14 +13859,14 @@ (set_local $18 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $2 (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) ) ) @@ -13970,12 +13874,12 @@ (get_local $1) ) ) - (loop $while-out$61 $while-in$62 + (loop $while-out$55 $while-in$56 (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $21 + (tee_local $20 (i32.add (get_local $2) (i32.const 20) @@ -13990,16 +13894,16 @@ (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) - (br $while-in$62) + (br $while-in$56) ) ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $21 + (tee_local $20 (i32.add (get_local $2) (i32.const 16) @@ -14009,17 +13913,17 @@ ) (i32.const 0) ) - (br $while-out$61) + (br $while-out$55) (block (set_local $2 (get_local $1) ) (set_local $9 - (get_local $21) + (get_local $20) ) ) ) - (br $while-in$62) + (br $while-in$56) ) (if (i32.lt_u @@ -14041,7 +13945,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $3) ) @@ -14053,7 +13957,7 @@ (if (i32.ne (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const 12) @@ -14067,7 +13971,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $1) (i32.const 8) @@ -14100,16 +14004,16 @@ (i32.const 0) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $3) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $3) ) @@ -14125,7 +14029,7 @@ (get_local $2) (get_local $18) ) - (br_if $do-once$63 + (br_if $do-once$57 (i32.ne (get_local $18) (i32.const 0) @@ -14161,7 +14065,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -14191,7 +14095,7 @@ (if (i32.lt_u (get_local $18) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -14205,9 +14109,9 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $3) (i32.const 16) @@ -14237,7 +14141,7 @@ ) (br_if $label$break$L331 (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -14334,16 +14238,16 @@ ) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -14373,9 +14277,9 @@ (block (if (i32.ge_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -14394,7 +14298,7 @@ (set_local $33 (get_local $1) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -14417,18 +14321,18 @@ (get_local $5) (get_local $2) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 - (block $do-once$69 + (tee_local $1 + (block $do-once$67 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $4) (i32.const 8) @@ -14438,7 +14342,7 @@ ) (i32.const 0) (block - (br_if $do-once$69 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $4) @@ -14447,20 +14351,20 @@ ) (set_local $1 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -14483,11 +14387,11 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $2) (get_local $1) @@ -14540,7 +14444,7 @@ (get_local $1) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 16) @@ -14555,12 +14459,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $1) @@ -14593,7 +14497,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $1 @@ -14620,7 +14524,7 @@ (get_local $2) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (if (i32.eq (i32.and @@ -14638,7 +14542,7 @@ (set_local $11 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $8 @@ -14649,9 +14553,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.add (get_local $2) @@ -14680,7 +14584,7 @@ (set_local $11 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $1 @@ -14691,7 +14595,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (if (i32.eq @@ -14733,9 +14637,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $34) (i32.const 8) @@ -14743,7 +14647,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -14795,10 +14699,10 @@ ) ) ) - (loop $while-out$73 $while-in$74 + (loop $while-out$71 $while-in$72 (if (i32.le_u - (set_local $1 + (tee_local $1 (i32.load (get_local $27) ) @@ -14807,7 +14711,7 @@ ) (if (i32.gt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.load offset=4 @@ -14821,7 +14725,7 @@ (set_local $2 (get_local $1) ) - (br $while-out$73) + (br $while-out$71) ) ) ) @@ -14830,14 +14734,14 @@ (get_local $27) ) ) - (br $while-in$74) + (br $while-in$72) ) (set_local $8 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $2) (i32.const -47) @@ -14853,7 +14757,7 @@ ) (set_local $4 (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (select @@ -14869,7 +14773,7 @@ ) ) ) - (set_local $8 + (tee_local $8 (i32.add (get_local $0) (i32.const 16) @@ -14879,7 +14783,7 @@ ) (set_local $4 (i32.add - (set_local $5 + (tee_local $5 (select (get_local $0) (get_local $1) @@ -14892,7 +14796,7 @@ (set_local $3 (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.add (get_local $14) (i32.const 8) @@ -14905,10 +14809,10 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add (get_local $14) - (set_local $3 + (tee_local $3 (select (i32.const 0) (i32.and @@ -14926,7 +14830,7 @@ ) (i32.store (i32.const 188) - (set_local $3 + (tee_local $3 (i32.sub (i32.add (get_local $19) @@ -14957,7 +14861,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $5) (i32.const 4) @@ -15011,9 +14915,9 @@ (i32.const 24) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 4) @@ -15022,17 +14926,16 @@ (i32.const 7) ) (if - (i32.lt_u + (i32.ge_u (i32.add (get_local $1) (i32.const 4) ) (get_local $2) ) - (get_local $1) - (br $while-out$75) + (br $while-out$73) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.ne @@ -15052,7 +14955,7 @@ (i32.store offset=4 (get_local $0) (i32.or - (set_local $3 + (tee_local $3 (i32.sub (get_local $5) (get_local $0) @@ -15092,12 +14995,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 176) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $2) @@ -15120,15 +15023,15 @@ (i32.const 8) ) ) - (set_local $21 + (set_local $20 (get_local $4) ) ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $4) (i32.const 8) @@ -15145,7 +15048,7 @@ (set_local $9 (get_local $1) ) - (set_local $21 + (set_local $20 (get_local $2) ) ) @@ -15156,12 +15059,12 @@ (get_local $0) ) (i32.store offset=12 - (get_local $21) + (get_local $20) (get_local $0) ) (i32.store offset=8 (get_local $0) - (get_local $21) + (get_local $20) ) (i32.store offset=12 (get_local $0) @@ -15174,10 +15077,10 @@ (i32.add (i32.const 480) (i32.shl - (set_local $2 + (tee_local $2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $3) (i32.const 8) @@ -15195,20 +15098,20 @@ (block (set_local $2 (i32.shl - (set_local $1 + (tee_local $1 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $1) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add @@ -15231,11 +15134,11 @@ ) (get_local $1) ) - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $2 + (tee_local $2 (i32.shl (get_local $4) (get_local $2) @@ -15298,12 +15201,12 @@ (if (i32.eq (i32.and - (set_local $1 + (tee_local $1 (i32.load (i32.const 180) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $2) @@ -15363,7 +15266,7 @@ (get_local $4) ) ) - (loop $while-out$77 $while-in$78 + (loop $while-out$75 $while-in$76 (if (i32.eq (i32.and @@ -15381,7 +15284,7 @@ (set_local $11 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $8 @@ -15392,9 +15295,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $4) @@ -15423,7 +15326,7 @@ (set_local $11 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $2 @@ -15434,7 +15337,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) (if (i32.eq @@ -15476,9 +15379,9 @@ (if (i32.and (i32.ge_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $35) (i32.const 8) @@ -15486,7 +15389,7 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.load (i32.const 192) ) @@ -15530,7 +15433,7 @@ ) (if (i32.gt_u - (set_local $0 + (tee_local $0 (i32.load (i32.const 188) ) @@ -15540,7 +15443,7 @@ (block (i32.store (i32.const 188) - (set_local $2 + (tee_local $2 (i32.sub (get_local $0) (get_local $6) @@ -15549,9 +15452,9 @@ ) (i32.store (i32.const 200) - (set_local $1 + (tee_local $1 (i32.add - (set_local $0 + (tee_local $0 (i32.load (i32.const 200) ) @@ -15609,9 +15512,6 @@ (local $16 i32) (local $17 i32) (local $18 i32) - (i32.load - (i32.const 8) - ) (if (i32.eq (get_local $0) @@ -15621,13 +15521,13 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -15637,9 +15537,9 @@ ) (if (i32.eq - (set_local $8 + (tee_local $8 (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.add (get_local $0) @@ -15657,7 +15557,7 @@ (set_local $9 (i32.add (get_local $2) - (set_local $7 + (tee_local $7 (i32.and (get_local $0) (i32.const -8) @@ -15695,7 +15595,7 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $4 (i32.add (get_local $2) (i32.sub @@ -15710,7 +15610,7 @@ ) (if (i32.eq - (get_local $6) + (get_local $4) (i32.load (i32.const 196) ) @@ -15719,9 +15619,9 @@ (if (i32.ne (i32.and - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 4) @@ -15735,7 +15635,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15755,7 +15655,7 @@ ) ) (i32.store offset=4 - (get_local $6) + (get_local $4) (i32.or (get_local $12) (i32.const 1) @@ -15763,7 +15663,7 @@ ) (i32.store (i32.add - (get_local $6) + (get_local $4) (get_local $12) ) (get_local $12) @@ -15785,17 +15685,17 @@ (block (set_local $2 (i32.load offset=12 - (get_local $6) + (get_local $4) ) ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 - (get_local $6) + (get_local $4) ) ) - (set_local $8 + (tee_local $8 (i32.add (i32.const 216) (i32.shl @@ -15821,7 +15721,7 @@ (i32.load offset=12 (get_local $0) ) - (get_local $6) + (get_local $4) ) (call_import $_abort) ) @@ -15849,7 +15749,7 @@ ) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15879,14 +15779,14 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 8) ) ) ) - (get_local $6) + (get_local $4) ) (set_local $13 (get_local $1) @@ -15904,7 +15804,7 @@ (get_local $0) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -15914,29 +15814,29 @@ ) (set_local $8 (i32.load offset=24 - (get_local $6) + (get_local $4) ) ) (block $do-once$2 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=12 - (get_local $6) + (get_local $4) ) ) - (get_local $6) + (get_local $4) ) (block (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $7 + (tee_local $7 (i32.add - (set_local $13 + (tee_local $13 (i32.add - (get_local $6) + (get_local $4) (i32.const 16) ) ) @@ -15949,7 +15849,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load (get_local $13) ) @@ -15957,7 +15857,7 @@ (i32.const 0) ) (block - (set_local $4 + (set_local $5 (i32.const 0) ) (br $do-once$2) @@ -15978,9 +15878,9 @@ (loop $while-out$4 $while-in$5 (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $2) (i32.const 20) @@ -16002,9 +15902,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $2) (i32.const 16) @@ -16037,7 +15937,7 @@ (get_local $7) (i32.const 0) ) - (set_local $4 + (set_local $5 (get_local $2) ) ) @@ -16046,9 +15946,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 - (get_local $6) + (get_local $4) ) ) (get_local $1) @@ -16058,28 +15958,28 @@ (if (i32.ne (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 12) ) ) ) - (get_local $6) + (get_local $4) ) (call_import $_abort) ) (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $0) (i32.const 8) ) ) ) - (get_local $6) + (get_local $4) ) (block (i32.store @@ -16090,7 +15990,7 @@ (get_local $7) (get_local $2) ) - (set_local $4 + (set_local $5 (get_local $0) ) ) @@ -16106,7 +16006,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16115,15 +16015,15 @@ (block (if (i32.eq - (get_local $6) + (get_local $4) (i32.load - (set_local $1 + (tee_local $1 (i32.add (i32.const 480) (i32.shl - (set_local $0 + (tee_local $0 (i32.load offset=28 - (get_local $6) + (get_local $4) ) ) (i32.const 2) @@ -16135,11 +16035,11 @@ (block (i32.store (get_local $1) - (get_local $4) + (get_local $5) ) (if (i32.eq - (get_local $4) + (get_local $5) (i32.const 0) ) (block @@ -16159,7 +16059,7 @@ ) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16181,32 +16081,32 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (i32.const 16) ) ) ) - (get_local $6) + (get_local $4) ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=20 (get_local $8) - (get_local $4) + (get_local $5) ) ) (if (i32.eq - (get_local $4) + (get_local $5) (i32.const 0) ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16218,8 +16118,8 @@ ) (if (i32.lt_u - (get_local $4) - (set_local $0 + (get_local $5) + (tee_local $0 (i32.load (i32.const 192) ) @@ -16228,16 +16128,16 @@ (call_import $_abort) ) (i32.store offset=24 - (get_local $4) + (get_local $5) (get_local $8) ) (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $2 + (tee_local $2 (i32.add - (get_local $6) + (get_local $4) (i32.const 16) ) ) @@ -16253,19 +16153,19 @@ (call_import $_abort) (block (i32.store offset=16 - (get_local $4) + (get_local $5) (get_local $1) ) (i32.store offset=24 (get_local $1) - (get_local $4) + (get_local $5) ) ) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -16274,7 +16174,7 @@ ) (block (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16290,15 +16190,15 @@ (call_import $_abort) (block (i32.store offset=20 - (get_local $4) + (get_local $5) (get_local $0) ) (i32.store offset=24 (get_local $0) - (get_local $4) + (get_local $5) ) (set_local $3 - (get_local $6) + (get_local $4) ) (set_local $10 (get_local $12) @@ -16329,9 +16229,9 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 4) @@ -16364,7 +16264,7 @@ (block (i32.store (i32.const 188) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 188) @@ -16414,7 +16314,7 @@ (block (i32.store (i32.const 184) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 184) @@ -16444,7 +16344,7 @@ (return) ) ) - (set_local $4 + (set_local $5 (i32.add (i32.and (get_local $0) @@ -16473,12 +16373,12 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=8 (get_local $9) ) ) - (set_local $2 + (tee_local $2 (i32.add (i32.const 216) (i32.shl @@ -16560,7 +16460,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $1) (i32.const 8) @@ -16594,7 +16494,7 @@ (block $do-once$10 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $9) ) @@ -16604,11 +16504,11 @@ (block (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $8 + (tee_local $8 (i32.add - (set_local $7 + (tee_local $7 (i32.add (get_local $9) (i32.const 16) @@ -16623,7 +16523,7 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load (get_local $7) ) @@ -16652,9 +16552,9 @@ (loop $while-out$12 $while-in$13 (if (i32.ne - (set_local $1 + (tee_local $1 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $2) (i32.const 20) @@ -16676,9 +16576,9 @@ ) (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $2) (i32.const 16) @@ -16722,7 +16622,7 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load offset=8 (get_local $9) ) @@ -16736,7 +16636,7 @@ (if (i32.ne (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $2) (i32.const 12) @@ -16750,7 +16650,7 @@ (if (i32.eq (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $1) (i32.const 8) @@ -16787,11 +16687,11 @@ (i32.eq (get_local $9) (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.const 480) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $9) ) @@ -16845,7 +16745,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -16874,7 +16774,7 @@ (if (i32.lt_u (get_local $11) - (set_local $1 + (tee_local $1 (i32.load (i32.const 192) ) @@ -16888,9 +16788,9 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $9) (i32.const 16) @@ -16920,7 +16820,7 @@ ) (if (i32.ne - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $2) ) @@ -16955,16 +16855,16 @@ (i32.store offset=4 (get_local $3) (i32.or - (get_local $4) + (get_local $5) (i32.const 1) ) ) (i32.store (i32.add (get_local $3) - (get_local $4) + (get_local $5) ) - (get_local $4) + (get_local $5) ) (if (i32.eq @@ -16976,11 +16876,10 @@ (block (i32.store (i32.const 184) - (get_local $4) + (get_local $5) ) (return) ) - (get_local $4) ) ) (block @@ -17005,20 +16904,20 @@ ) (get_local $10) ) - (set_local $4 + (set_local $5 (get_local $10) ) ) ) (set_local $1 (i32.shr_u - (get_local $4) + (get_local $5) (i32.const 3) ) ) (if (i32.lt_u - (get_local $4) + (get_local $5) (i32.const 256) ) (block @@ -17037,12 +16936,12 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 176) ) ) - (set_local $1 + (tee_local $1 (i32.shl (i32.const 1) (get_local $1) @@ -17059,7 +16958,7 @@ (get_local $1) ) ) - (set_local $5 + (set_local $6 (i32.add (get_local $2) (i32.const 8) @@ -17071,9 +16970,9 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $2) (i32.const 8) @@ -17087,7 +16986,7 @@ ) (call_import $_abort) (block - (set_local $5 + (set_local $6 (get_local $0) ) (set_local $14 @@ -17097,7 +16996,7 @@ ) ) (i32.store - (get_local $5) + (get_local $6) (get_local $3) ) (i32.store offset=12 @@ -17119,12 +17018,12 @@ (i32.add (i32.const 480) (i32.shl - (set_local $5 + (tee_local $6 (if (i32.eq - (set_local $0 + (tee_local $0 (i32.shr_u - (get_local $4) + (get_local $5) (i32.const 8) ) ) @@ -17133,27 +17032,27 @@ (i32.const 0) (if (i32.gt_u - (get_local $4) + (get_local $5) (i32.const 16777215) ) (i32.const 31) (block - (set_local $5 + (set_local $6 (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $5 + (tee_local $6 (i32.and (i32.shr_u (i32.add - (set_local $1 + (tee_local $1 (i32.shl (get_local $0) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add @@ -17176,14 +17075,14 @@ ) (get_local $0) ) - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $6 (i32.shl (get_local $1) - (get_local $5) + (get_local $6) ) ) (i32.const 245760) @@ -17197,7 +17096,7 @@ ) (i32.shr_u (i32.shl - (get_local $5) + (get_local $6) (get_local $0) ) (i32.const 15) @@ -17210,7 +17109,7 @@ (i32.or (i32.and (i32.shr_u - (get_local $4) + (get_local $5) (i32.add (get_local $0) (i32.const 7) @@ -17218,7 +17117,7 @@ ) (i32.const 1) ) - (get_local $5) + (get_local $6) ) ) ) @@ -17230,7 +17129,7 @@ ) (i32.store offset=28 (get_local $3) - (get_local $5) + (get_local $6) ) (i32.store offset=20 (get_local $3) @@ -17243,15 +17142,15 @@ (if (i32.eq (i32.and - (set_local $0 + (tee_local $0 (i32.load (i32.const 180) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) - (get_local $5) + (get_local $6) ) ) ) @@ -17283,20 +17182,20 @@ ) ) (block - (set_local $5 + (set_local $6 (i32.shl - (get_local $4) + (get_local $5) (select (i32.const 0) (i32.sub (i32.const 25) (i32.shr_u - (get_local $5) + (get_local $6) (i32.const 1) ) ) (i32.eq - (get_local $5) + (get_local $6) (i32.const 31) ) ) @@ -17316,7 +17215,7 @@ ) (i32.const -8) ) - (get_local $4) + (get_local $5) ) (block (set_local $15 @@ -17330,15 +17229,15 @@ ) (set_local $2 (i32.shl - (get_local $5) + (get_local $6) (i32.const 1) ) ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $6 (i32.add (i32.add (get_local $1) @@ -17346,7 +17245,7 @@ ) (i32.shl (i32.shr_u - (get_local $5) + (get_local $6) (i32.const 31) ) (i32.const 2) @@ -17362,7 +17261,7 @@ (get_local $1) ) (set_local $17 - (get_local $5) + (get_local $6) ) (set_local $0 (i32.const 127) @@ -17370,7 +17269,7 @@ (br $while-out$18) ) (block - (set_local $5 + (set_local $6 (get_local $2) ) (set_local $1 @@ -17420,9 +17319,9 @@ (if (i32.and (i32.ge_u - (set_local $0 + (tee_local $0 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -17430,7 +17329,7 @@ ) ) ) - (set_local $5 + (tee_local $6 (i32.load (i32.const 192) ) @@ -17438,7 +17337,7 @@ ) (i32.ge_u (get_local $15) - (get_local $5) + (get_local $6) ) ) (block @@ -17471,7 +17370,7 @@ ) (i32.store (i32.const 208) - (set_local $0 + (tee_local $0 (i32.add (i32.load (i32.const 208) @@ -17485,7 +17384,7 @@ (get_local $0) (i32.const 0) ) - (set_local $5 + (set_local $6 (i32.const 632) ) (return) @@ -17493,24 +17392,23 @@ (loop $while-out$20 $while-in$21 (set_local $0 (i32.eq - (set_local $5 + (tee_local $6 (i32.load - (get_local $5) + (get_local $6) ) ) (i32.const 0) ) ) - (set_local $5 + (set_local $6 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) (if (get_local $0) (br $while-out$20) - (get_local $5) ) (br $while-in$21) ) @@ -17550,7 +17448,7 @@ (get_local $3) ) (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (get_local $2) @@ -17583,7 +17481,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -17612,7 +17510,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -18014,15 +17912,15 @@ (set_local $2 (i32.add (i32.shr_u - (set_local $4 + (tee_local $4 (i32.mul - (set_local $2 + (tee_local $2 (i32.and (get_local $1) (i32.const 65535) ) ) - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 65535) @@ -18034,7 +17932,7 @@ ) (i32.mul (get_local $2) - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $0) (i32.const 16) @@ -18045,7 +17943,7 @@ ) (set_local $3 (i32.mul - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $1) (i32.const 16) @@ -18103,7 +18001,7 @@ (call $___udivmoddi4 (call $_i64Subtract (i32.xor - (set_local $4 + (tee_local $4 (i32.or (i32.shr_s (get_local $1) @@ -18125,7 +18023,7 @@ (get_local $0) ) (i32.xor - (set_local $0 + (tee_local $0 (i32.or (i32.shr_s (select @@ -18161,7 +18059,7 @@ ) (call $_i64Subtract (i32.xor - (set_local $1 + (tee_local $1 (i32.or (i32.shr_s (get_local $3) @@ -18183,7 +18081,7 @@ (get_local $2) ) (i32.xor - (set_local $2 + (tee_local $2 (i32.or (i32.shr_s (select @@ -18219,7 +18117,7 @@ ) (i32.const 0) ) - (set_local $1 + (tee_local $1 (i32.xor (get_local $1) (get_local $4) @@ -18230,7 +18128,7 @@ (i32.load (i32.const 168) ) - (set_local $0 + (tee_local $0 (i32.xor (get_local $2) (get_local $0) @@ -18259,125 +18157,127 @@ (i32.const 16) ) ) - (call $___udivmoddi4 - (call $_i64Subtract - (i32.xor - (set_local $4 - (i32.or - (i32.shr_s - (get_local $1) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (drop + (call $___udivmoddi4 + (call $_i64Subtract + (i32.xor + (tee_local $4 + (i32.or + (i32.shr_s + (get_local $1) + (i32.const 31) + ) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $0) ) - (get_local $0) - ) - (i32.xor - (set_local $5 - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (i32.xor + (tee_local $5 + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $1) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $1) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $1) ) - (get_local $1) + (get_local $4) + (get_local $5) ) - (get_local $4) - (get_local $5) - ) - (i32.load - (i32.const 168) - ) - (call $_i64Subtract - (i32.xor - (set_local $0 - (i32.or - (i32.shr_s - (get_local $3) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.load + (i32.const 168) + ) + (call $_i64Subtract + (i32.xor + (tee_local $0 + (i32.or + (i32.shr_s + (get_local $3) + (i32.const 31) + ) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $2) ) - (get_local $2) - ) - (i32.xor - (set_local $1 - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.xor + (tee_local $1 + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $3) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $3) ) - (get_local $3) + (get_local $0) + (get_local $1) + ) + (i32.load + (i32.const 168) + ) + (tee_local $0 + (get_local $6) ) - (get_local $0) - (get_local $1) - ) - (i32.load - (i32.const 168) - ) - (set_local $0 - (get_local $6) ) ) (set_local $0 @@ -18435,7 +18335,7 @@ (get_local $2) ) ) - (set_local $0 + (tee_local $0 (i32.load (i32.const 168) ) @@ -18480,13 +18380,15 @@ (i32.const 16) ) ) - (call $___udivmoddi4 - (get_local $0) - (get_local $1) - (get_local $2) - (get_local $3) - (set_local $0 - (get_local $4) + (drop + (call $___udivmoddi4 + (get_local $0) + (get_local $1) + (get_local $2) + (get_local $3) + (tee_local $0 + (get_local $4) + ) ) ) (i32.store @@ -18521,14 +18423,14 @@ (get_local $2) ) (set_local $7 - (set_local $14 + (tee_local $14 (get_local $3) ) ) (if (i32.eq - (set_local $6 - (set_local $9 + (tee_local $6 + (tee_local $9 (get_local $1) ) ) @@ -18701,7 +18603,7 @@ (if (i32.eq (i32.and - (set_local $5 + (tee_local $5 (i32.sub (get_local $7) (i32.const 1) @@ -18759,7 +18661,7 @@ ) (if (i32.le_u - (set_local $5 + (tee_local $5 (i32.sub (i32.clz (get_local $7) @@ -18773,7 +18675,7 @@ ) (block (set_local $12 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 1) @@ -18784,7 +18686,7 @@ (i32.or (i32.shl (get_local $6) - (set_local $1 + (tee_local $1 (i32.sub (i32.const 31) (get_local $5) @@ -18866,7 +18768,7 @@ (block (if (i32.le_u - (set_local $5 + (tee_local $5 (i32.sub (i32.clz (get_local $7) @@ -18880,7 +18782,7 @@ ) (block (set_local $12 - (set_local $0 + (tee_local $0 (i32.add (get_local $5) (i32.const 1) @@ -18894,7 +18796,7 @@ (get_local $8) (get_local $0) ) - (set_local $9 + (tee_local $9 (i32.shr_s (i32.sub (get_local $5) @@ -18906,7 +18808,7 @@ ) (i32.shl (get_local $6) - (set_local $1 + (tee_local $1 (i32.sub (i32.const 31) (get_local $5) @@ -18983,7 +18885,7 @@ (if (i32.ne (i32.and - (set_local $7 + (tee_local $7 (i32.sub (get_local $5) (i32.const 1) @@ -18997,7 +18899,7 @@ (set_local $1 (i32.sub (i32.const 64) - (set_local $0 + (tee_local $0 (i32.sub (i32.add (i32.clz @@ -19014,7 +18916,7 @@ ) (set_local $5 (i32.shr_s - (set_local $9 + (tee_local $9 (i32.sub (i32.const 32) (get_local $0) @@ -19025,7 +18927,7 @@ ) (set_local $10 (i32.shr_s - (set_local $7 + (tee_local $7 (i32.sub (get_local $0) (i32.const 32) @@ -19170,7 +19072,7 @@ (i32.const 0) (i32.shr_u (get_local $6) - (set_local $0 + (tee_local $0 (i32.ctz (get_local $5) ) @@ -19216,7 +19118,7 @@ (block (set_local $3 (call $_i64Add - (set_local $1 + (tee_local $1 (i32.or (i32.const 0) (i32.and @@ -19225,7 +19127,7 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.or (get_local $14) (i32.and @@ -19271,43 +19173,45 @@ ) ) ) - (call $_i64Subtract - (get_local $3) - (get_local $8) - (set_local $0 - (i32.or - (i32.const 0) + (drop + (call $_i64Subtract + (get_local $3) + (get_local $8) + (tee_local $0 (i32.or - (i32.shl - (get_local $11) - (i32.const 1) + (i32.const 0) + (i32.or + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.shr_u + (get_local $9) + (i32.const 31) + ) ) + ) + ) + (tee_local $9 + (i32.or (i32.shr_u - (get_local $9) + (get_local $11) (i32.const 31) ) - ) - ) - ) - (set_local $9 - (i32.or - (i32.shr_u - (get_local $11) - (i32.const 31) - ) - (i32.shl - (get_local $13) - (i32.const 1) + (i32.shl + (get_local $13) + (i32.const 1) + ) ) ) ) ) (set_local $7 (i32.and - (set_local $14 + (tee_local $14 (i32.or (i32.shr_s - (set_local $5 + (tee_local $5 (i32.load (i32.const 168) ) @@ -19374,7 +19278,7 @@ ) (if (i32.eq - (set_local $12 + (tee_local $12 (i32.sub (get_local $12) (i32.const 1) @@ -19404,7 +19308,7 @@ (set_local $3 (i32.or (get_local $6) - (set_local $2 + (tee_local $2 (i32.const 0) ) ) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index d8b887891..dcb3c1f15 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -346,9 +346,11 @@ (set_local $$retval (i32.const 0) ) - (call $_printf - (i32.const 672) - (get_local $$vararg_buffer) + (drop + (call $_printf + (i32.const 672) + (get_local $$vararg_buffer) + ) ) (i32.store (i32.const 8) @@ -2642,17 +2644,19 @@ (get_local $$write) ) ) - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (get_local $$5) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (get_local $$5) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) + (get_local $$f) + (i32.const 0) + (i32.const 0) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) (set_local $$6 (i32.load @@ -3137,10 +3141,12 @@ ) ) ) - (call $_memcpy - (get_local $$9) - (get_local $$s$addr$0) - (get_local $$l$addr$0) + (drop + (call $_memcpy + (get_local $$9) + (get_local $$s$addr$0) + (get_local $$l$addr$0) + ) ) (set_local $$10 (i32.load @@ -4545,17 +4551,19 @@ (get_local $$write) ) ) - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (get_local $$2) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (get_local $$2) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) + (get_local $$f) + (i32.const 0) + (i32.const 0) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) (set_local $$3 (i32.load @@ -12215,7 +12223,7 @@ (set_local $$d$5494$i (get_local $$r$0$a$9$i) ) - (loop $while-out$108 $while-in$109 + (loop $while-out$114 $while-in$115 (set_local $$248 (i32.load (get_local $$d$5494$i) @@ -12234,7 +12242,7 @@ (get_local $$r$0$a$9$i) ) ) - (block $do-once$110 + (block $do-once$116 (if (get_local $$cmp673$i) (block @@ -12252,7 +12260,7 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$110) + (br $do-once$116) ) ) (i32.store8 @@ -12279,10 +12287,10 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$110) + (br $do-once$116) ) ) - (loop $while-out$112 $while-in$113 + (loop $while-out$118 $while-in$119 (set_local $$incdec$ptr681$i (i32.add (get_local $$s668$0492$i) @@ -12308,10 +12316,10 @@ (set_local $$s668$1$i (get_local $$incdec$ptr681$i) ) - (br $while-out$112) + (br $while-out$118) ) ) - (br $while-in$113) + (br $while-in$119) ) ) ) @@ -12370,13 +12378,13 @@ (set_local $$incdec$ptr698$i$lcssa (get_local $$incdec$ptr698$i) ) - (br $while-out$108) + (br $while-out$114) ) (set_local $$d$5494$i (get_local $$incdec$ptr698$i) ) ) - (br $while-in$109) + (br $while-in$115) ) (set_local $$251 (i32.eq @@ -12384,7 +12392,7 @@ (i32.const 0) ) ) - (block $do-once$114 + (block $do-once$120 (if (i32.eqz (get_local $$251) @@ -12411,7 +12419,7 @@ (i32.eqz (get_local $$tobool$i$449$i) ) - (br $do-once$114) + (br $do-once$120) ) (call $___fwritex (i32.const 4143) @@ -12448,7 +12456,7 @@ (set_local $$p$addr$4489$i (get_local $$p$addr$3$i) ) - (loop $while-out$116 $while-in$117 + (loop $while-out$122 $while-in$123 (set_local $$254 (i32.load (get_local $$d$6488$i) @@ -12473,7 +12481,7 @@ (set_local $$s715$0484$i (get_local $$255) ) - (loop $while-out$118 $while-in$119 + (loop $while-out$124 $while-in$125 (set_local $$incdec$ptr725$i (i32.add (get_local $$s715$0484$i) @@ -12499,10 +12507,10 @@ (set_local $$s715$0$lcssa$i (get_local $$incdec$ptr725$i) ) - (br $while-out$118) + (br $while-out$124) ) ) - (br $while-in$119) + (br $while-in$125) ) ) (set_local $$s715$0$lcssa$i @@ -12593,10 +12601,10 @@ (set_local $$p$addr$4$lcssa$i (get_local $$sub735$i) ) - (br $while-out$116) + (br $while-out$122) ) ) - (br $while-in$117) + (br $while-in$123) ) ) (set_local $$p$addr$4$lcssa$i @@ -12652,7 +12660,7 @@ (set_local $$p$addr$5501$i (get_local $$p$addr$3$i) ) - (loop $while-out$120 $while-in$121 + (loop $while-out$108 $while-in$109 (set_local $$258 (i32.load (get_local $$d$7500$i) @@ -12692,7 +12700,7 @@ (get_local $$a$9$ph$i) ) ) - (block $do-once$122 + (block $do-once$110 (if (get_local $$cmp765$i) (block @@ -12745,7 +12753,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$122) + (br $do-once$110) ) ) (set_local $$261 @@ -12773,13 +12781,15 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$122) + (br $do-once$110) ) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) ) (set_local $$s753$2$i (get_local $$incdec$ptr776$i) @@ -12801,10 +12811,10 @@ (set_local $$s753$2$i (get_local $$s753$0$i) ) - (br $do-once$122) + (br $do-once$110) ) ) - (loop $while-out$124 $while-in$125 + (loop $while-out$112 $while-in$113 (set_local $$incdec$ptr773$i (i32.add (get_local $$s753$1496$i) @@ -12830,10 +12840,10 @@ (set_local $$s753$2$i (get_local $$incdec$ptr773$i) ) - (br $while-out$124) + (br $while-out$112) ) ) - (br $while-in$125) + (br $while-in$113) ) ) ) @@ -12931,10 +12941,10 @@ (set_local $$p$addr$5$lcssa$i (get_local $$sub806$i) ) - (br $while-out$120) + (br $while-out$108) ) ) - (br $while-in$121) + (br $while-in$109) ) ) (set_local $$p$addr$5$lcssa$i @@ -13110,10 +13120,12 @@ (if (get_local $$tobool$i$407$i) (block - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$1$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$1$i) + (get_local $$f) + ) ) (set_local $$$pre$i (i32.load @@ -13310,7 +13322,7 @@ (set_local $$s$addr$06$i (get_local $$add$ptr205) ) - (loop $while-out$129 $while-in$130 + (loop $while-out$133 $while-in$134 (set_local $$idxprom$i (i32.and (get_local $$99) @@ -13392,7 +13404,7 @@ (set_local $$incdec$ptr$i$212$lcssa (get_local $$incdec$ptr$i$212) ) - (br $while-out$129) + (br $while-out$133) ) (block (set_local $$101 @@ -13406,7 +13418,7 @@ ) ) ) - (br $while-in$130) + (br $while-in$134) ) (set_local $$107 (get_local $$arg) @@ -13658,7 +13670,7 @@ (set_local $$ws$0317 (get_local $$176) ) - (loop $while-out$131 $while-in$132 + (loop $while-out$129 $while-in$130 (set_local $$177 (i32.load (get_local $$ws$0317) @@ -13679,7 +13691,7 @@ (set_local $$l$2 (get_local $$l$1315) ) - (br $while-out$131) + (br $while-out$129) ) ) (set_local $$call384 @@ -13721,7 +13733,7 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$131) + (br $while-out$129) ) ) (set_local $$incdec$ptr383 @@ -13762,10 +13774,10 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$131) + (br $while-out$129) ) ) - (br $while-in$132) + (br $while-in$130) ) (set_local $$cmp397 (i32.lt_s @@ -13817,7 +13829,7 @@ (set_local $$ws$1326 (get_local $$178) ) - (loop $while-out$133 $while-in$134 + (loop $while-out$131 $while-in$132 (set_local $$179 (i32.load (get_local $$ws$1326) @@ -13925,10 +13937,10 @@ (set_local $label (i32.const 98) ) - (br $while-out$133) + (br $while-out$131) ) ) - (br $while-in$134) + (br $while-in$132) ) ) ) @@ -16202,10 +16214,12 @@ (get_local $$sub) ) ) - (call $_memset - (get_local $$pad) - (get_local $$c) - (get_local $$cond) + (drop + (call $_memset + (get_local $$pad) + (get_local $$c) + (get_local $$cond) + ) ) (set_local $$cmp3$14 (i32.gt_u @@ -16252,10 +16266,12 @@ (if (get_local $$tobool$i18) (block - (call $___fwritex - (get_local $$pad) - (i32.const 256) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$pad) + (i32.const 256) + (get_local $$f) + ) ) (set_local $$$pre (i32.load @@ -17672,7 +17688,7 @@ (get_local $$3) ) ) - (block $do-once$2 + (block $do-once$19 (if (get_local $$cmp10) (block @@ -17743,7 +17759,7 @@ (get_local $$1) (get_local $$3) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $_abort) ) @@ -18043,7 +18059,7 @@ (get_local $$10) ) ) - (block $do-once$4 + (block $do-once$21 (if (get_local $$cmp70) (block @@ -18125,7 +18141,7 @@ (set_local $$13 (get_local $$$pre) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $_abort) ) @@ -18568,7 +18584,7 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $$arrayidx23$i (i32.add (get_local $$t$0$i) @@ -18615,7 +18631,7 @@ (set_local $$v$0$i$lcssa (get_local $$v$0$i) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $$cond4$i (get_local $$23) @@ -18678,7 +18694,7 @@ (set_local $$v$0$i (get_local $$cond$v$0$i) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $$25 (i32.load @@ -18741,7 +18757,7 @@ (get_local $$v$0$i$lcssa) ) ) - (block $do-once$8 + (block $do-once$25 (if (get_local $$cmp40$i) (block @@ -18788,7 +18804,7 @@ (set_local $$R$3$i (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $$R$1$i @@ -18809,7 +18825,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $$arrayidx71$i (i32.add (get_local $$R$1$i) @@ -18838,7 +18854,7 @@ (set_local $$RP$1$i (get_local $$arrayidx71$i) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $$arrayidx75$i @@ -18867,7 +18883,7 @@ (set_local $$RP$1$i$lcssa (get_local $$RP$1$i) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $$R$1$i @@ -18878,7 +18894,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (set_local $$cmp81$i (i32.lt_u @@ -18897,7 +18913,7 @@ (set_local $$R$3$i (get_local $$R$1$i$lcssa) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -18977,7 +18993,7 @@ (set_local $$R$3$i (get_local $$27) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $_abort) ) @@ -18990,7 +19006,7 @@ (i32.const 0) ) ) - (block $do-once$12 + (block $do-once$29 (if (i32.eqz (get_local $$cmp90$i) @@ -19070,7 +19086,7 @@ (i32.const 180) (get_local $$and103$i) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19134,7 +19150,7 @@ ) (if (get_local $$cmp126$i) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19180,7 +19196,7 @@ (i32.const 0) ) ) - (block $do-once$14 + (block $do-once$31 (if (i32.eqz (get_local $$cmp138$i) @@ -19216,7 +19232,7 @@ (get_local $$parent149$i) (get_local $$R$3$i) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -19279,7 +19295,7 @@ (get_local $$parent166$i) (get_local $$R$3$i) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19884,7 +19900,7 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $$head$i$154 (i32.add (get_local $$t$0$i$151) @@ -20057,7 +20073,7 @@ (set_local $label (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $$rsize$0$i$152 @@ -20077,7 +20093,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -20346,7 +20362,7 @@ (get_local $label) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $label (i32.const 0) ) @@ -20427,7 +20443,7 @@ (set_local $label (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $$arrayidx113$i$159 @@ -20456,7 +20472,7 @@ (set_local $$v$4$lcssa$i (get_local $$t$4$v$4$i) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $$rsize$49$i @@ -20473,7 +20489,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $$cmp116$i @@ -20569,7 +20585,7 @@ (get_local $$v$4$lcssa$i) ) ) - (block $do-once$21 + (block $do-once$7 (if (get_local $$cmp128$i) (block @@ -20616,7 +20632,7 @@ (set_local $$R$3$i$171 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $$R$1$i$168 @@ -20637,7 +20653,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $$arrayidx161$i (i32.add (get_local $$R$1$i$168) @@ -20666,7 +20682,7 @@ (set_local $$RP$1$i$167 (get_local $$arrayidx161$i) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $$arrayidx165$i$169 @@ -20695,7 +20711,7 @@ (set_local $$RP$1$i$167$lcssa (get_local $$RP$1$i$167) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $$R$1$i$168 @@ -20706,7 +20722,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (set_local $$cmp171$i (i32.lt_u @@ -20725,7 +20741,7 @@ (set_local $$R$3$i$171 (get_local $$R$1$i$168$lcssa) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -20805,7 +20821,7 @@ (set_local $$R$3$i$171 (get_local $$64) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $_abort) ) @@ -20818,7 +20834,7 @@ (i32.const 0) ) ) - (block $do-once$25 + (block $do-once$11 (if (i32.eqz (get_local $$cmp180$i) @@ -20898,7 +20914,7 @@ (i32.const 180) (get_local $$and194$i) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -20962,7 +20978,7 @@ ) (if (get_local $$cmp217$i) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -21008,7 +21024,7 @@ (i32.const 0) ) ) - (block $do-once$27 + (block $do-once$13 (if (i32.eqz (get_local $$cmp229$i) @@ -21044,7 +21060,7 @@ (get_local $$parent240$i) (get_local $$R$3$i$171) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -21107,7 +21123,7 @@ (get_local $$parent257$i) (get_local $$R$3$i$171) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -21121,7 +21137,7 @@ (i32.const 16) ) ) - (block $do-once$29 + (block $do-once$15 (if (get_local $$cmp265$i) (block @@ -21368,7 +21384,7 @@ (get_local $$bk313$i) (get_local $$arrayidx289$i) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $$shr318$i @@ -21649,7 +21665,7 @@ (get_local $$fd371$i) (get_local $$add$ptr$i$161) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $$87 @@ -21694,7 +21710,7 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (set_local $$head386$i (i32.add (get_local $$T$0$i) @@ -21727,7 +21743,7 @@ (set_local $label (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $$shr391$i @@ -21777,7 +21793,7 @@ (set_local $label (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $$K373$0$i @@ -21788,7 +21804,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -21845,7 +21861,7 @@ (get_local $$fd408$i) (get_local $$add$ptr$i$161) ) - (br $do-once$29) + (br $do-once$15) ) ) ) @@ -21936,7 +21952,7 @@ (get_local $$parent433$i) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $_abort) ) @@ -22952,8 +22968,10 @@ (if (get_local $$cmp108$i) (block - (call_import $_sbrk - (get_local $$sub112$i) + (drop + (call_import $_sbrk + (get_local $$sub112$i) + ) ) (br $label$break$L279) ) @@ -23245,7 +23263,7 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-out$46 $while-in$47 + (loop $while-out$77 $while-in$78 (set_local $$shl$i$i (i32.shl (get_local $$i$01$i$i) @@ -23295,12 +23313,12 @@ ) (if (get_local $$exitcond$i$i) - (br $while-out$46) + (br $while-out$77) (set_local $$i$01$i$i (get_local $$inc$i$i) ) ) - (br $while-in$47) + (br $while-in$78) ) (set_local $$sub172$i (i32.add @@ -23414,7 +23432,7 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (set_local $$127 (i32.load (get_local $$sp$0108$i) @@ -23461,7 +23479,7 @@ (set_local $label (i32.const 203) ) - (br $while-out$48) + (br $while-out$46) ) ) (set_local $$next$i @@ -23483,12 +23501,12 @@ ) (if (get_local $$cmp186$i) - (br $while-out$48) + (br $while-out$46) (set_local $$sp$0108$i (get_local $$129) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -23707,7 +23725,7 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-out$50 $while-in$51 + (loop $while-out$48 $while-in$49 (set_local $$136 (i32.load (get_local $$sp$1107$i) @@ -23731,7 +23749,7 @@ (set_local $label (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (set_local $$next231$i @@ -23757,13 +23775,13 @@ (set_local $$sp$0$i$i$i (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) (set_local $$sp$1107$i (get_local $$137) ) ) - (br $while-in$51) + (br $while-in$49) ) (if (i32.eq @@ -23960,7 +23978,7 @@ (get_local $$119) ) ) - (block $do-once$52 + (block $do-once$50 (if (get_local $$cmp20$i$i) (block @@ -24060,7 +24078,7 @@ (get_local $$add$ptr30$i$i) (get_local $$add26$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$head32$i$i @@ -24154,7 +24172,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eqz (get_local $$cmp41$i$i) @@ -24189,7 +24207,7 @@ ) (if (get_local $$cmp44$i$i) - (br $do-once$55) + (br $do-once$61) ) (call_import $_abort) ) @@ -24240,7 +24258,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $$cmp54$i$i) (block @@ -24288,7 +24306,7 @@ (set_local $$fd68$pre$phi$i$iZ2D (get_local $$fd59$i$i) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -24339,7 +24357,7 @@ (get_local $$add$ptr16$i$i) ) ) - (block $do-once$59 + (block $do-once$53 (if (get_local $$cmp75$i$i) (block @@ -24386,7 +24404,7 @@ (set_local $$R$3$i$i (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $$R$1$i$i @@ -24407,7 +24425,7 @@ ) ) ) - (loop $while-out$61 $while-in$62 + (loop $while-out$55 $while-in$56 (set_local $$arrayidx103$i$i (i32.add (get_local $$R$1$i$i) @@ -24436,7 +24454,7 @@ (set_local $$RP$1$i$i (get_local $$arrayidx103$i$i) ) - (br $while-in$62) + (br $while-in$56) ) ) (set_local $$arrayidx107$i$i @@ -24465,7 +24483,7 @@ (set_local $$RP$1$i$i$lcssa (get_local $$RP$1$i$i) ) - (br $while-out$61) + (br $while-out$55) ) (block (set_local $$R$1$i$i @@ -24476,7 +24494,7 @@ ) ) ) - (br $while-in$62) + (br $while-in$56) ) (set_local $$cmp112$i$i (i32.lt_u @@ -24495,7 +24513,7 @@ (set_local $$R$3$i$i (get_local $$R$1$i$i$lcssa) ) - (br $do-once$59) + (br $do-once$53) ) ) ) @@ -24575,7 +24593,7 @@ (set_local $$R$3$i$i (get_local $$155) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $_abort) ) @@ -24623,7 +24641,7 @@ (get_local $$164) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $$cmp124$i$i) (block @@ -24641,7 +24659,7 @@ (i32.eqz (get_local $$cond2$i$i) ) - (br $do-once$63) + (br $do-once$57) ) (set_local $$shl131$i$i (i32.shl @@ -24779,7 +24797,7 @@ (i32.const 0) ) ) - (block $do-once$65 + (block $do-once$59 (if (i32.eqz (get_local $$cmp168$i$i) @@ -24815,7 +24833,7 @@ (get_local $$parent179$i$i) (get_local $$R$3$i$i) ) - (br $do-once$65) + (br $do-once$59) ) ) ) @@ -25011,7 +25029,7 @@ (i32.const 0) ) ) - (block $do-once$67 + (block $do-once$65 (if (get_local $$tobool228$i$i) (block @@ -25072,7 +25090,7 @@ (set_local $$F224$0$i$i (get_local $$175) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -25113,7 +25131,7 @@ (get_local $$bk248$i$i) (get_local $$arrayidx223$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$shr253$i$i @@ -25128,7 +25146,7 @@ (i32.const 0) ) ) - (block $do-once$69 + (block $do-once$67 (if (get_local $$cmp254$i$i) (set_local $$I252$0$i$i @@ -25147,7 +25165,7 @@ (set_local $$I252$0$i$i (i32.const 31) ) - (br $do-once$69) + (br $do-once$67) ) ) (set_local $$sub262$i$i @@ -25397,7 +25415,7 @@ (get_local $$fd303$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$178 @@ -25442,7 +25460,7 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (set_local $$head317$i$i (i32.add (get_local $$T$0$i$58$i) @@ -25475,7 +25493,7 @@ (set_local $label (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $$shr322$i$i @@ -25525,7 +25543,7 @@ (set_local $label (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $$K305$0$i$i @@ -25536,7 +25554,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (if (i32.eq @@ -25593,7 +25611,7 @@ (get_local $$fd339$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) ) @@ -25684,7 +25702,7 @@ (get_local $$parent361$i$i) (i32.const 0) ) - (br $do-once$52) + (br $do-once$50) ) (call_import $_abort) ) @@ -25713,7 +25731,7 @@ ) ) ) - (loop $while-out$73 $while-in$74 + (loop $while-out$71 $while-in$72 (set_local $$185 (i32.load (get_local $$sp$0$i$i$i) @@ -25759,7 +25777,7 @@ (set_local $$add$ptr$i$i$i$lcssa (get_local $$add$ptr$i$i$i) ) - (br $while-out$73) + (br $while-out$71) ) ) ) @@ -25778,7 +25796,7 @@ (set_local $$sp$0$i$i$i (get_local $$187) ) - (br $while-in$74) + (br $while-in$72) ) (set_local $$add$ptr2$i$i (i32.add @@ -26041,7 +26059,7 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (set_local $$add$ptr24$i$i (i32.add (get_local $$p$0$i$i) @@ -26069,9 +26087,9 @@ (set_local $$p$0$i$i (get_local $$add$ptr24$i$i) ) - (br $while-out$75) + (br $while-out$73) ) - (br $while-in$76) + (br $while-in$74) ) (set_local $$cmp28$i$i (i32.eq @@ -26601,7 +26619,7 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-out$77 $while-in$78 + (loop $while-out$75 $while-in$76 (set_local $$head118$i$i (i32.add (get_local $$T$0$i$i) @@ -26634,7 +26652,7 @@ (set_local $label (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $$shr123$i$i @@ -26684,7 +26702,7 @@ (set_local $label (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $$K105$0$i$i @@ -26695,7 +26713,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) (if (i32.eq @@ -31270,14 +31288,16 @@ (get_local $$2$1) ) ) - (call $___udivmoddi4 - (get_local $$4$0) - (get_local $$4$1) - (get_local $$6$0) - (i32.load - (i32.const 168) + (drop + (call $___udivmoddi4 + (get_local $$4$0) + (get_local $$4$1) + (get_local $$6$0) + (i32.load + (i32.const 168) + ) + (get_local $$rem) ) - (get_local $$rem) ) (set_local $$10$0 (call $_i64Subtract @@ -31414,12 +31434,14 @@ (set_local $$rem (get_local $__stackBase__) ) - (call $___udivmoddi4 - (get_local $$a$0) - (get_local $$a$1) - (get_local $$b$0) - (get_local $$b$1) - (get_local $$rem) + (drop + (call $___udivmoddi4 + (get_local $$a$0) + (get_local $$a$1) + (get_local $$b$0) + (get_local $$b$1) + (get_local $$rem) + ) ) (i32.store (i32.const 8) @@ -32460,11 +32482,13 @@ ) ) ) - (call $_i64Subtract - (get_local $$137$0) - (get_local $$137$1) - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) + (drop + (call $_i64Subtract + (get_local $$137$0) + (get_local $$137$1) + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) + ) ) (set_local $$150$1 (i32.load diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index efa2de849..fcf34e3ec 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -352,9 +352,11 @@ (set_local $$retval (i32.const 0) ) - (call $_printf - (i32.const 672) - (get_local $$vararg_buffer) + (drop + (call $_printf + (i32.const 672) + (get_local $$vararg_buffer) + ) ) (i32.store (i32.const 8) @@ -2648,17 +2650,19 @@ (get_local $$write) ) ) - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (get_local $$5) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (get_local $$5) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) + (get_local $$f) + (i32.const 0) + (i32.const 0) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) (set_local $$6 (i32.load @@ -3143,10 +3147,12 @@ ) ) ) - (call $_memcpy - (get_local $$9) - (get_local $$s$addr$0) - (get_local $$l$addr$0) + (drop + (call $_memcpy + (get_local $$9) + (get_local $$s$addr$0) + (get_local $$l$addr$0) + ) ) (set_local $$10 (i32.load @@ -4551,17 +4557,19 @@ (get_local $$write) ) ) - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (get_local $$2) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (get_local $$2) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) + (get_local $$f) + (i32.const 0) + (i32.const 0) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) (set_local $$3 (i32.load @@ -12221,7 +12229,7 @@ (set_local $$d$5494$i (get_local $$r$0$a$9$i) ) - (loop $while-out$108 $while-in$109 + (loop $while-out$114 $while-in$115 (set_local $$248 (i32.load (get_local $$d$5494$i) @@ -12240,7 +12248,7 @@ (get_local $$r$0$a$9$i) ) ) - (block $do-once$110 + (block $do-once$116 (if (get_local $$cmp673$i) (block @@ -12258,7 +12266,7 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$110) + (br $do-once$116) ) ) (i32.store8 @@ -12285,10 +12293,10 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$110) + (br $do-once$116) ) ) - (loop $while-out$112 $while-in$113 + (loop $while-out$118 $while-in$119 (set_local $$incdec$ptr681$i (i32.add (get_local $$s668$0492$i) @@ -12314,10 +12322,10 @@ (set_local $$s668$1$i (get_local $$incdec$ptr681$i) ) - (br $while-out$112) + (br $while-out$118) ) ) - (br $while-in$113) + (br $while-in$119) ) ) ) @@ -12376,13 +12384,13 @@ (set_local $$incdec$ptr698$i$lcssa (get_local $$incdec$ptr698$i) ) - (br $while-out$108) + (br $while-out$114) ) (set_local $$d$5494$i (get_local $$incdec$ptr698$i) ) ) - (br $while-in$109) + (br $while-in$115) ) (set_local $$251 (i32.eq @@ -12390,7 +12398,7 @@ (i32.const 0) ) ) - (block $do-once$114 + (block $do-once$120 (if (i32.eqz (get_local $$251) @@ -12417,7 +12425,7 @@ (i32.eqz (get_local $$tobool$i$449$i) ) - (br $do-once$114) + (br $do-once$120) ) (call $___fwritex (i32.const 4143) @@ -12454,7 +12462,7 @@ (set_local $$p$addr$4489$i (get_local $$p$addr$3$i) ) - (loop $while-out$116 $while-in$117 + (loop $while-out$122 $while-in$123 (set_local $$254 (i32.load (get_local $$d$6488$i) @@ -12479,7 +12487,7 @@ (set_local $$s715$0484$i (get_local $$255) ) - (loop $while-out$118 $while-in$119 + (loop $while-out$124 $while-in$125 (set_local $$incdec$ptr725$i (i32.add (get_local $$s715$0484$i) @@ -12505,10 +12513,10 @@ (set_local $$s715$0$lcssa$i (get_local $$incdec$ptr725$i) ) - (br $while-out$118) + (br $while-out$124) ) ) - (br $while-in$119) + (br $while-in$125) ) ) (set_local $$s715$0$lcssa$i @@ -12599,10 +12607,10 @@ (set_local $$p$addr$4$lcssa$i (get_local $$sub735$i) ) - (br $while-out$116) + (br $while-out$122) ) ) - (br $while-in$117) + (br $while-in$123) ) ) (set_local $$p$addr$4$lcssa$i @@ -12658,7 +12666,7 @@ (set_local $$p$addr$5501$i (get_local $$p$addr$3$i) ) - (loop $while-out$120 $while-in$121 + (loop $while-out$108 $while-in$109 (set_local $$258 (i32.load (get_local $$d$7500$i) @@ -12698,7 +12706,7 @@ (get_local $$a$9$ph$i) ) ) - (block $do-once$122 + (block $do-once$110 (if (get_local $$cmp765$i) (block @@ -12751,7 +12759,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$122) + (br $do-once$110) ) ) (set_local $$261 @@ -12779,13 +12787,15 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$122) + (br $do-once$110) ) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) ) (set_local $$s753$2$i (get_local $$incdec$ptr776$i) @@ -12807,10 +12817,10 @@ (set_local $$s753$2$i (get_local $$s753$0$i) ) - (br $do-once$122) + (br $do-once$110) ) ) - (loop $while-out$124 $while-in$125 + (loop $while-out$112 $while-in$113 (set_local $$incdec$ptr773$i (i32.add (get_local $$s753$1496$i) @@ -12836,10 +12846,10 @@ (set_local $$s753$2$i (get_local $$incdec$ptr773$i) ) - (br $while-out$124) + (br $while-out$112) ) ) - (br $while-in$125) + (br $while-in$113) ) ) ) @@ -12937,10 +12947,10 @@ (set_local $$p$addr$5$lcssa$i (get_local $$sub806$i) ) - (br $while-out$120) + (br $while-out$108) ) ) - (br $while-in$121) + (br $while-in$109) ) ) (set_local $$p$addr$5$lcssa$i @@ -13116,10 +13126,12 @@ (if (get_local $$tobool$i$407$i) (block - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$1$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$1$i) + (get_local $$f) + ) ) (set_local $$$pre$i (i32.load @@ -13316,7 +13328,7 @@ (set_local $$s$addr$06$i (get_local $$add$ptr205) ) - (loop $while-out$129 $while-in$130 + (loop $while-out$133 $while-in$134 (set_local $$idxprom$i (i32.and (get_local $$99) @@ -13398,7 +13410,7 @@ (set_local $$incdec$ptr$i$212$lcssa (get_local $$incdec$ptr$i$212) ) - (br $while-out$129) + (br $while-out$133) ) (block (set_local $$101 @@ -13412,7 +13424,7 @@ ) ) ) - (br $while-in$130) + (br $while-in$134) ) (set_local $$107 (get_local $$arg) @@ -13664,7 +13676,7 @@ (set_local $$ws$0317 (get_local $$176) ) - (loop $while-out$131 $while-in$132 + (loop $while-out$129 $while-in$130 (set_local $$177 (i32.load (get_local $$ws$0317) @@ -13685,7 +13697,7 @@ (set_local $$l$2 (get_local $$l$1315) ) - (br $while-out$131) + (br $while-out$129) ) ) (set_local $$call384 @@ -13727,7 +13739,7 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$131) + (br $while-out$129) ) ) (set_local $$incdec$ptr383 @@ -13768,10 +13780,10 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$131) + (br $while-out$129) ) ) - (br $while-in$132) + (br $while-in$130) ) (set_local $$cmp397 (i32.lt_s @@ -13823,7 +13835,7 @@ (set_local $$ws$1326 (get_local $$178) ) - (loop $while-out$133 $while-in$134 + (loop $while-out$131 $while-in$132 (set_local $$179 (i32.load (get_local $$ws$1326) @@ -13931,10 +13943,10 @@ (set_local $label (i32.const 98) ) - (br $while-out$133) + (br $while-out$131) ) ) - (br $while-in$134) + (br $while-in$132) ) ) ) @@ -16208,10 +16220,12 @@ (get_local $$sub) ) ) - (call $_memset - (get_local $$pad) - (get_local $$c) - (get_local $$cond) + (drop + (call $_memset + (get_local $$pad) + (get_local $$c) + (get_local $$cond) + ) ) (set_local $$cmp3$14 (i32.gt_u @@ -16258,10 +16272,12 @@ (if (get_local $$tobool$i18) (block - (call $___fwritex - (get_local $$pad) - (i32.const 256) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$pad) + (i32.const 256) + (get_local $$f) + ) ) (set_local $$$pre (i32.load @@ -17678,7 +17694,7 @@ (get_local $$3) ) ) - (block $do-once$2 + (block $do-once$19 (if (get_local $$cmp10) (block @@ -17749,7 +17765,7 @@ (get_local $$1) (get_local $$3) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $_abort) ) @@ -18049,7 +18065,7 @@ (get_local $$10) ) ) - (block $do-once$4 + (block $do-once$21 (if (get_local $$cmp70) (block @@ -18131,7 +18147,7 @@ (set_local $$13 (get_local $$$pre) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $_abort) ) @@ -18574,7 +18590,7 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $$arrayidx23$i (i32.add (get_local $$t$0$i) @@ -18621,7 +18637,7 @@ (set_local $$v$0$i$lcssa (get_local $$v$0$i) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $$cond4$i (get_local $$23) @@ -18684,7 +18700,7 @@ (set_local $$v$0$i (get_local $$cond$v$0$i) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $$25 (i32.load @@ -18747,7 +18763,7 @@ (get_local $$v$0$i$lcssa) ) ) - (block $do-once$8 + (block $do-once$25 (if (get_local $$cmp40$i) (block @@ -18794,7 +18810,7 @@ (set_local $$R$3$i (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $$R$1$i @@ -18815,7 +18831,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $$arrayidx71$i (i32.add (get_local $$R$1$i) @@ -18844,7 +18860,7 @@ (set_local $$RP$1$i (get_local $$arrayidx71$i) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $$arrayidx75$i @@ -18873,7 +18889,7 @@ (set_local $$RP$1$i$lcssa (get_local $$RP$1$i) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $$R$1$i @@ -18884,7 +18900,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (set_local $$cmp81$i (i32.lt_u @@ -18903,7 +18919,7 @@ (set_local $$R$3$i (get_local $$R$1$i$lcssa) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -18983,7 +18999,7 @@ (set_local $$R$3$i (get_local $$27) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $_abort) ) @@ -18996,7 +19012,7 @@ (i32.const 0) ) ) - (block $do-once$12 + (block $do-once$29 (if (i32.eqz (get_local $$cmp90$i) @@ -19076,7 +19092,7 @@ (i32.const 180) (get_local $$and103$i) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19140,7 +19156,7 @@ ) (if (get_local $$cmp126$i) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19186,7 +19202,7 @@ (i32.const 0) ) ) - (block $do-once$14 + (block $do-once$31 (if (i32.eqz (get_local $$cmp138$i) @@ -19222,7 +19238,7 @@ (get_local $$parent149$i) (get_local $$R$3$i) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -19285,7 +19301,7 @@ (get_local $$parent166$i) (get_local $$R$3$i) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -19890,7 +19906,7 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $$head$i$154 (i32.add (get_local $$t$0$i$151) @@ -20063,7 +20079,7 @@ (set_local $label (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $$rsize$0$i$152 @@ -20083,7 +20099,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -20352,7 +20368,7 @@ (get_local $label) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $label (i32.const 0) ) @@ -20433,7 +20449,7 @@ (set_local $label (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $$arrayidx113$i$159 @@ -20462,7 +20478,7 @@ (set_local $$v$4$lcssa$i (get_local $$t$4$v$4$i) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $$rsize$49$i @@ -20479,7 +20495,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $$cmp116$i @@ -20575,7 +20591,7 @@ (get_local $$v$4$lcssa$i) ) ) - (block $do-once$21 + (block $do-once$7 (if (get_local $$cmp128$i) (block @@ -20622,7 +20638,7 @@ (set_local $$R$3$i$171 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $$R$1$i$168 @@ -20643,7 +20659,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $$arrayidx161$i (i32.add (get_local $$R$1$i$168) @@ -20672,7 +20688,7 @@ (set_local $$RP$1$i$167 (get_local $$arrayidx161$i) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $$arrayidx165$i$169 @@ -20701,7 +20717,7 @@ (set_local $$RP$1$i$167$lcssa (get_local $$RP$1$i$167) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $$R$1$i$168 @@ -20712,7 +20728,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (set_local $$cmp171$i (i32.lt_u @@ -20731,7 +20747,7 @@ (set_local $$R$3$i$171 (get_local $$R$1$i$168$lcssa) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -20811,7 +20827,7 @@ (set_local $$R$3$i$171 (get_local $$64) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $_abort) ) @@ -20824,7 +20840,7 @@ (i32.const 0) ) ) - (block $do-once$25 + (block $do-once$11 (if (i32.eqz (get_local $$cmp180$i) @@ -20904,7 +20920,7 @@ (i32.const 180) (get_local $$and194$i) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -20968,7 +20984,7 @@ ) (if (get_local $$cmp217$i) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -21014,7 +21030,7 @@ (i32.const 0) ) ) - (block $do-once$27 + (block $do-once$13 (if (i32.eqz (get_local $$cmp229$i) @@ -21050,7 +21066,7 @@ (get_local $$parent240$i) (get_local $$R$3$i$171) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -21113,7 +21129,7 @@ (get_local $$parent257$i) (get_local $$R$3$i$171) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -21127,7 +21143,7 @@ (i32.const 16) ) ) - (block $do-once$29 + (block $do-once$15 (if (get_local $$cmp265$i) (block @@ -21374,7 +21390,7 @@ (get_local $$bk313$i) (get_local $$arrayidx289$i) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $$shr318$i @@ -21655,7 +21671,7 @@ (get_local $$fd371$i) (get_local $$add$ptr$i$161) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $$87 @@ -21700,7 +21716,7 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (set_local $$head386$i (i32.add (get_local $$T$0$i) @@ -21733,7 +21749,7 @@ (set_local $label (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $$shr391$i @@ -21783,7 +21799,7 @@ (set_local $label (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $$K373$0$i @@ -21794,7 +21810,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -21851,7 +21867,7 @@ (get_local $$fd408$i) (get_local $$add$ptr$i$161) ) - (br $do-once$29) + (br $do-once$15) ) ) ) @@ -21942,7 +21958,7 @@ (get_local $$parent433$i) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $_abort) ) @@ -22958,8 +22974,10 @@ (if (get_local $$cmp108$i) (block - (call_import $_sbrk - (get_local $$sub112$i) + (drop + (call_import $_sbrk + (get_local $$sub112$i) + ) ) (br $label$break$L279) ) @@ -23251,7 +23269,7 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-out$46 $while-in$47 + (loop $while-out$77 $while-in$78 (set_local $$shl$i$i (i32.shl (get_local $$i$01$i$i) @@ -23301,12 +23319,12 @@ ) (if (get_local $$exitcond$i$i) - (br $while-out$46) + (br $while-out$77) (set_local $$i$01$i$i (get_local $$inc$i$i) ) ) - (br $while-in$47) + (br $while-in$78) ) (set_local $$sub172$i (i32.add @@ -23420,7 +23438,7 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (set_local $$127 (i32.load (get_local $$sp$0108$i) @@ -23467,7 +23485,7 @@ (set_local $label (i32.const 203) ) - (br $while-out$48) + (br $while-out$46) ) ) (set_local $$next$i @@ -23489,12 +23507,12 @@ ) (if (get_local $$cmp186$i) - (br $while-out$48) + (br $while-out$46) (set_local $$sp$0108$i (get_local $$129) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -23713,7 +23731,7 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-out$50 $while-in$51 + (loop $while-out$48 $while-in$49 (set_local $$136 (i32.load (get_local $$sp$1107$i) @@ -23737,7 +23755,7 @@ (set_local $label (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (set_local $$next231$i @@ -23763,13 +23781,13 @@ (set_local $$sp$0$i$i$i (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) (set_local $$sp$1107$i (get_local $$137) ) ) - (br $while-in$51) + (br $while-in$49) ) (if (i32.eq @@ -23966,7 +23984,7 @@ (get_local $$119) ) ) - (block $do-once$52 + (block $do-once$50 (if (get_local $$cmp20$i$i) (block @@ -24066,7 +24084,7 @@ (get_local $$add$ptr30$i$i) (get_local $$add26$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$head32$i$i @@ -24160,7 +24178,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eqz (get_local $$cmp41$i$i) @@ -24195,7 +24213,7 @@ ) (if (get_local $$cmp44$i$i) - (br $do-once$55) + (br $do-once$61) ) (call_import $_abort) ) @@ -24246,7 +24264,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $$cmp54$i$i) (block @@ -24294,7 +24312,7 @@ (set_local $$fd68$pre$phi$i$iZ2D (get_local $$fd59$i$i) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -24345,7 +24363,7 @@ (get_local $$add$ptr16$i$i) ) ) - (block $do-once$59 + (block $do-once$53 (if (get_local $$cmp75$i$i) (block @@ -24392,7 +24410,7 @@ (set_local $$R$3$i$i (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $$R$1$i$i @@ -24413,7 +24431,7 @@ ) ) ) - (loop $while-out$61 $while-in$62 + (loop $while-out$55 $while-in$56 (set_local $$arrayidx103$i$i (i32.add (get_local $$R$1$i$i) @@ -24442,7 +24460,7 @@ (set_local $$RP$1$i$i (get_local $$arrayidx103$i$i) ) - (br $while-in$62) + (br $while-in$56) ) ) (set_local $$arrayidx107$i$i @@ -24471,7 +24489,7 @@ (set_local $$RP$1$i$i$lcssa (get_local $$RP$1$i$i) ) - (br $while-out$61) + (br $while-out$55) ) (block (set_local $$R$1$i$i @@ -24482,7 +24500,7 @@ ) ) ) - (br $while-in$62) + (br $while-in$56) ) (set_local $$cmp112$i$i (i32.lt_u @@ -24501,7 +24519,7 @@ (set_local $$R$3$i$i (get_local $$R$1$i$i$lcssa) ) - (br $do-once$59) + (br $do-once$53) ) ) ) @@ -24581,7 +24599,7 @@ (set_local $$R$3$i$i (get_local $$155) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $_abort) ) @@ -24629,7 +24647,7 @@ (get_local $$164) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $$cmp124$i$i) (block @@ -24647,7 +24665,7 @@ (i32.eqz (get_local $$cond2$i$i) ) - (br $do-once$63) + (br $do-once$57) ) (set_local $$shl131$i$i (i32.shl @@ -24785,7 +24803,7 @@ (i32.const 0) ) ) - (block $do-once$65 + (block $do-once$59 (if (i32.eqz (get_local $$cmp168$i$i) @@ -24821,7 +24839,7 @@ (get_local $$parent179$i$i) (get_local $$R$3$i$i) ) - (br $do-once$65) + (br $do-once$59) ) ) ) @@ -25017,7 +25035,7 @@ (i32.const 0) ) ) - (block $do-once$67 + (block $do-once$65 (if (get_local $$tobool228$i$i) (block @@ -25078,7 +25096,7 @@ (set_local $$F224$0$i$i (get_local $$175) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -25119,7 +25137,7 @@ (get_local $$bk248$i$i) (get_local $$arrayidx223$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$shr253$i$i @@ -25134,7 +25152,7 @@ (i32.const 0) ) ) - (block $do-once$69 + (block $do-once$67 (if (get_local $$cmp254$i$i) (set_local $$I252$0$i$i @@ -25153,7 +25171,7 @@ (set_local $$I252$0$i$i (i32.const 31) ) - (br $do-once$69) + (br $do-once$67) ) ) (set_local $$sub262$i$i @@ -25403,7 +25421,7 @@ (get_local $$fd303$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $$178 @@ -25448,7 +25466,7 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (set_local $$head317$i$i (i32.add (get_local $$T$0$i$58$i) @@ -25481,7 +25499,7 @@ (set_local $label (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $$shr322$i$i @@ -25531,7 +25549,7 @@ (set_local $label (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $$K305$0$i$i @@ -25542,7 +25560,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (if (i32.eq @@ -25599,7 +25617,7 @@ (get_local $$fd339$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$52) + (br $do-once$50) ) ) ) @@ -25690,7 +25708,7 @@ (get_local $$parent361$i$i) (i32.const 0) ) - (br $do-once$52) + (br $do-once$50) ) (call_import $_abort) ) @@ -25719,7 +25737,7 @@ ) ) ) - (loop $while-out$73 $while-in$74 + (loop $while-out$71 $while-in$72 (set_local $$185 (i32.load (get_local $$sp$0$i$i$i) @@ -25765,7 +25783,7 @@ (set_local $$add$ptr$i$i$i$lcssa (get_local $$add$ptr$i$i$i) ) - (br $while-out$73) + (br $while-out$71) ) ) ) @@ -25784,7 +25802,7 @@ (set_local $$sp$0$i$i$i (get_local $$187) ) - (br $while-in$74) + (br $while-in$72) ) (set_local $$add$ptr2$i$i (i32.add @@ -26047,7 +26065,7 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (set_local $$add$ptr24$i$i (i32.add (get_local $$p$0$i$i) @@ -26075,9 +26093,9 @@ (set_local $$p$0$i$i (get_local $$add$ptr24$i$i) ) - (br $while-out$75) + (br $while-out$73) ) - (br $while-in$76) + (br $while-in$74) ) (set_local $$cmp28$i$i (i32.eq @@ -26607,7 +26625,7 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-out$77 $while-in$78 + (loop $while-out$75 $while-in$76 (set_local $$head118$i$i (i32.add (get_local $$T$0$i$i) @@ -26640,7 +26658,7 @@ (set_local $label (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $$shr123$i$i @@ -26690,7 +26708,7 @@ (set_local $label (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $$K105$0$i$i @@ -26701,7 +26719,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) (if (i32.eq @@ -31276,14 +31294,16 @@ (get_local $$2$1) ) ) - (call $___udivmoddi4 - (get_local $$4$0) - (get_local $$4$1) - (get_local $$6$0) - (i32.load - (i32.const 168) + (drop + (call $___udivmoddi4 + (get_local $$4$0) + (get_local $$4$1) + (get_local $$6$0) + (i32.load + (i32.const 168) + ) + (get_local $$rem) ) - (get_local $$rem) ) (set_local $$10$0 (call $_i64Subtract @@ -31420,12 +31440,14 @@ (set_local $$rem (get_local $__stackBase__) ) - (call $___udivmoddi4 - (get_local $$a$0) - (get_local $$a$1) - (get_local $$b$0) - (get_local $$b$1) - (get_local $$rem) + (drop + (call $___udivmoddi4 + (get_local $$a$0) + (get_local $$a$1) + (get_local $$b$0) + (get_local $$b$1) + (get_local $$rem) + ) ) (i32.store (i32.const 8) @@ -32466,11 +32488,13 @@ ) ) ) - (call $_i64Subtract - (get_local $$137$0) - (get_local $$137$1) - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) + (drop + (call $_i64Subtract + (get_local $$137$0) + (get_local $$137$1) + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) + ) ) (set_local $$150$1 (i32.load diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 0aaf5ab95..d22a30e9c 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -64,6 +64,10 @@ BinaryenExpressionRef makeSomething(BinaryenModuleRef module) { return makeInt32(module, 1337); } +BinaryenExpressionRef makeDroppedInt32(BinaryenModuleRef module, int x) { + return BinaryenDrop(module, BinaryenConst(module, BinaryenLiteralInt32(x))); +} + // tests void test_types() { @@ -202,14 +206,15 @@ void test_core() { BinaryenUnary(module, BinaryenEqZInt32(), // check the output type of the call node BinaryenCallIndirect(module, makeInt32(module, 2449), callOperands4, 4, "iiIfF") ), - BinaryenGetLocal(module, 0, BinaryenInt32()), + BinaryenDrop(module, BinaryenGetLocal(module, 0, BinaryenInt32())), BinaryenSetLocal(module, 0, makeInt32(module, 101)), + BinaryenDrop(module, BinaryenTeeLocal(module, 0, makeInt32(module, 102))), BinaryenLoad(module, 4, 0, 0, 0, BinaryenInt32(), makeInt32(module, 1)), BinaryenLoad(module, 1, 1, 2, 4, BinaryenInt64(), makeInt32(module, 8)), BinaryenLoad(module, 4, 0, 0, 0, BinaryenFloat32(), makeInt32(module, 2)), BinaryenLoad(module, 8, 0, 2, 8, BinaryenFloat64(), makeInt32(module, 9)), - BinaryenStore(module, 4, 0, 0, temp13, temp14), - BinaryenStore(module, 8, 2, 4, temp15, temp16), + BinaryenStore(module, 4, 0, 0, temp13, temp14, BinaryenInt32()), + BinaryenStore(module, 8, 2, 4, temp15, temp16, BinaryenInt64()), BinaryenSelect(module, temp10, temp11, temp12), BinaryenReturn(module, makeInt32(module, 1337)), // TODO: Host @@ -221,7 +226,8 @@ void test_core() { // Make the main body of the function. and one block with a return value, one without BinaryenExpressionRef value = BinaryenBlock(module, "the-value", valueList, sizeof(valueList) / sizeof(BinaryenExpressionRef)); - BinaryenExpressionRef nothing = BinaryenBlock(module, "the-nothing", &value, 1); + BinaryenExpressionRef droppedValue = BinaryenDrop(module, value); + BinaryenExpressionRef nothing = BinaryenBlock(module, "the-nothing", &droppedValue, 1); BinaryenExpressionRef bodyList[] = { nothing, makeInt32(module, 42) }; BinaryenExpressionRef body = BinaryenBlock(module, "the-body", bodyList, 2); @@ -260,6 +266,9 @@ void test_core() { BinaryenFunctionTypeRef noname = BinaryenAddFunctionType(module, NULL, BinaryenNone(), NULL, 0); + // A bunch of our code needs drop(), auto-add it + BinaryenModuleAutoDrop(module); + // Verify it validates assert(BinaryenModuleValidate(module)); @@ -304,7 +313,7 @@ void test_relooper() { RelooperRef relooper = RelooperCreate(); RelooperBlockRef block0 = RelooperAddBlock(relooper, makeCallCheck(module, 0)); RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); - RelooperAddBranch(block0, block1, NULL, makeInt32(module, 77)); // code on branch + RelooperAddBranch(block0, block1, NULL, makeDroppedInt32(module, 77)); // code on branch BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "two-blocks-plus-code", v, localTypes, 1, body); } @@ -321,8 +330,8 @@ void test_relooper() { RelooperRef relooper = RelooperCreate(); RelooperBlockRef block0 = RelooperAddBlock(relooper, makeCallCheck(module, 0)); RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); - RelooperAddBranch(block0, block1, NULL, makeInt32(module, 33)); - RelooperAddBranch(block1, block0, NULL, makeInt32(module, -66)); + RelooperAddBranch(block0, block1, NULL, makeDroppedInt32(module, 33)); + RelooperAddBranch(block1, block0, NULL, makeDroppedInt32(module, -66)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "loop-plus-code", v, localTypes, 1, body); } @@ -341,9 +350,9 @@ void test_relooper() { RelooperBlockRef block0 = RelooperAddBlock(relooper, makeCallCheck(module, 0)); RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); RelooperBlockRef block2 = RelooperAddBlock(relooper, makeCallCheck(module, 2)); - BinaryenExpressionRef temp = makeInt32(module, 10); + BinaryenExpressionRef temp = makeDroppedInt32(module, 10); RelooperAddBranch(block0, block1, makeInt32(module, 55), temp); - RelooperAddBranch(block0, block2, NULL, makeInt32(module, 20)); + RelooperAddBranch(block0, block2, NULL, makeDroppedInt32(module, 20)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "split-plus-code", v, localTypes, 1, body); } @@ -363,10 +372,10 @@ void test_relooper() { RelooperBlockRef block0 = RelooperAddBlock(relooper, makeCallCheck(module, 0)); RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); RelooperBlockRef block2 = RelooperAddBlock(relooper, makeCallCheck(module, 2)); - BinaryenExpressionRef temp = makeInt32(module, -1); + BinaryenExpressionRef temp = makeDroppedInt32(module, -1); RelooperAddBranch(block0, block1, makeInt32(module, 55), temp); - RelooperAddBranch(block0, block2, NULL, makeInt32(module, -2)); - RelooperAddBranch(block1, block2, NULL, makeInt32(module, -3)); + RelooperAddBranch(block0, block2, NULL, makeDroppedInt32(module, -2)); + RelooperAddBranch(block1, block2, NULL, makeDroppedInt32(module, -3)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "if-plus-code", v, localTypes, 1, body); } @@ -403,15 +412,15 @@ void test_relooper() { RelooperBlockRef block4 = RelooperAddBlock(relooper, makeCallCheck(module, 4)); RelooperBlockRef block5 = RelooperAddBlock(relooper, makeCallCheck(module, 5)); RelooperBlockRef block6 = RelooperAddBlock(relooper, makeCallCheck(module, 6)); - RelooperAddBranch(block0, block1, NULL, makeInt32(module, 10)); + RelooperAddBranch(block0, block1, NULL, makeDroppedInt32(module, 10)); RelooperAddBranch(block1, block2, makeInt32(module, -2), NULL); - RelooperAddBranch(block1, block6, NULL, makeInt32(module, 20)); + RelooperAddBranch(block1, block6, NULL, makeDroppedInt32(module, 20)); RelooperAddBranch(block2, block3, makeInt32(module, -6), NULL); - RelooperAddBranch(block2, block1, NULL, makeInt32(module, 30)); + RelooperAddBranch(block2, block1, NULL, makeDroppedInt32(module, 30)); RelooperAddBranch(block3, block4, makeInt32(module, -10), NULL); RelooperAddBranch(block3, block5, NULL, NULL); RelooperAddBranch(block4, block5, NULL, NULL); - RelooperAddBranch(block5, block6, NULL, makeInt32(module, 40)); + RelooperAddBranch(block5, block6, NULL, makeDroppedInt32(module, 40)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "nontrivial-loop-plus-phi-to-head", v, localTypes, 1, body); } @@ -425,7 +434,7 @@ void test_relooper() { BinaryenIndex to_block1[] = { 2, 5 }; RelooperAddBranchForSwitch(block0, block1, to_block1, 2, NULL); BinaryenIndex to_block2[] = { 4 }; - RelooperAddBranchForSwitch(block0, block2, to_block2, 1, makeInt32(module, 55)); + RelooperAddBranchForSwitch(block0, block2, to_block2, 1, makeDroppedInt32(module, 55)); RelooperAddBranchForSwitch(block0, block3, NULL, 0, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0, module); BinaryenFunctionRef sinker = BinaryenAddFunction(module, "switch", v, localTypes, 1, body); diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 42a5bfee1..c848f0f7c 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -23,340 +23,509 @@ BinaryenFloat64: 4 (local $4 i32) (block $the-body (block $the-nothing - (block $the-value - (i32.clz - (i32.const -10) - ) - (i64.ctz - (i64.const -22) - ) - (i32.popcnt - (i32.const -10) - ) - (f32.neg - (f32.const -33.61199951171875) - ) - (f64.abs - (f64.const -9005.841) - ) - (f32.ceil - (f32.const -33.61199951171875) - ) - (f64.floor - (f64.const -9005.841) - ) - (f32.trunc - (f32.const -33.61199951171875) - ) - (f32.nearest - (f32.const -33.61199951171875) - ) - (f64.sqrt - (f64.const -9005.841) - ) - (i32.eqz - (i32.const -10) - ) - (i64.extend_s/i32 - (i32.const -10) - ) - (i64.extend_u/i32 - (i32.const -10) - ) - (i32.wrap/i64 - (i64.const -22) - ) - (i32.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_s/f64 - (f64.const -9005.841) - ) - (i64.trunc_s/f64 - (f64.const -9005.841) - ) - (i32.trunc_u/f64 - (f64.const -9005.841) - ) - (i64.trunc_u/f64 - (f64.const -9005.841) - ) - (i32.reinterpret/f32 - (f32.const -33.61199951171875) - ) - (i64.reinterpret/f64 - (f64.const -9005.841) - ) - (f32.convert_s/i32 - (i32.const -10) - ) - (f64.convert_s/i32 - (i32.const -10) - ) - (f32.convert_u/i32 - (i32.const -10) - ) - (f64.convert_u/i32 - (i32.const -10) - ) - (f32.convert_s/i64 - (i64.const -22) - ) - (f64.convert_s/i64 - (i64.const -22) - ) - (f32.convert_u/i64 - (i64.const -22) - ) - (f64.convert_u/i64 - (i64.const -22) - ) - (f64.promote/f32 - (f32.const -33.61199951171875) - ) - (f32.demote/f64 - (f64.const -9005.841) - ) - (f32.reinterpret/i32 - (i32.const -10) - ) - (f64.reinterpret/i64 - (i64.const -22) - ) - (i32.add - (i32.const -10) - (i32.const -11) - ) - (f64.sub - (f64.const -9005.841) - (f64.const -9007.333) - ) - (i32.div_s - (i32.const -10) - (i32.const -11) - ) - (i64.div_u - (i64.const -22) - (i64.const -23) - ) - (i64.rem_s - (i64.const -22) - (i64.const -23) - ) - (i32.rem_u - (i32.const -10) - (i32.const -11) - ) - (i32.and - (i32.const -10) - (i32.const -11) - ) - (i64.or - (i64.const -22) - (i64.const -23) - ) - (i32.xor - (i32.const -10) - (i32.const -11) - ) - (i64.shl - (i64.const -22) - (i64.const -23) - ) - (i64.shr_u - (i64.const -22) - (i64.const -23) - ) - (i32.shr_s - (i32.const -10) - (i32.const -11) - ) - (i32.rotl - (i32.const -10) - (i32.const -11) - ) - (i64.rotr - (i64.const -22) - (i64.const -23) - ) - (f32.div - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.copysign - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f32.min - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.max - (f64.const -9005.841) - (f64.const -9007.333) - ) - (i32.eq - (i32.const -10) - (i32.const -11) - ) - (f32.ne - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (i32.lt_s - (i32.const -10) - (i32.const -11) - ) - (i64.lt_u - (i64.const -22) - (i64.const -23) - ) - (i64.le_s - (i64.const -22) - (i64.const -23) - ) - (i32.le_u - (i32.const -10) - (i32.const -11) - ) - (i64.gt_s - (i64.const -22) - (i64.const -23) - ) - (i32.gt_u - (i32.const -10) - (i32.const -11) - ) - (i32.ge_s - (i32.const -10) - (i32.const -11) - ) - (i64.ge_u - (i64.const -22) - (i64.const -23) - ) - (f32.lt - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.le - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f64.gt - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f32.ge - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (block - ) - (if - (i32.const 1) - (i32.const 2) - (i32.const 3) - ) - (if - (i32.const 4) - (i32.const 5) - ) - (loop $out $in - (i32.const 0) - ) - (loop $in2 - (i32.const 0) - ) - (loop - (i32.const 0) - ) - (br_if $the-value - (i32.const 1) - (i32.const 0) - ) - (br_if $the-nothing - (i32.const 2) - ) - (br $the-value - (i32.const 3) - ) - (br $the-nothing) - (br_table $the-value $the-value - (i32.const 1) - (i32.const 0) - ) - (br_table $the-nothing $the-nothing - (i32.const 2) - ) - (i32.eqz - (call "$kitchen()sinker" - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (block $the-value + (drop + (i32.clz + (i32.const -10) + ) ) - ) - (i32.eqz - (i32.trunc_s/f32 - (call_import $an-imported - (i32.const 13) - (f64.const 3.7) + (drop + (i64.ctz + (i64.const -22) ) ) - ) - (i32.eqz - (call_indirect $iiIfF - (i32.const 2449) - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (i32.popcnt + (i32.const -10) + ) ) + (drop + (f32.neg + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.abs + (f64.const -9005.841) + ) + ) + (drop + (f32.ceil + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.floor + (f64.const -9005.841) + ) + ) + (drop + (f32.trunc + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.nearest + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.sqrt + (f64.const -9005.841) + ) + ) + (drop + (i32.eqz + (i32.const -10) + ) + ) + (drop + (i64.extend_s/i32 + (i32.const -10) + ) + ) + (drop + (i64.extend_u/i32 + (i32.const -10) + ) + ) + (drop + (i32.wrap/i64 + (i64.const -22) + ) + ) + (drop + (i32.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_s/f64 + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_s/f64 + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_u/f64 + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_u/f64 + (f64.const -9005.841) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f32.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.promote/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.demote/f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const -10) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const -22) + ) + ) + (drop + (i32.add + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f64.sub + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.div_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.div_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.rem_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.rem_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.and + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.or + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.xor + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.shl + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.shr_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.shr_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.rotl + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.rotr + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.div + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.copysign + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.min + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.max + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.eq + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f32.ne + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i32.lt_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.lt_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.le_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.le_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.gt_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.gt_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.ge_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.ge_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.lt + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.le + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f64.gt + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.ge + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (block + ) + (drop + (if + (i32.const 1) + (i32.const 2) + (i32.const 3) + ) + ) + (if + (i32.const 4) + (i32.const 5) + ) + (drop + (loop $out $in + (i32.const 0) + ) + ) + (drop + (loop $in2 + (i32.const 0) + ) + ) + (drop + (loop + (i32.const 0) + ) + ) + (br_if $the-value + (i32.const 1) + (i32.const 0) + ) + (br_if $the-nothing + (i32.const 2) + ) + (br $the-value + (i32.const 3) + ) + (br $the-nothing) + (br_table $the-value $the-value + (i32.const 1) + (i32.const 0) + ) + (br_table $the-nothing $the-nothing + (i32.const 2) + ) + (drop + (i32.eqz + (call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (i32.eqz + (i32.trunc_s/f32 + (call_import $an-imported + (i32.const 13) + (f64.const 3.7) + ) + ) + ) + ) + (drop + (i32.eqz + (call_indirect $iiIfF + (i32.const 2449) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (get_local $0) + ) + (set_local $0 + (i32.const 101) + ) + (drop + (tee_local $0 + (i32.const 102) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (i64.load8_s offset=2 align=4 + (i32.const 8) + ) + ) + (drop + (f32.load + (i32.const 2) + ) + ) + (drop + (f64.load offset=2 + (i32.const 9) + ) + ) + (i32.store + (i32.const 10) + (i32.const 11) + ) + (i64.store offset=2 align=4 + (i32.const 110) + (i64.const 111) + ) + (drop + (select + (i32.const 3) + (i32.const 5) + (i32.const 1) + ) + ) + (return + (i32.const 1337) + ) + (nop) + (unreachable) ) - (get_local $0) - (set_local $0 - (i32.const 101) - ) - (i32.load - (i32.const 1) - ) - (i64.load8_s offset=2 align=4 - (i32.const 8) - ) - (f32.load - (i32.const 2) - ) - (f64.load offset=2 - (i32.const 9) - ) - (i32.store - (i32.const 10) - (i32.const 11) - ) - (i64.store offset=2 align=4 - (i32.const 110) - (i64.const 111) - ) - (select - (i32.const 3) - (i32.const 5) - (i32.const 1) - ) - (return - (i32.const 1337) - ) - (nop) - (unreachable) ) ) (i32.const 42) @@ -402,7 +571,9 @@ raw: (i32.const 0) ) (block - (i32.const 77) + (drop + (i32.const 77) + ) (br $block$2$break) ) ) @@ -441,7 +612,9 @@ raw: (i32.const 0) ) (block - (i32.const 33) + (drop + (i32.const 33) + ) (br $block$2$break) ) ) @@ -450,7 +623,9 @@ raw: (i32.const 1) ) (block - (i32.const -66) + (drop + (i32.const -66) + ) (br $shape$0$continue) ) ) @@ -483,7 +658,9 @@ raw: (if (i32.const 55) (block - (i32.const 10) + (drop + (i32.const 10) + ) (block (call_import $check (i32.const 1) @@ -491,7 +668,9 @@ raw: ) ) (block - (i32.const 20) + (drop + (i32.const 20) + ) (block (call_import $check (i32.const 2) @@ -534,19 +713,25 @@ raw: (if (i32.const 55) (block - (i32.const -1) + (drop + (i32.const -1) + ) (block (call_import $check (i32.const 1) ) (block - (i32.const -3) + (drop + (i32.const -3) + ) (br $block$3$break) ) ) ) (block - (i32.const -2) + (drop + (i32.const -2) + ) (br $block$3$break) ) ) @@ -626,7 +811,9 @@ raw: (i32.const 0) ) (block - (i32.const 10) + (drop + (i32.const 10) + ) (br $block$2$break) ) ) @@ -642,7 +829,9 @@ raw: (i32.const -2) (br $block$3$break) (block - (i32.const 20) + (drop + (i32.const 20) + ) (br $block$7$break) ) ) @@ -655,7 +844,9 @@ raw: (i32.const -6) (br $block$4$break) (block - (i32.const 30) + (drop + (i32.const 30) + ) (br $shape$1$continue) ) ) @@ -685,7 +876,9 @@ raw: (i32.const 5) ) (block - (i32.const 40) + (drop + (i32.const 40) + ) (br $block$7$break) ) ) @@ -721,7 +914,9 @@ raw: (br $switch$1$leave) ) (block - (i32.const 55) + (drop + (i32.const 55) + ) (block (call_import $check (i32.const 2) @@ -1327,43 +1522,48 @@ int main() { } expressions[222] = BinaryenUnary(the_module, 20, expressions[221]); expressions[223] = BinaryenGetLocal(the_module, 0, 1); - expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[225] = BinaryenSetLocal(the_module, 0, expressions[224]); - expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[227] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[226]); - expressions[228] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[229] = BinaryenLoad(the_module, 1, 1, 2, 4, 2, expressions[228]); - expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[231] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[230]); - expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); - expressions[233] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[232]); - expressions[234] = BinaryenStore(the_module, 4, 0, 0, expressions[25], expressions[26]); - expressions[235] = BinaryenStore(the_module, 8, 2, 4, expressions[27], expressions[28]); - expressions[236] = BinaryenSelect(the_module, expressions[22], expressions[23], expressions[24]); - expressions[237] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[238] = BinaryenReturn(the_module, expressions[237]); - expressions[239] = BinaryenNop(the_module); - expressions[240] = BinaryenUnreachable(the_module); + expressions[224] = BinaryenDrop(the_module, expressions[223]); + expressions[225] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); + expressions[226] = BinaryenSetLocal(the_module, 0, expressions[225]); + expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); + expressions[228] = BinaryenTeeLocal(the_module, 0, expressions[227]); + expressions[229] = BinaryenDrop(the_module, expressions[228]); + expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[231] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[230]); + expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); + expressions[233] = BinaryenLoad(the_module, 1, 1, 2, 4, 2, expressions[232]); + expressions[234] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[235] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[234]); + expressions[236] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); + expressions[237] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[236]); + expressions[238] = BinaryenStore(the_module, 4, 0, 0, expressions[25], expressions[26], 1); + expressions[239] = BinaryenStore(the_module, 8, 2, 4, expressions[27], expressions[28], 2); + expressions[240] = BinaryenSelect(the_module, expressions[22], expressions[23], expressions[24]); + expressions[241] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[242] = BinaryenReturn(the_module, expressions[241]); + expressions[243] = BinaryenNop(the_module); + expressions[244] = BinaryenUnreachable(the_module); BinaryenExpressionPrint(expressions[36]); (f32.neg (f32.const -33.61199951171875) ) { - BinaryenExpressionRef children[] = { expressions[30], expressions[32], expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], expressions[94], expressions[96], expressions[98], expressions[100], expressions[103], expressions[106], expressions[109], expressions[112], expressions[115], expressions[118], expressions[121], expressions[124], expressions[127], expressions[130], expressions[133], expressions[136], expressions[139], expressions[142], expressions[145], expressions[148], expressions[151], expressions[154], expressions[157], expressions[160], expressions[163], expressions[166], expressions[169], expressions[172], expressions[175], expressions[178], expressions[181], expressions[184], expressions[187], expressions[190], expressions[193], expressions[196], expressions[197], expressions[198], expressions[199], expressions[201], expressions[203], expressions[205], expressions[206], expressions[208], expressions[210], expressions[211], expressions[212], expressions[214], expressions[216], expressions[219], expressions[222], expressions[223], expressions[225], expressions[227], expressions[229], expressions[231], expressions[233], expressions[234], expressions[235], expressions[236], expressions[238], expressions[239], expressions[240] }; - expressions[241] = BinaryenBlock(the_module, "the-value", children, 95); + BinaryenExpressionRef children[] = { expressions[30], expressions[32], expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], expressions[94], expressions[96], expressions[98], expressions[100], expressions[103], expressions[106], expressions[109], expressions[112], expressions[115], expressions[118], expressions[121], expressions[124], expressions[127], expressions[130], expressions[133], expressions[136], expressions[139], expressions[142], expressions[145], expressions[148], expressions[151], expressions[154], expressions[157], expressions[160], expressions[163], expressions[166], expressions[169], expressions[172], expressions[175], expressions[178], expressions[181], expressions[184], expressions[187], expressions[190], expressions[193], expressions[196], expressions[197], expressions[198], expressions[199], expressions[201], expressions[203], expressions[205], expressions[206], expressions[208], expressions[210], expressions[211], expressions[212], expressions[214], expressions[216], expressions[219], expressions[222], expressions[224], expressions[226], expressions[229], expressions[231], expressions[233], expressions[235], expressions[237], expressions[238], expressions[239], expressions[240], expressions[242], expressions[243], expressions[244] }; + expressions[245] = BinaryenBlock(the_module, "the-value", children, 96); } + expressions[246] = BinaryenDrop(the_module, expressions[245]); { - BinaryenExpressionRef children[] = { expressions[241] }; - expressions[242] = BinaryenBlock(the_module, "the-nothing", children, 1); + BinaryenExpressionRef children[] = { expressions[246] }; + expressions[247] = BinaryenBlock(the_module, "the-nothing", children, 1); } - expressions[243] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { - BinaryenExpressionRef children[] = { expressions[242], expressions[243] }; - expressions[244] = BinaryenBlock(the_module, "the-body", children, 2); + BinaryenExpressionRef children[] = { expressions[247], expressions[248] }; + expressions[249] = BinaryenBlock(the_module, "the-body", children, 2); } { BinaryenType varTypes[] = { 1 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[244]); + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[249]); } { BinaryenIndex paramTypes[] = { 1, 4 }; @@ -1397,6 +1597,7 @@ int main() { BinaryenIndex paramTypes[] = { 0 }; functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); } + BinaryenModuleAutoDrop(the_module); BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module @@ -1416,340 +1617,509 @@ int main() { (local $4 i32) (block $the-body (block $the-nothing - (block $the-value - (i32.clz - (i32.const -10) - ) - (i64.ctz - (i64.const -22) - ) - (i32.popcnt - (i32.const -10) - ) - (f32.neg - (f32.const -33.61199951171875) - ) - (f64.abs - (f64.const -9005.841) - ) - (f32.ceil - (f32.const -33.61199951171875) - ) - (f64.floor - (f64.const -9005.841) - ) - (f32.trunc - (f32.const -33.61199951171875) - ) - (f32.nearest - (f32.const -33.61199951171875) - ) - (f64.sqrt - (f64.const -9005.841) - ) - (i32.eqz - (i32.const -10) - ) - (i64.extend_s/i32 - (i32.const -10) - ) - (i64.extend_u/i32 - (i32.const -10) - ) - (i32.wrap/i64 - (i64.const -22) - ) - (i32.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_s/f64 - (f64.const -9005.841) - ) - (i64.trunc_s/f64 - (f64.const -9005.841) - ) - (i32.trunc_u/f64 - (f64.const -9005.841) - ) - (i64.trunc_u/f64 - (f64.const -9005.841) - ) - (i32.reinterpret/f32 - (f32.const -33.61199951171875) - ) - (i64.reinterpret/f64 - (f64.const -9005.841) - ) - (f32.convert_s/i32 - (i32.const -10) - ) - (f64.convert_s/i32 - (i32.const -10) - ) - (f32.convert_u/i32 - (i32.const -10) - ) - (f64.convert_u/i32 - (i32.const -10) - ) - (f32.convert_s/i64 - (i64.const -22) - ) - (f64.convert_s/i64 - (i64.const -22) - ) - (f32.convert_u/i64 - (i64.const -22) - ) - (f64.convert_u/i64 - (i64.const -22) - ) - (f64.promote/f32 - (f32.const -33.61199951171875) - ) - (f32.demote/f64 - (f64.const -9005.841) - ) - (f32.reinterpret/i32 - (i32.const -10) - ) - (f64.reinterpret/i64 - (i64.const -22) - ) - (i32.add - (i32.const -10) - (i32.const -11) - ) - (f64.sub - (f64.const -9005.841) - (f64.const -9007.333) - ) - (i32.div_s - (i32.const -10) - (i32.const -11) - ) - (i64.div_u - (i64.const -22) - (i64.const -23) - ) - (i64.rem_s - (i64.const -22) - (i64.const -23) - ) - (i32.rem_u - (i32.const -10) - (i32.const -11) - ) - (i32.and - (i32.const -10) - (i32.const -11) - ) - (i64.or - (i64.const -22) - (i64.const -23) - ) - (i32.xor - (i32.const -10) - (i32.const -11) - ) - (i64.shl - (i64.const -22) - (i64.const -23) - ) - (i64.shr_u - (i64.const -22) - (i64.const -23) - ) - (i32.shr_s - (i32.const -10) - (i32.const -11) - ) - (i32.rotl - (i32.const -10) - (i32.const -11) - ) - (i64.rotr - (i64.const -22) - (i64.const -23) - ) - (f32.div - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.copysign - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f32.min - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.max - (f64.const -9005.841) - (f64.const -9007.333) - ) - (i32.eq - (i32.const -10) - (i32.const -11) - ) - (f32.ne - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (i32.lt_s - (i32.const -10) - (i32.const -11) - ) - (i64.lt_u - (i64.const -22) - (i64.const -23) - ) - (i64.le_s - (i64.const -22) - (i64.const -23) - ) - (i32.le_u - (i32.const -10) - (i32.const -11) - ) - (i64.gt_s - (i64.const -22) - (i64.const -23) - ) - (i32.gt_u - (i32.const -10) - (i32.const -11) - ) - (i32.ge_s - (i32.const -10) - (i32.const -11) - ) - (i64.ge_u - (i64.const -22) - (i64.const -23) - ) - (f32.lt - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.le - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f64.gt - (f64.const -9005.841) - (f64.const -9007.333) - ) - (f32.ge - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (block - ) - (if - (i32.const 1) - (i32.const 2) - (i32.const 3) - ) - (if - (i32.const 4) - (i32.const 5) - ) - (loop $out $in - (i32.const 0) - ) - (loop $in2 - (i32.const 0) - ) - (loop - (i32.const 0) - ) - (br_if $the-value - (i32.const 1) - (i32.const 0) - ) - (br_if $the-nothing - (i32.const 2) - ) - (br $the-value - (i32.const 3) - ) - (br $the-nothing) - (br_table $the-value $the-value - (i32.const 1) - (i32.const 0) - ) - (br_table $the-nothing $the-nothing - (i32.const 2) - ) - (i32.eqz - (call "$kitchen()sinker" - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (block $the-value + (drop + (i32.clz + (i32.const -10) + ) + ) + (drop + (i64.ctz + (i64.const -22) + ) ) - ) - (i32.eqz - (i32.trunc_s/f32 - (call_import $an-imported - (i32.const 13) - (f64.const 3.7) + (drop + (i32.popcnt + (i32.const -10) ) ) - ) - (i32.eqz - (call_indirect $iiIfF - (i32.const 2449) - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (f32.neg + (f32.const -33.61199951171875) + ) ) + (drop + (f64.abs + (f64.const -9005.841) + ) + ) + (drop + (f32.ceil + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.floor + (f64.const -9005.841) + ) + ) + (drop + (f32.trunc + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.nearest + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.sqrt + (f64.const -9005.841) + ) + ) + (drop + (i32.eqz + (i32.const -10) + ) + ) + (drop + (i64.extend_s/i32 + (i32.const -10) + ) + ) + (drop + (i64.extend_u/i32 + (i32.const -10) + ) + ) + (drop + (i32.wrap/i64 + (i64.const -22) + ) + ) + (drop + (i32.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_s/f64 + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_s/f64 + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_u/f64 + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_u/f64 + (f64.const -9005.841) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f32.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.promote/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.demote/f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const -10) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const -22) + ) + ) + (drop + (i32.add + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f64.sub + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.div_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.div_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.rem_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.rem_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.and + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.or + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.xor + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.shl + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.shr_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.shr_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.rotl + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.rotr + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.div + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.copysign + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.min + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.max + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.eq + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f32.ne + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i32.lt_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.lt_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.le_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.le_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.gt_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.gt_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.ge_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.ge_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.lt + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.le + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f64.gt + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.ge + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (block + ) + (drop + (if + (i32.const 1) + (i32.const 2) + (i32.const 3) + ) + ) + (if + (i32.const 4) + (i32.const 5) + ) + (drop + (loop $out $in + (i32.const 0) + ) + ) + (drop + (loop $in2 + (i32.const 0) + ) + ) + (drop + (loop + (i32.const 0) + ) + ) + (br_if $the-value + (i32.const 1) + (i32.const 0) + ) + (br_if $the-nothing + (i32.const 2) + ) + (br $the-value + (i32.const 3) + ) + (br $the-nothing) + (br_table $the-value $the-value + (i32.const 1) + (i32.const 0) + ) + (br_table $the-nothing $the-nothing + (i32.const 2) + ) + (drop + (i32.eqz + (call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (i32.eqz + (i32.trunc_s/f32 + (call_import $an-imported + (i32.const 13) + (f64.const 3.7) + ) + ) + ) + ) + (drop + (i32.eqz + (call_indirect $iiIfF + (i32.const 2449) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (get_local $0) + ) + (set_local $0 + (i32.const 101) + ) + (drop + (tee_local $0 + (i32.const 102) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (i64.load8_s offset=2 align=4 + (i32.const 8) + ) + ) + (drop + (f32.load + (i32.const 2) + ) + ) + (drop + (f64.load offset=2 + (i32.const 9) + ) + ) + (i32.store + (i32.const 10) + (i32.const 11) + ) + (i64.store offset=2 align=4 + (i32.const 110) + (i64.const 111) + ) + (drop + (select + (i32.const 3) + (i32.const 5) + (i32.const 1) + ) + ) + (return + (i32.const 1337) + ) + (nop) + (unreachable) ) - (get_local $0) - (set_local $0 - (i32.const 101) - ) - (i32.load - (i32.const 1) - ) - (i64.load8_s offset=2 align=4 - (i32.const 8) - ) - (f32.load - (i32.const 2) - ) - (f64.load offset=2 - (i32.const 9) - ) - (i32.store - (i32.const 10) - (i32.const 11) - ) - (i64.store offset=2 align=4 - (i32.const 110) - (i64.const 111) - ) - (select - (i32.const 3) - (i32.const 5) - (i32.const 1) - ) - (return - (i32.const 1337) - ) - (nop) - (unreachable) ) ) (i32.const 42) @@ -1820,231 +2190,211 @@ int main() { } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[12]); expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(77)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[13]); - expressions[14] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[14] = BinaryenDrop(the_module, expressions[13]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[14]); + expressions[15] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", functionTypes[0], varTypes, 1, expressions[14]); + functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", functionTypes[0], varTypes, 1, expressions[15]); } the_relooper = RelooperCreate(); - expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[15] }; - expressions[16] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[16] }; + expressions[17] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[16]); - expressions[17] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[17]); + expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[17] }; - expressions[18] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[18] }; + expressions[19] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[18]); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[19]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); - expressions[19] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[20] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[3] = BinaryenAddFunction(the_module, "loop", functionTypes[0], varTypes, 1, expressions[19]); + functions[3] = BinaryenAddFunction(the_module, "loop", functionTypes[0], varTypes, 1, expressions[20]); } the_relooper = RelooperCreate(); - expressions[20] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[20] }; - expressions[21] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[21] }; + expressions[22] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[21]); - expressions[22] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[22]); + expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[22] }; - expressions[23] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[23] }; + expressions[24] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[23]); - expressions[24] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[24]); - expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[25]); - expressions[26] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[24]); + expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); + expressions[26] = BinaryenDrop(the_module, expressions[25]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[26]); + expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); + expressions[28] = BinaryenDrop(the_module, expressions[27]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[28]); + expressions[29] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", functionTypes[0], varTypes, 1, expressions[26]); + functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", functionTypes[0], varTypes, 1, expressions[29]); } the_relooper = RelooperCreate(); - expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[27] }; - expressions[28] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[30] }; + expressions[31] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[28]); - expressions[29] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[31]); + expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[29] }; - expressions[30] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[32] }; + expressions[33] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[30]); - expressions[31] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[33]); + expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[31] }; - expressions[32] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[34] }; + expressions[35] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[32]); - expressions[33] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[33], expressions[0]); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[35]); + expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[36], expressions[0]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - expressions[34] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[37] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[5] = BinaryenAddFunction(the_module, "split", functionTypes[0], varTypes, 1, expressions[34]); + functions[5] = BinaryenAddFunction(the_module, "split", functionTypes[0], varTypes, 1, expressions[37]); } the_relooper = RelooperCreate(); - expressions[35] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[35] }; - expressions[36] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[38] }; + expressions[39] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[36]); - expressions[37] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[39]); + expressions[40] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[37] }; - expressions[38] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[40] }; + expressions[41] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[38]); - expressions[39] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); + expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[39] }; - expressions[40] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[42] }; + expressions[43] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[40]); - expressions[41] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[42], expressions[41]); - expressions[43] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[43]); - expressions[44] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[43]); + expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[45] = BinaryenDrop(the_module, expressions[44]); + expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[46], expressions[45]); + expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[48] = BinaryenDrop(the_module, expressions[47]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[48]); + expressions[49] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[6] = BinaryenAddFunction(the_module, "split-plus-code", functionTypes[0], varTypes, 1, expressions[44]); + functions[6] = BinaryenAddFunction(the_module, "split-plus-code", functionTypes[0], varTypes, 1, expressions[49]); } the_relooper = RelooperCreate(); - expressions[45] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[50] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[45] }; - expressions[46] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[50] }; + expressions[51] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[46]); - expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[51]); + expressions[52] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[47] }; - expressions[48] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[52] }; + expressions[53] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[48]); - expressions[49] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[53]); + expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[49] }; - expressions[50] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[54] }; + expressions[55] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[50]); - expressions[51] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[51], expressions[0]); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[55]); + expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[56], expressions[0]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - expressions[52] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[57] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[7] = BinaryenAddFunction(the_module, "if", functionTypes[0], varTypes, 1, expressions[52]); + functions[7] = BinaryenAddFunction(the_module, "if", functionTypes[0], varTypes, 1, expressions[57]); } the_relooper = RelooperCreate(); - expressions[53] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[53] }; - expressions[54] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[58] }; + expressions[59] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[54]); - expressions[55] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[59]); + expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[55] }; - expressions[56] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[60] }; + expressions[61] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[56]); - expressions[57] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[61]); + expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[57] }; - expressions[58] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[62] }; + expressions[63] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[58]); - expressions[59] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); - expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[60], expressions[59]); - expressions[61] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[61]); - expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[62]); - expressions[63] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[63]); + expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); + expressions[65] = BinaryenDrop(the_module, expressions[64]); + expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[66], expressions[65]); + expressions[67] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + expressions[68] = BinaryenDrop(the_module, expressions[67]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[68]); + expressions[69] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); + expressions[70] = BinaryenDrop(the_module, expressions[69]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[70]); + expressions[71] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[8] = BinaryenAddFunction(the_module, "if-plus-code", functionTypes[0], varTypes, 1, expressions[63]); + functions[8] = BinaryenAddFunction(the_module, "if-plus-code", functionTypes[0], varTypes, 1, expressions[71]); } the_relooper = RelooperCreate(); - expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[64] }; - expressions[65] = BinaryenCallImport(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[65]); - expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[66] }; - expressions[67] = BinaryenCallImport(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[67]); - expressions[68] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[68] }; - expressions[69] = BinaryenCallImport(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[69]); - expressions[70] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[70] }; - expressions[71] = BinaryenCallImport(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[71]); - expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[72], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); - expressions[73] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenType varTypes[] = { 1 }; - functions[9] = BinaryenAddFunction(the_module, "if-else", functionTypes[0], varTypes, 1, expressions[73]); + BinaryenExpressionRef operands[] = { expressions[72] }; + expressions[73] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - the_relooper = RelooperCreate(); - expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[73]); + expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { BinaryenExpressionRef operands[] = { expressions[74] }; expressions[75] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[75]); - expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[75]); + expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { BinaryenExpressionRef operands[] = { expressions[76] }; expressions[77] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[77]); - expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[77]); + expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); { BinaryenExpressionRef operands[] = { expressions[78] }; expressions[79] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[79]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[80], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[79]); + expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[80], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); expressions[81] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[10] = BinaryenAddFunction(the_module, "loop-tail", functionTypes[0], varTypes, 1, expressions[81]); + functions[9] = BinaryenAddFunction(the_module, "if-else", functionTypes[0], varTypes, 1, expressions[81]); } the_relooper = RelooperCreate(); expressions[82] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); @@ -2065,145 +2415,178 @@ int main() { expressions[87] = BinaryenCallImport(the_module, "check", operands, 1, 0); } relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[87]); - expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[88], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + expressions[89] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { - BinaryenExpressionRef operands[] = { expressions[88] }; - expressions[89] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenType varTypes[] = { 1 }; + functions[10] = BinaryenAddFunction(the_module, "loop-tail", functionTypes[0], varTypes, 1, expressions[89]); } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[89]); - expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + the_relooper = RelooperCreate(); + expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { BinaryenExpressionRef operands[] = { expressions[90] }; expressions[91] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[91]); - expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[91]); + expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { BinaryenExpressionRef operands[] = { expressions[92] }; expressions[93] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[93]); - expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[93]); + expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { BinaryenExpressionRef operands[] = { expressions[94] }; expressions[95] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[95]); - expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[96]); - expressions[97] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[97], expressions[0]); - expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[98]); - expressions[99] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[99], expressions[0]); - expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[100]); - expressions[101] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[101], expressions[0]); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[95]); + expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[96] }; + expressions[97] = BinaryenCallImport(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[97]); + expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + { + BinaryenExpressionRef operands[] = { expressions[98] }; + expressions[99] = BinaryenCallImport(the_module, "check", operands, 1, 0); + } + relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[99]); + expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + { + BinaryenExpressionRef operands[] = { expressions[100] }; + expressions[101] = BinaryenCallImport(the_module, "check", operands, 1, 0); + } + relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[101]); + expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); + { + BinaryenExpressionRef operands[] = { expressions[102] }; + expressions[103] = BinaryenCallImport(the_module, "check", operands, 1, 0); + } + relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[103]); + expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[105] = BinaryenDrop(the_module, expressions[104]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[105]); + expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[106], expressions[0]); + expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[108] = BinaryenDrop(the_module, expressions[107]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[108]); + expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[109], expressions[0]); + expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); + expressions[111] = BinaryenDrop(the_module, expressions[110]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[111]); + expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[112], expressions[0]); RelooperAddBranch(relooperBlocks[3], relooperBlocks[5], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[4], relooperBlocks[5], expressions[0], expressions[0]); - expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); - RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[102]); - expressions[103] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); + expressions[114] = BinaryenDrop(the_module, expressions[113]); + RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[114]); + expressions[115] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", functionTypes[0], varTypes, 1, expressions[103]); + functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", functionTypes[0], varTypes, 1, expressions[115]); } the_relooper = RelooperCreate(); - expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); - expressions[105] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); + expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[105] }; - expressions[106] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[117] }; + expressions[118] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[106], expressions[104]); - expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[118], expressions[116]); + expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[107] }; - expressions[108] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[119] }; + expressions[120] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[108]); - expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[120]); + expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[109] }; - expressions[110] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[121] }; + expressions[122] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[110]); - expressions[111] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[122]); + expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); { - BinaryenExpressionRef operands[] = { expressions[111] }; - expressions[112] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[123] }; + expressions[124] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[112]); + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[124]); { BinaryenIndex indexes[] = { 2, 5 }; RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[1], indexes, 2, expressions[0]); } - expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + expressions[126] = BinaryenDrop(the_module, expressions[125]); { BinaryenIndex indexes[] = { 4 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[113]); + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[126]); } { BinaryenIndex indexes[] = { 0 }; RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[3], indexes, 0, expressions[0]); } - expressions[114] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + expressions[127] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[12] = BinaryenAddFunction(the_module, "switch", functionTypes[0], varTypes, 1, expressions[114]); + functions[12] = BinaryenAddFunction(the_module, "switch", functionTypes[0], varTypes, 1, expressions[127]); } the_relooper = RelooperCreate(); - expressions[115] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); { - BinaryenExpressionRef operands[] = { expressions[115] }; - expressions[116] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[128] }; + expressions[129] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[116]); - expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[129]); + expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); { - BinaryenExpressionRef operands[] = { expressions[117] }; - expressions[118] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[130] }; + expressions[131] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[118]); - expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); + expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { - BinaryenExpressionRef operands[] = { expressions[119] }; - expressions[120] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[132] }; + expressions[133] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[120]); - expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[121], expressions[0]); + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[133]); + expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[134], expressions[0]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[0]); - expressions[122] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3, the_module); + expressions[135] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3, the_module); { BinaryenType varTypes[] = { 1, 1, 2, 1, 3, 4, 1 }; - functions[13] = BinaryenAddFunction(the_module, "duffs-device", functionTypes[0], varTypes, 7, expressions[122]); + functions[13] = BinaryenAddFunction(the_module, "duffs-device", functionTypes[0], varTypes, 7, expressions[135]); } { BinaryenIndex paramTypes[] = { 0 }; functionTypes[2] = BinaryenAddFunctionType(the_module, "i", 1, paramTypes, 0); } the_relooper = RelooperCreate(); - expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { - BinaryenExpressionRef operands[] = { expressions[123] }; - expressions[124] = BinaryenCallImport(the_module, "check", operands, 1, 0); + BinaryenExpressionRef operands[] = { expressions[136] }; + expressions[137] = BinaryenCallImport(the_module, "check", operands, 1, 0); } - expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[126] = BinaryenReturn(the_module, expressions[125]); + expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[139] = BinaryenReturn(the_module, expressions[138]); { - BinaryenExpressionRef children[] = { expressions[124], expressions[126] }; - expressions[127] = BinaryenBlock(the_module, "the-list", children, 2); + BinaryenExpressionRef children[] = { expressions[137], expressions[139] }; + expressions[140] = BinaryenBlock(the_module, "the-list", children, 2); } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[127]); - expressions[128] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[140]); + expressions[141] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0, the_module); { BinaryenType varTypes[] = { 1 }; - functions[14] = BinaryenAddFunction(the_module, "return", functionTypes[2], varTypes, 1, expressions[128]); + functions[14] = BinaryenAddFunction(the_module, "return", functionTypes[2], varTypes, 1, expressions[141]); } raw: BinaryenModulePrint(the_module); @@ -2242,7 +2625,9 @@ raw: (i32.const 0) ) (block - (i32.const 77) + (drop + (i32.const 77) + ) (br $block$2$break) ) ) @@ -2281,7 +2666,9 @@ raw: (i32.const 0) ) (block - (i32.const 33) + (drop + (i32.const 33) + ) (br $block$2$break) ) ) @@ -2290,7 +2677,9 @@ raw: (i32.const 1) ) (block - (i32.const -66) + (drop + (i32.const -66) + ) (br $shape$0$continue) ) ) @@ -2323,7 +2712,9 @@ raw: (if (i32.const 55) (block - (i32.const 10) + (drop + (i32.const 10) + ) (block (call_import $check (i32.const 1) @@ -2331,7 +2722,9 @@ raw: ) ) (block - (i32.const 20) + (drop + (i32.const 20) + ) (block (call_import $check (i32.const 2) @@ -2374,19 +2767,25 @@ raw: (if (i32.const 55) (block - (i32.const -1) + (drop + (i32.const -1) + ) (block (call_import $check (i32.const 1) ) (block - (i32.const -3) + (drop + (i32.const -3) + ) (br $block$3$break) ) ) ) (block - (i32.const -2) + (drop + (i32.const -2) + ) (br $block$3$break) ) ) @@ -2466,7 +2865,9 @@ raw: (i32.const 0) ) (block - (i32.const 10) + (drop + (i32.const 10) + ) (br $block$2$break) ) ) @@ -2482,7 +2883,9 @@ raw: (i32.const -2) (br $block$3$break) (block - (i32.const 20) + (drop + (i32.const 20) + ) (br $block$7$break) ) ) @@ -2495,7 +2898,9 @@ raw: (i32.const -6) (br $block$4$break) (block - (i32.const 30) + (drop + (i32.const 30) + ) (br $shape$1$continue) ) ) @@ -2525,7 +2930,9 @@ raw: (i32.const 5) ) (block - (i32.const 40) + (drop + (i32.const 40) + ) (br $block$7$break) ) ) @@ -2561,7 +2968,9 @@ raw: (br $switch$1$leave) ) (block - (i32.const 55) + (drop + (i32.const 55) + ) (block (call_import $check (i32.const 2) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 7e32ba431..52da01f9d 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -18,340 +18,509 @@ (local $4 i32) (block $the-body (block $the-nothing - (block $the-value - (i32.clz - (i32.const -10) - ) - (i64.ctz - (i64.const -22) - ) - (i32.popcnt - (i32.const -10) - ) - (f32.neg - (f32.const -33.61199951171875) - ) - (f64.abs - (f64.const -9005.84) - ) - (f32.ceil - (f32.const -33.61199951171875) - ) - (f64.floor - (f64.const -9005.84) - ) - (f32.trunc - (f32.const -33.61199951171875) - ) - (f32.nearest - (f32.const -33.61199951171875) - ) - (f64.sqrt - (f64.const -9005.84) - ) - (i32.eqz - (i32.const -10) - ) - (i64.extend_s/i32 - (i32.const -10) - ) - (i64.extend_u/i32 - (i32.const -10) - ) - (i32.wrap/i64 - (i64.const -22) - ) - (i32.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_s/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i64.trunc_u/f32 - (f32.const -33.61199951171875) - ) - (i32.trunc_s/f64 - (f64.const -9005.84) - ) - (i64.trunc_s/f64 - (f64.const -9005.84) - ) - (i32.trunc_u/f64 - (f64.const -9005.84) - ) - (i64.trunc_u/f64 - (f64.const -9005.84) - ) - (i32.reinterpret/f32 - (f32.const -33.61199951171875) - ) - (i64.reinterpret/f64 - (f64.const -9005.84) - ) - (f32.convert_s/i32 - (i32.const -10) - ) - (f64.convert_s/i32 - (i32.const -10) - ) - (f32.convert_u/i32 - (i32.const -10) - ) - (f64.convert_u/i32 - (i32.const -10) - ) - (f32.convert_s/i64 - (i64.const -22) - ) - (f64.convert_s/i64 - (i64.const -22) - ) - (f32.convert_u/i64 - (i64.const -22) - ) - (f64.convert_u/i64 - (i64.const -22) - ) - (f64.promote/f32 - (f32.const -33.61199951171875) - ) - (f32.demote/f64 - (f64.const -9005.84) - ) - (f32.reinterpret/i32 - (i32.const -10) - ) - (f64.reinterpret/i64 - (i64.const -22) - ) - (i32.add - (i32.const -10) - (i32.const -11) - ) - (f64.sub - (f64.const -9005.84) - (f64.const -9007.33) - ) - (i32.div_s - (i32.const -10) - (i32.const -11) - ) - (i64.div_u - (i64.const -22) - (i64.const -23) - ) - (i64.rem_s - (i64.const -22) - (i64.const -23) - ) - (i32.rem_u - (i32.const -10) - (i32.const -11) - ) - (i32.and - (i32.const -10) - (i32.const -11) - ) - (i64.or - (i64.const -22) - (i64.const -23) - ) - (i32.xor - (i32.const -10) - (i32.const -11) - ) - (i64.shl - (i64.const -22) - (i64.const -23) - ) - (i64.shr_u - (i64.const -22) - (i64.const -23) - ) - (i32.shr_s - (i32.const -10) - (i32.const -11) - ) - (i32.rotl - (i32.const -10) - (i32.const -11) - ) - (i64.rotr - (i64.const -22) - (i64.const -23) - ) - (f32.div - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.copysign - (f64.const -9005.84) - (f64.const -9007.33) - ) - (f32.min - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.max - (f64.const -9005.84) - (f64.const -9007.33) - ) - (i32.eq - (i32.const -10) - (i32.const -11) - ) - (f32.ne - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (i32.lt_s - (i32.const -10) - (i32.const -11) - ) - (i64.lt_u - (i64.const -22) - (i64.const -23) - ) - (i64.le_s - (i64.const -22) - (i64.const -23) - ) - (i32.le_u - (i32.const -10) - (i32.const -11) - ) - (i64.gt_s - (i64.const -22) - (i64.const -23) - ) - (i32.gt_u - (i32.const -10) - (i32.const -11) - ) - (i32.ge_s - (i32.const -10) - (i32.const -11) - ) - (i64.ge_u - (i64.const -22) - (i64.const -23) - ) - (f32.lt - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (f64.le - (f64.const -9005.84) - (f64.const -9007.33) - ) - (f64.gt - (f64.const -9005.84) - (f64.const -9007.33) - ) - (f32.ge - (f32.const -33.61199951171875) - (f32.const -62.5) - ) - (block - ) - (if - (i32.const 1) - (i32.const 2) - (i32.const 3) - ) - (if - (i32.const 4) - (i32.const 5) - ) - (loop $out $in - (i32.const 0) - ) - (loop $in2 - (i32.const 0) - ) - (loop - (i32.const 0) - ) - (br_if $the-value - (i32.const 1) - (i32.const 0) - ) - (br_if $the-nothing - (i32.const 2) - ) - (br $the-value - (i32.const 3) - ) - (br $the-nothing) - (br_table $the-value $the-value - (i32.const 1) - (i32.const 0) - ) - (br_table $the-nothing $the-nothing - (i32.const 2) - ) - (i32.eqz - (call "$kitchen()sinker" - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (block $the-value + (drop + (i32.clz + (i32.const -10) + ) ) - ) - (i32.eqz - (i32.trunc_s/f32 - (call_import $an-imported - (i32.const 13) - (f64.const 3.7) + (drop + (i64.ctz + (i64.const -22) ) ) - ) - (i32.eqz - (call_indirect $iiIfF - (i32.const 2449) - (i32.const 13) - (i64.const 37) - (f32.const 1.2999999523162842) - (f64.const 3.7) + (drop + (i32.popcnt + (i32.const -10) + ) ) + (drop + (f32.neg + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.abs + (f64.const -9005.84) + ) + ) + (drop + (f32.ceil + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.floor + (f64.const -9005.84) + ) + ) + (drop + (f32.trunc + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.nearest + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.sqrt + (f64.const -9005.84) + ) + ) + (drop + (i32.eqz + (i32.const -10) + ) + ) + (drop + (i64.extend_s/i32 + (i32.const -10) + ) + ) + (drop + (i64.extend_u/i32 + (i32.const -10) + ) + ) + (drop + (i32.wrap/i64 + (i64.const -22) + ) + ) + (drop + (i32.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_s/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_u/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_s/f64 + (f64.const -9005.84) + ) + ) + (drop + (i64.trunc_s/f64 + (f64.const -9005.84) + ) + ) + (drop + (i32.trunc_u/f64 + (f64.const -9005.84) + ) + ) + (drop + (i64.trunc_u/f64 + (f64.const -9005.84) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const -9005.84) + ) + ) + (drop + (f32.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_s/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f64.convert_u/i32 + (i32.const -10) + ) + ) + (drop + (f32.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_s/i64 + (i64.const -22) + ) + ) + (drop + (f32.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.convert_u/i64 + (i64.const -22) + ) + ) + (drop + (f64.promote/f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.demote/f64 + (f64.const -9005.84) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const -10) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const -22) + ) + ) + (drop + (i32.add + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f64.sub + (f64.const -9005.84) + (f64.const -9007.33) + ) + ) + (drop + (i32.div_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.div_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.rem_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.rem_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.and + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.or + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.xor + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.shl + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.shr_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.shr_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.rotl + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.rotr + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.div + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.copysign + (f64.const -9005.84) + (f64.const -9007.33) + ) + ) + (drop + (f32.min + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.max + (f64.const -9005.84) + (f64.const -9007.33) + ) + ) + (drop + (i32.eq + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f32.ne + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i32.lt_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.lt_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i64.le_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.le_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.gt_s + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (i32.gt_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.ge_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.ge_u + (i64.const -22) + (i64.const -23) + ) + ) + (drop + (f32.lt + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.le + (f64.const -9005.84) + (f64.const -9007.33) + ) + ) + (drop + (f64.gt + (f64.const -9005.84) + (f64.const -9007.33) + ) + ) + (drop + (f32.ge + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (block + ) + (drop + (if + (i32.const 1) + (i32.const 2) + (i32.const 3) + ) + ) + (if + (i32.const 4) + (i32.const 5) + ) + (drop + (loop $out $in + (i32.const 0) + ) + ) + (drop + (loop $in2 + (i32.const 0) + ) + ) + (drop + (loop + (i32.const 0) + ) + ) + (br_if $the-value + (i32.const 1) + (i32.const 0) + ) + (br_if $the-nothing + (i32.const 2) + ) + (br $the-value + (i32.const 3) + ) + (br $the-nothing) + (br_table $the-value $the-value + (i32.const 1) + (i32.const 0) + ) + (br_table $the-nothing $the-nothing + (i32.const 2) + ) + (drop + (i32.eqz + (call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (i32.eqz + (i32.trunc_s/f32 + (call_import $an-imported + (i32.const 13) + (f64.const 3.7) + ) + ) + ) + ) + (drop + (i32.eqz + (call_indirect $iiIfF + (i32.const 2449) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (get_local $0) + ) + (set_local $0 + (i32.const 101) + ) + (drop + (tee_local $0 + (i32.const 102) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (i64.load8_s offset=2 align=4 + (i32.const 8) + ) + ) + (drop + (f32.load + (i32.const 2) + ) + ) + (drop + (f64.load offset=2 + (i32.const 9) + ) + ) + (i32.store + (i32.const 10) + (i32.const 11) + ) + (i64.store offset=2 align=4 + (i32.const 110) + (i64.const 111) + ) + (drop + (select + (i32.const 3) + (i32.const 5) + (i32.const 1) + ) + ) + (return + (i32.const 1337) + ) + (nop) + (unreachable) ) - (get_local $0) - (set_local $0 - (i32.const 101) - ) - (i32.load - (i32.const 1) - ) - (i64.load8_s offset=2 align=4 - (i32.const 8) - ) - (f32.load - (i32.const 2) - ) - (f64.load offset=2 - (i32.const 9) - ) - (i32.store - (i32.const 10) - (i32.const 11) - ) - (i64.store offset=2 align=4 - (i32.const 110) - (i64.const 111) - ) - (select - (i32.const 3) - (i32.const 5) - (i32.const 1) - ) - (return - (i32.const 1337) - ) - (nop) - (unreachable) ) ) (i32.const 42) @@ -396,7 +565,9 @@ (i32.const 0) ) (block - (i32.const 77) + (drop + (i32.const 77) + ) (br $block$2$break) ) ) @@ -435,7 +606,9 @@ (i32.const 0) ) (block - (i32.const 33) + (drop + (i32.const 33) + ) (br $block$2$break) ) ) @@ -444,7 +617,9 @@ (i32.const 1) ) (block - (i32.const -66) + (drop + (i32.const -66) + ) (br $shape$0$continue) ) ) @@ -477,7 +652,9 @@ (if (i32.const 55) (block - (i32.const 10) + (drop + (i32.const 10) + ) (block (call_import $check (i32.const 1) @@ -485,7 +662,9 @@ ) ) (block - (i32.const 20) + (drop + (i32.const 20) + ) (block (call_import $check (i32.const 2) @@ -528,19 +707,25 @@ (if (i32.const 55) (block - (i32.const -1) + (drop + (i32.const -1) + ) (block (call_import $check (i32.const 1) ) (block - (i32.const -3) + (drop + (i32.const -3) + ) (br $block$3$break) ) ) ) (block - (i32.const -2) + (drop + (i32.const -2) + ) (br $block$3$break) ) ) @@ -620,7 +805,9 @@ (i32.const 0) ) (block - (i32.const 10) + (drop + (i32.const 10) + ) (br $block$2$break) ) ) @@ -636,7 +823,9 @@ (i32.const -2) (br $block$3$break) (block - (i32.const 20) + (drop + (i32.const 20) + ) (br $block$7$break) ) ) @@ -649,7 +838,9 @@ (i32.const -6) (br $block$4$break) (block - (i32.const 30) + (drop + (i32.const 30) + ) (br $shape$1$continue) ) ) @@ -679,7 +870,9 @@ (i32.const 5) ) (block - (i32.const 40) + (drop + (i32.const 40) + ) (br $block$7$break) ) ) @@ -715,7 +908,9 @@ (br $switch$1$leave) ) (block - (i32.const 55) + (drop + (i32.const 55) + ) (block (call_import $check (i32.const 2) diff --git a/test/example/relooper-fuzz.c b/test/example/relooper-fuzz.c index 65d00aa5d..9fd11096f 100644 --- a/test/example/relooper-fuzz.c +++ b/test/example/relooper-fuzz.c @@ -31,7 +31,8 @@ int main() { BinaryenAddInt32(), BinaryenLoad(module, 4, 0, 0, 0, BinaryenInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), BinaryenConst(module, BinaryenLiteralInt32(4)) - ) + ), + BinaryenInt32() ); // optionally, print the return value @@ -235,7 +236,8 @@ int main() { full[i] = BinaryenStore(module, 4, 0, 0, BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)), - BinaryenConst(module, BinaryenLiteralInt32(decisions[i])) + BinaryenConst(module, BinaryenLiteralInt32(decisions[i])), + BinaryenInt32() ); } } diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index b4e6c8b57..2836a05de 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -463,7 +463,9 @@ (call_import $print (i32.const 8) ) - (call $check) + (drop + (call $check) + ) ) ) (loop $shape$3$continue @@ -503,7 +505,7 @@ (if (i32.eq (i32.rem_u - (set_local $1 + (tee_local $1 (call $check) ) (i32.const 3) @@ -530,7 +532,9 @@ (call_import $print (i32.const 2) ) - (call $check) + (drop + (call $check) + ) (set_local $0 (i32.const 6) ) diff --git a/test/example/relooper-fuzz1.c b/test/example/relooper-fuzz1.c index fbbbfdd59..cca61e4f4 100644 --- a/test/example/relooper-fuzz1.c +++ b/test/example/relooper-fuzz1.c @@ -33,7 +33,8 @@ int main() { BinaryenLoad(module, 4, 0, 0, 0, BinaryenInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), BinaryenConst(module, BinaryenLiteralInt32(4)) - ) + ), + BinaryenInt32() ); // optionally, print the return value @@ -288,7 +289,8 @@ int main() { full[i] = BinaryenStore(module, 4, 0, 0, BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)), - BinaryenConst(module, BinaryenLiteralInt32(decisions[i])) + BinaryenConst(module, BinaryenLiteralInt32(decisions[i])), + BinaryenInt32() ); } } diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index 437dab062..32456c82a 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -440,7 +440,7 @@ (if (i32.ne (i32.rem_u - (set_local $0 + (tee_local $0 (call $check) ) (i32.const 4) @@ -489,13 +489,17 @@ (call_import $print (i32.const 3) ) - (call $check) + (drop + (call $check) + ) (br $shape$6$continue) ) ) (call_import $print (i32.const 9) ) - (call $check) + (drop + (call $check) + ) ) ) diff --git a/test/kitchen_sink.wast b/test/kitchen_sink.wast index 2b139a95b..01fc1e241 100644 --- a/test/kitchen_sink.wast +++ b/test/kitchen_sink.wast @@ -4,428 +4,662 @@ (type $0 (func (result i32))) (func $kitchensink (type $0) (result i32) (block $block0 - (i32.add - (i32.const 10) - (i32.const 10) - ) - (i32.sub - (i32.const 10) - (i32.const 10) - ) - (i32.mul - (i32.const 10) - (i32.const 10) - ) - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - (i32.and - (i32.const 10) - (i32.const 10) - ) - (i32.or - (i32.const 10) - (i32.const 10) - ) - (i32.xor - (i32.const 10) - (i32.const 10) - ) - (i32.shl - (i32.const 10) - (i32.const 10) - ) - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - (i32.eq - (i32.const 10) - (i32.const 10) - ) - (i32.ne - (i32.const 10) - (i32.const 10) - ) - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - (i32.clz - (i32.const 10) - ) - (i32.ctz - (i32.const 10) - ) - (i32.popcnt - (i32.const 10) - ) - (i64.add - (i64.const 100) - (i64.const 100) - ) - (i64.sub - (i64.const 100) - (i64.const 100) - ) - (i64.mul - (i64.const 100) - (i64.const 100) - ) - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - (i64.and - (i64.const 100) - (i64.const 100) - ) - (i64.or - (i64.const 100) - (i64.const 100) - ) - (i64.xor - (i64.const 100) - (i64.const 100) - ) - (i64.shl - (i64.const 100) - (i64.const 100) - ) - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - (i64.eq - (i64.const 100) - (i64.const 100) - ) - (i64.ne - (i64.const 100) - (i64.const 100) - ) - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - (i64.clz - (i64.const 100) - ) - (i64.ctz - (i64.const 100) - ) - (i64.popcnt - (i64.const 100) - ) - (f32.add - (f32.const 10) - (f32.const 10) - ) - (f32.sub - (f32.const 10) - (f32.const 10) - ) - (f32.mul - (f32.const 10) - (f32.const 10) - ) - (f32.div - (f32.const 10) - (f32.const 10) - ) - (f32.min - (f32.const 10) - (f32.const 10) - ) - (f32.max - (f32.const 10) - (f32.const 10) - ) - (f32.abs - (f32.const 10) - ) - (f32.neg - (f32.const 10) - ) - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - (f32.ceil - (f32.const 10) - ) - (f32.floor - (f32.const 10) - ) - (f32.trunc - (f32.const 10) - ) - (f32.nearest - (f32.const 10) - ) - (f32.sqrt - (f32.const 10) - ) - (f32.eq - (f32.const 10) - (f32.const 10) - ) - (f32.ne - (f32.const 10) - (f32.const 10) - ) - (f32.lt - (f32.const 10) - (f32.const 10) - ) - (f32.le - (f32.const 10) - (f32.const 10) - ) - (f32.gt - (f32.const 10) - (f32.const 10) - ) - (f32.ge - (f32.const 10) - (f32.const 10) - ) - (f64.add - (f64.const 10) - (f64.const 10) - ) - (f64.sub - (f64.const 10) - (f64.const 10) - ) - (f64.mul - (f64.const 10) - (f64.const 10) - ) - (f64.div - (f64.const 10) - (f64.const 10) - ) - (f64.min - (f64.const 10) - (f64.const 10) - ) - (f64.max - (f64.const 10) - (f64.const 10) - ) - (f64.abs - (f64.const 10) - ) - (f64.neg - (f64.const 10) - ) - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - (f64.ceil - (f64.const 10) - ) - (f64.floor - (f64.const 10) - ) - (f64.trunc - (f64.const 10) - ) - (f64.nearest - (f64.const 10) - ) - (f64.sqrt - (f64.const 10) - ) - (f64.eq - (f64.const 10) - (f64.const 10) - ) - (f64.ne - (f64.const 10) - (f64.const 10) - ) - (f64.lt - (f64.const 10) - (f64.const 10) - ) - (f64.le - (f64.const 10) - (f64.const 10) - ) - (f64.gt - (f64.const 10) - (f64.const 10) - ) - (f64.ge - (f64.const 10) - (f64.const 10) - ) - (i32.trunc_s/f32 - (f32.const 10) - ) - (i32.trunc_s/f64 - (f64.const 10) - ) - (i32.trunc_u/f32 - (f32.const 10) - ) - (i32.trunc_u/f64 - (f64.const 10) - ) - (i32.wrap/i64 - (i64.const 100) - ) - (i64.trunc_s/f32 - (f32.const 10) - ) - (i64.trunc_s/f64 - (f64.const 10) - ) - (i64.trunc_u/f32 - (f32.const 10) - ) - (i64.trunc_u/f64 - (f64.const 10) - ) - (i64.extend_s/i32 - (i32.const 10) - ) - (i64.extend_u/i32 - (i32.const 10) - ) - (f32.convert_s/i32 - (i32.const 10) - ) - (f32.convert_u/i32 - (i32.const 10) - ) - (f32.convert_s/i64 - (i64.const 100) - ) - (f32.convert_u/i64 - (i64.const 100) - ) - (f32.demote/f64 - (f64.const 10) - ) - (f32.reinterpret/i32 - (i32.const 10) - ) - (f64.convert_s/i32 - (i32.const 10) - ) - (f64.convert_u/i32 - (i32.const 10) - ) - (f64.convert_s/i64 - (i64.const 100) - ) - (f64.convert_u/i64 - (i64.const 100) - ) - (f64.promote/f32 - (f32.const 10) - ) - (f64.reinterpret/i64 - (i64.const 100) - ) - (i32.reinterpret/f32 - (f32.const 10) - ) - (i64.reinterpret/f64 - (f64.const 10) + (drop + (i32.add + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.sub + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.mul + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.and + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.or + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.xor + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shl + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.eq + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ne + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.clz + (i32.const 10) + ) + ) + (drop + (i32.ctz + (i32.const 10) + ) + ) + (drop + (i32.popcnt + (i32.const 10) + ) + ) + (drop + (i64.add + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.sub + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.mul + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.and + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.or + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.xor + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shl + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.eq + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ne + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.clz + (i64.const 100) + ) + ) + (drop + (i64.ctz + (i64.const 100) + ) + ) + (drop + (i64.popcnt + (i64.const 100) + ) + ) + (drop + (f32.add + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.sub + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.mul + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.div + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.min + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.max + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.abs + (f32.const 10) + ) + ) + (drop + (f32.neg + (f32.const 10) + ) + ) + (drop + (f32.copysign + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ceil + (f32.const 10) + ) + ) + (drop + (f32.floor + (f32.const 10) + ) + ) + (drop + (f32.trunc + (f32.const 10) + ) + ) + (drop + (f32.nearest + (f32.const 10) + ) + ) + (drop + (f32.sqrt + (f32.const 10) + ) + ) + (drop + (f32.eq + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ne + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.lt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.le + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.gt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ge + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f64.add + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.sub + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.mul + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.div + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.min + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.max + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.abs + (f64.const 10) + ) + ) + (drop + (f64.neg + (f64.const 10) + ) + ) + (drop + (f64.copysign + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ceil + (f64.const 10) + ) + ) + (drop + (f64.floor + (f64.const 10) + ) + ) + (drop + (f64.trunc + (f64.const 10) + ) + ) + (drop + (f64.nearest + (f64.const 10) + ) + ) + (drop + (f64.sqrt + (f64.const 10) + ) + ) + (drop + (f64.eq + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ne + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.lt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.le + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.gt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ge + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (i32.trunc_s/f32 + (f32.const 10) + ) + ) + (drop + (i32.trunc_s/f64 + (f64.const 10) + ) + ) + (drop + (i32.trunc_u/f32 + (f32.const 10) + ) + ) + (drop + (i32.trunc_u/f64 + (f64.const 10) + ) + ) + (drop + (i32.wrap/i64 + (i64.const 100) + ) + ) + (drop + (i64.trunc_s/f32 + (f32.const 10) + ) + ) + (drop + (i64.trunc_s/f64 + (f64.const 10) + ) + ) + (drop + (i64.trunc_u/f32 + (f32.const 10) + ) + ) + (drop + (i64.trunc_u/f64 + (f64.const 10) + ) + ) + (drop + (i64.extend_s/i32 + (i32.const 10) + ) + ) + (drop + (i64.extend_u/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_s/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_u/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_s/i64 + (i64.const 100) + ) + ) + (drop + (f32.convert_u/i64 + (i64.const 100) + ) + ) + (drop + (f32.demote/f64 + (f64.const 10) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_s/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_u/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_s/i64 + (i64.const 100) + ) + ) + (drop + (f64.convert_u/i64 + (i64.const 100) + ) + ) + (drop + (f64.promote/f32 + (f32.const 10) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const 100) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const 10) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const 10) + ) ) (i32.const 0) ) diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary index dd55b5bae..4c3da110c 100644 --- a/test/kitchen_sink.wast.fromBinary +++ b/test/kitchen_sink.wast.fromBinary @@ -4,428 +4,662 @@ (type $0 (func (result i32))) (func $kitchensink (type $0) (result i32) (block $label$0 - (i32.add - (i32.const 10) - (i32.const 10) - ) - (i32.sub - (i32.const 10) - (i32.const 10) - ) - (i32.mul - (i32.const 10) - (i32.const 10) - ) - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - (i32.and - (i32.const 10) - (i32.const 10) - ) - (i32.or - (i32.const 10) - (i32.const 10) - ) - (i32.xor - (i32.const 10) - (i32.const 10) - ) - (i32.shl - (i32.const 10) - (i32.const 10) - ) - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - (i32.eq - (i32.const 10) - (i32.const 10) - ) - (i32.ne - (i32.const 10) - (i32.const 10) - ) - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - (i32.clz - (i32.const 10) - ) - (i32.ctz - (i32.const 10) - ) - (i32.popcnt - (i32.const 10) - ) - (i64.add - (i64.const 100) - (i64.const 100) - ) - (i64.sub - (i64.const 100) - (i64.const 100) - ) - (i64.mul - (i64.const 100) - (i64.const 100) - ) - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - (i64.and - (i64.const 100) - (i64.const 100) - ) - (i64.or - (i64.const 100) - (i64.const 100) - ) - (i64.xor - (i64.const 100) - (i64.const 100) - ) - (i64.shl - (i64.const 100) - (i64.const 100) - ) - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - (i64.eq - (i64.const 100) - (i64.const 100) - ) - (i64.ne - (i64.const 100) - (i64.const 100) - ) - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - (i64.clz - (i64.const 100) - ) - (i64.ctz - (i64.const 100) - ) - (i64.popcnt - (i64.const 100) - ) - (f32.add - (f32.const 10) - (f32.const 10) - ) - (f32.sub - (f32.const 10) - (f32.const 10) - ) - (f32.mul - (f32.const 10) - (f32.const 10) - ) - (f32.div - (f32.const 10) - (f32.const 10) - ) - (f32.min - (f32.const 10) - (f32.const 10) - ) - (f32.max - (f32.const 10) - (f32.const 10) - ) - (f32.abs - (f32.const 10) - ) - (f32.neg - (f32.const 10) - ) - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - (f32.ceil - (f32.const 10) - ) - (f32.floor - (f32.const 10) - ) - (f32.trunc - (f32.const 10) - ) - (f32.nearest - (f32.const 10) - ) - (f32.sqrt - (f32.const 10) - ) - (f32.eq - (f32.const 10) - (f32.const 10) - ) - (f32.ne - (f32.const 10) - (f32.const 10) - ) - (f32.lt - (f32.const 10) - (f32.const 10) - ) - (f32.le - (f32.const 10) - (f32.const 10) - ) - (f32.gt - (f32.const 10) - (f32.const 10) - ) - (f32.ge - (f32.const 10) - (f32.const 10) - ) - (f64.add - (f64.const 10) - (f64.const 10) - ) - (f64.sub - (f64.const 10) - (f64.const 10) - ) - (f64.mul - (f64.const 10) - (f64.const 10) - ) - (f64.div - (f64.const 10) - (f64.const 10) - ) - (f64.min - (f64.const 10) - (f64.const 10) - ) - (f64.max - (f64.const 10) - (f64.const 10) - ) - (f64.abs - (f64.const 10) - ) - (f64.neg - (f64.const 10) - ) - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - (f64.ceil - (f64.const 10) - ) - (f64.floor - (f64.const 10) - ) - (f64.trunc - (f64.const 10) - ) - (f64.nearest - (f64.const 10) - ) - (f64.sqrt - (f64.const 10) - ) - (f64.eq - (f64.const 10) - (f64.const 10) - ) - (f64.ne - (f64.const 10) - (f64.const 10) - ) - (f64.lt - (f64.const 10) - (f64.const 10) - ) - (f64.le - (f64.const 10) - (f64.const 10) - ) - (f64.gt - (f64.const 10) - (f64.const 10) - ) - (f64.ge - (f64.const 10) - (f64.const 10) - ) - (i32.trunc_s/f32 - (f32.const 10) - ) - (i32.trunc_s/f64 - (f64.const 10) - ) - (i32.trunc_u/f32 - (f32.const 10) - ) - (i32.trunc_u/f64 - (f64.const 10) - ) - (i32.wrap/i64 - (i64.const 100) - ) - (i64.trunc_s/f32 - (f32.const 10) - ) - (i64.trunc_s/f64 - (f64.const 10) - ) - (i64.trunc_u/f32 - (f32.const 10) - ) - (i64.trunc_u/f64 - (f64.const 10) - ) - (i64.extend_s/i32 - (i32.const 10) - ) - (i64.extend_u/i32 - (i32.const 10) - ) - (f32.convert_s/i32 - (i32.const 10) - ) - (f32.convert_u/i32 - (i32.const 10) - ) - (f32.convert_s/i64 - (i64.const 100) - ) - (f32.convert_u/i64 - (i64.const 100) - ) - (f32.demote/f64 - (f64.const 10) - ) - (f32.reinterpret/i32 - (i32.const 10) - ) - (f64.convert_s/i32 - (i32.const 10) - ) - (f64.convert_u/i32 - (i32.const 10) - ) - (f64.convert_s/i64 - (i64.const 100) - ) - (f64.convert_u/i64 - (i64.const 100) - ) - (f64.promote/f32 - (f32.const 10) - ) - (f64.reinterpret/i64 - (i64.const 100) - ) - (i32.reinterpret/f32 - (f32.const 10) - ) - (i64.reinterpret/f64 - (f64.const 10) + (drop + (i32.add + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.sub + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.mul + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.and + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.or + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.xor + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shl + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.eq + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ne + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.clz + (i32.const 10) + ) + ) + (drop + (i32.ctz + (i32.const 10) + ) + ) + (drop + (i32.popcnt + (i32.const 10) + ) + ) + (drop + (i64.add + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.sub + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.mul + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.and + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.or + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.xor + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shl + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.eq + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ne + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.clz + (i64.const 100) + ) + ) + (drop + (i64.ctz + (i64.const 100) + ) + ) + (drop + (i64.popcnt + (i64.const 100) + ) + ) + (drop + (f32.add + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.sub + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.mul + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.div + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.min + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.max + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.abs + (f32.const 10) + ) + ) + (drop + (f32.neg + (f32.const 10) + ) + ) + (drop + (f32.copysign + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ceil + (f32.const 10) + ) + ) + (drop + (f32.floor + (f32.const 10) + ) + ) + (drop + (f32.trunc + (f32.const 10) + ) + ) + (drop + (f32.nearest + (f32.const 10) + ) + ) + (drop + (f32.sqrt + (f32.const 10) + ) + ) + (drop + (f32.eq + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ne + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.lt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.le + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.gt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ge + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f64.add + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.sub + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.mul + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.div + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.min + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.max + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.abs + (f64.const 10) + ) + ) + (drop + (f64.neg + (f64.const 10) + ) + ) + (drop + (f64.copysign + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ceil + (f64.const 10) + ) + ) + (drop + (f64.floor + (f64.const 10) + ) + ) + (drop + (f64.trunc + (f64.const 10) + ) + ) + (drop + (f64.nearest + (f64.const 10) + ) + ) + (drop + (f64.sqrt + (f64.const 10) + ) + ) + (drop + (f64.eq + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ne + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.lt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.le + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.gt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ge + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (i32.trunc_s/f32 + (f32.const 10) + ) + ) + (drop + (i32.trunc_s/f64 + (f64.const 10) + ) + ) + (drop + (i32.trunc_u/f32 + (f32.const 10) + ) + ) + (drop + (i32.trunc_u/f64 + (f64.const 10) + ) + ) + (drop + (i32.wrap/i64 + (i64.const 100) + ) + ) + (drop + (i64.trunc_s/f32 + (f32.const 10) + ) + ) + (drop + (i64.trunc_s/f64 + (f64.const 10) + ) + ) + (drop + (i64.trunc_u/f32 + (f32.const 10) + ) + ) + (drop + (i64.trunc_u/f64 + (f64.const 10) + ) + ) + (drop + (i64.extend_s/i32 + (i32.const 10) + ) + ) + (drop + (i64.extend_u/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_s/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_u/i32 + (i32.const 10) + ) + ) + (drop + (f32.convert_s/i64 + (i64.const 100) + ) + ) + (drop + (f32.convert_u/i64 + (i64.const 100) + ) + ) + (drop + (f32.demote/f64 + (f64.const 10) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_s/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_u/i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_s/i64 + (i64.const 100) + ) + ) + (drop + (f64.convert_u/i64 + (i64.const 100) + ) + ) + (drop + (f64.promote/f32 + (f32.const 10) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const 100) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const 10) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const 10) + ) ) (i32.const 0) ) diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast index c4dc678ea..9ef6f368c 100644 --- a/test/llvm_autogenerated/byval.wast +++ b/test/llvm_autogenerated/byval.wast @@ -19,18 +19,27 @@ (export "byval_empty_caller" $byval_empty_caller) (export "byval_empty_callee" $byval_empty_callee) (export "big_byval" $big_byval) - (func $byval_arg (param $0 i32) + (func $byval_arg (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) + (local $2 i32) (i32.store offset=12 - (set_local $1 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $1 + (block + (block + (set_local $2 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $2) ) - (i32.const 16) ) + (get_local $2) ) ) (i32.load @@ -52,18 +61,27 @@ ) (return) ) - (func $byval_arg_align8 (param $0 i32) + (func $byval_arg_align8 (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) + (local $2 i32) (i32.store offset=8 - (set_local $1 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $1 + (block + (block + (set_local $2 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $2) ) - (i32.const 16) ) + (get_local $2) ) ) (i32.load @@ -85,19 +103,28 @@ ) (return) ) - (func $byval_arg_double (param $0 i32) + (func $byval_arg_double (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) + (local $2 i32) (i64.store (i32.add - (set_local $1 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $1 + (block + (block + (set_local $2 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $2) ) - (i32.const 16) ) + (get_local $2) ) ) (i32.const 8) @@ -127,36 +154,45 @@ ) (return) ) - (func $byval_param (param $0 i32) + (func $byval_param (type $FUNCSIG$vi) (param $0 i32) (call_import $ext_func (get_local $0) ) (return) ) - (func $byval_empty_caller (param $0 i32) + (func $byval_empty_caller (type $FUNCSIG$vi) (param $0 i32) (call_import $ext_byval_func_empty (get_local $0) ) (return) ) - (func $byval_empty_callee (param $0 i32) + (func $byval_empty_callee (type $FUNCSIG$vi) (param $0 i32) (call_import $ext_func_empty (get_local $0) ) (return) ) - (func $big_byval (param $0 i32) + (func $big_byval (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (call_import $big_byval_callee - (set_local $0 + (tee_local $0 (call_import $memcpy - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 131072) + ) + ) + (i32.store (i32.const 4) + (get_local $1) ) - (i32.const 131072) ) + (get_local $1) ) (get_local $0) (i32.const 131072) diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast index 2dbdd5e93..2831cf9ab 100644 --- a/test/llvm_autogenerated/cfg-stackify.wast +++ b/test/llvm_autogenerated/cfg-stackify.wast @@ -4,6 +4,11 @@ (export "memory" memory) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) + (type $2 (func (param i32))) + (type $3 (func (param i32 i32))) + (type $4 (func (param i32 i32 i32) (result i32))) + (type $5 (func (param i32 i32) (result i32))) + (type $6 (func (param i32) (result i32))) (import $a "env" "a" (result i32)) (import $bar "env" "bar") (import $something "env" "something") @@ -34,7 +39,7 @@ (export "test13" $test13) (export "test14" $test14) (export "test15" $test15) - (func $test0 (param $0 i32) + (func $test0 (type $2) (param $0 i32) (local $1 i32) (set_local $1 (i32.const 0) @@ -43,7 +48,7 @@ (block $label$2 (br_if $label$2 (i32.lt_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -58,7 +63,7 @@ (br $label$0) ) ) - (func $test1 (param $0 i32) + (func $test1 (type $2) (param $0 i32) (local $1 i32) (set_local $1 (i32.const 0) @@ -67,7 +72,7 @@ (block $label$2 (br_if $label$2 (i32.lt_s - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 1) @@ -82,7 +87,7 @@ (br $label$0) ) ) - (func $test2 (param $0 i32) (param $1 i32) + (func $test2 (type $3) (param $0 i32) (param $1 i32) (block $label$0 (br_if $label$0 (i32.lt_s @@ -107,7 +112,7 @@ ) ) (br_if $label$1 - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const -1) @@ -118,7 +123,7 @@ ) (return) ) - (func $doublediamond (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $doublediamond (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.store (get_local $2) (i32.const 0) @@ -161,12 +166,21 @@ (i32.const 0) ) ) - (func $triangle (param $0 i32) (param $1 i32) (result i32) + (func $triangle (type $5) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) (set_local $2 - (i32.store - (get_local $0) - (i32.const 0) + (block + (block + (set_local $3 + (i32.const 0) + ) + (i32.store + (get_local $0) + (get_local $3) + ) + ) + (get_local $3) ) ) (block $label$0 @@ -186,7 +200,7 @@ (get_local $2) ) ) - (func $diamond (param $0 i32) (param $1 i32) (result i32) + (func $diamond (type $5) (param $0 i32) (param $1 i32) (result i32) (i32.store (get_local $0) (i32.const 0) @@ -215,15 +229,24 @@ (i32.const 0) ) ) - (func $single_block (param $0 i32) (result i32) + (func $single_block (type $6) (param $0 i32) (result i32) + (local $1 i32) (return - (i32.store - (get_local $0) - (i32.const 0) + (block + (block + (set_local $1 + (i32.const 0) + ) + (i32.store + (get_local $0) + (get_local $1) + ) + ) + (get_local $1) ) ) ) - (func $minimal_loop (param $0 i32) (result i32) + (func $minimal_loop (type $6) (param $0 i32) (result i32) (i32.store (get_local $0) (i32.const 0) @@ -236,7 +259,7 @@ (br $label$0) ) ) - (func $simple_loop (param $0 i32) (param $1 i32) (result i32) + (func $simple_loop (type $5) (param $0 i32) (param $1 i32) (result i32) (i32.store (get_local $0) (i32.const 0) @@ -260,12 +283,21 @@ (i32.const 0) ) ) - (func $doubletriangle (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $doubletriangle (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) (set_local $3 - (i32.store - (get_local $2) - (i32.const 0) + (block + (block + (set_local $4 + (i32.const 0) + ) + (i32.store + (get_local $2) + (get_local $4) + ) + ) + (get_local $4) ) ) (block $label$0 @@ -298,7 +330,7 @@ (get_local $3) ) ) - (func $ifelse_earlyexits (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $ifelse_earlyexits (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.store (get_local $2) (i32.const 0) @@ -334,7 +366,7 @@ (i32.const 0) ) ) - (func $doublediamond_in_a_loop (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $doublediamond_in_a_loop (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (loop $label$1 $label$0 (i32.store (get_local $2) @@ -383,7 +415,7 @@ (br $label$0) ) ) - (func $test3 (param $0 i32) + (func $test3 (type $2) (param $0 i32) (block $label$0 (br_if $label$0 (i32.const 0) @@ -412,7 +444,7 @@ ) (return) ) - (func $test4 (param $0 i32) + (func $test4 (type $2) (param $0 i32) (block $label$0 (block $label$1 (br_if $label$1 @@ -426,9 +458,11 @@ (get_local $0) ) ) - (i32.eq - (get_local $0) - (i32.const 2) + (drop + (i32.eq + (get_local $0) + (i32.const 2) + ) ) (br $label$0) ) @@ -450,8 +484,9 @@ ) (return) ) - (func $test5 (param $0 i32) (param $1 i32) + (func $test5 (type $3) (param $0 i32) (param $1 i32) (local $2 i32) + (local $3 i32) (set_local $2 (i32.and (get_local $0) @@ -467,9 +502,17 @@ (block $label$0 (loop $label$2 $label$1 (set_local $0 - (i32.store - (i32.const 0) - (i32.const 0) + (block + (block + (set_local $3 + (i32.const 0) + ) + (i32.store + (i32.const 0) + (get_local $3) + ) + ) + (get_local $3) ) ) (br_if $label$0 @@ -497,10 +540,12 @@ ) (return) ) - (func $test6 (param $0 i32) (param $1 i32) + (func $test6 (type $3) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) (set_local $3 (i32.and (get_local $0) @@ -511,9 +556,17 @@ (block $label$1 (loop $label$3 $label$2 (set_local $0 - (i32.store - (i32.const 0) - (i32.const 0) + (block + (block + (set_local $5 + (i32.const 0) + ) + (i32.store + (i32.const 0) + (get_local $5) + ) + ) + (get_local $5) ) ) (br_if $label$0 @@ -523,13 +576,21 @@ ) (br_if $label$1 (i32.eqz - (set_local $4 + (tee_local $4 (i32.and (get_local $1) - (set_local $2 - (i32.store - (get_local $0) - (i32.const 1) + (tee_local $2 + (block + (block + (set_local $6 + (i32.const 1) + ) + (i32.store + (get_local $0) + (get_local $6) + ) + ) + (get_local $6) ) ) ) @@ -561,13 +622,23 @@ ) (return) ) - (func $test7 (param $0 i32) (param $1 i32) + (func $test7 (type $3) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) (set_local $2 - (i32.store - (i32.const 0) - (i32.const 0) + (block + (block + (set_local $4 + (i32.const 0) + ) + (i32.store + (i32.const 0) + (get_local $4) + ) + ) + (get_local $4) ) ) (set_local $3 @@ -578,9 +649,17 @@ ) (loop $label$1 $label$0 (set_local $0 - (i32.store - (get_local $2) - (i32.const 1) + (block + (block + (set_local $5 + (i32.const 1) + ) + (i32.store + (get_local $2) + (get_local $5) + ) + ) + (get_local $5) ) ) (block $label$2 @@ -620,7 +699,7 @@ ) (unreachable) ) - (func $test8 (result i32) + (func $test8 (type $FUNCSIG$i) (result i32) (loop $label$1 $label$0 (br_if $label$0 (i32.const 0) @@ -628,23 +707,41 @@ (br $label$0) ) ) - (func $test9 + (func $test9 (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) (set_local $0 - (i32.store - (i32.const 0) - (i32.const 0) + (block + (block + (set_local $2 + (i32.const 0) + ) + (i32.store + (i32.const 0) + (get_local $2) + ) + ) + (get_local $2) ) ) (loop $label$1 $label$0 (br_if $label$1 (i32.eqz (i32.and - (set_local $1 - (i32.store - (get_local $0) - (i32.const 1) + (tee_local $1 + (block + (block + (set_local $3 + (i32.const 1) + ) + (i32.store + (get_local $0) + (get_local $3) + ) + ) + (get_local $3) ) ) (call_import $a) @@ -700,7 +797,7 @@ ) (return) ) - (func $test10 + (func $test10 (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -739,7 +836,7 @@ (loop $label$6 $label$5 (br_if $label$0 (i32.gt_u - (set_local $2 + (tee_local $2 (get_local $4) ) (i32.const 4) @@ -761,17 +858,26 @@ (br $label$0) ) ) - (func $test11 + (func $test11 (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) (block $label$0 (block $label$1 (block $label$2 (block $label$3 (br_if $label$3 - (set_local $0 - (i32.store - (i32.const 0) - (i32.const 0) + (tee_local $0 + (block + (block + (set_local $1 + (i32.const 0) + ) + (i32.store + (i32.const 0) + (get_local $1) + ) + ) + (get_local $1) ) ) ) @@ -832,14 +938,14 @@ ) (return) ) - (func $test12 (param $0 i32) + (func $test12 (type $2) (param $0 i32) (local $1 i32) (loop $label$1 $label$0 (block $label$2 (block $label$3 (br_if $label$3 (i32.gt_s - (set_local $1 + (tee_local $1 (i32.load8_u (get_local $0) ) @@ -884,7 +990,7 @@ ) (return) ) - (func $test13 + (func $test13 (type $FUNCSIG$v) (local $0 i32) (block $label$0 (block $label$1 @@ -914,7 +1020,7 @@ ) (unreachable) ) - (func $test14 + (func $test14 (type $FUNCSIG$v) (loop $label$1 $label$0 (br_if $label$0 (i32.const 0) @@ -927,7 +1033,7 @@ ) (return) ) - (func $test15 + (func $test15 (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (block $label$0 @@ -947,7 +1053,7 @@ (i32.const 0) ) (br_if $label$3 - (set_local $0 + (tee_local $0 (i32.add (get_local $0) (i32.const -4) diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast index be6e82cfd..171f3c388 100644 --- a/test/llvm_autogenerated/dead-vreg.wast +++ b/test/llvm_autogenerated/dead-vreg.wast @@ -2,14 +2,16 @@ (memory 1) (data (i32.const 4) "\10\04\00\00") (export "memory" memory) + (type $0 (func (param i32 i32 i32))) (export "foo" $foo) - (func $foo (param $0 i32) (param $1 i32) (param $2 i32) + (func $foo (type $0) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) (block $label$0 (br_if $label$0 (i32.lt_s @@ -49,9 +51,17 @@ (loop $label$5 $label$4 (set_local $6 (i32.add - (i32.store - (get_local $7) - (get_local $6) + (block + (block + (set_local $9 + (get_local $6) + ) + (i32.store + (get_local $7) + (get_local $9) + ) + ) + (get_local $9) ) (get_local $5) ) @@ -63,7 +73,7 @@ ) ) (br_if $label$4 - (set_local $8 + (tee_local $8 (i32.add (get_local $8) (i32.const -1) @@ -80,7 +90,7 @@ ) (br_if $label$1 (i32.ne - (set_local $5 + (tee_local $5 (i32.add (get_local $5) (i32.const 1) diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast index 830c1433c..d76ae4df8 100644 --- a/test/llvm_autogenerated/i128.wast +++ b/test/llvm_autogenerated/i128.wast @@ -4,6 +4,8 @@ (export "memory" memory) (type $FUNCSIG$vijji (func (param i32 i64 i64 i32))) (type $FUNCSIG$vijjjj (func (param i32 i64 i64 i64 i64))) + (type $2 (func (param i32 i64 i64))) + (type $3 (func (param i64 i64) (result i32))) (import $__ashlti3 "env" "__ashlti3" (param i32 i64 i64 i32)) (import $__ashrti3 "env" "__ashrti3" (param i32 i64 i64 i32)) (import $__divti3 "env" "__divti3" (param i32 i64 i64 i64 i64)) @@ -35,7 +37,8 @@ (export "masked_rotl" $masked_rotl) (export "rotr" $rotr) (export "masked_rotr" $masked_rotr) - (func $add128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $add128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i64) (i64.store (i32.add (get_local $0) @@ -50,13 +53,21 @@ (i64.const 1) (i64.extend_u/i32 (i64.lt_u - (set_local $2 - (i64.store - (get_local $0) - (i64.add - (get_local $1) - (get_local $3) + (tee_local $2 + (block + (block + (set_local $5 + (i64.add + (get_local $1) + (get_local $3) + ) + ) + (i64.store + (get_local $0) + (get_local $5) + ) ) + (get_local $5) ) ) (get_local $1) @@ -71,7 +82,7 @@ ) (return) ) - (func $sub128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $sub128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (i64.store (get_local $0) (i64.sub @@ -99,18 +110,27 @@ ) (return) ) - (func $mul128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $mul128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__multi3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -145,18 +165,27 @@ ) (return) ) - (func $sdiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $sdiv128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__divti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -191,18 +220,27 @@ ) (return) ) - (func $udiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $udiv128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__udivti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -237,18 +275,27 @@ ) (return) ) - (func $srem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $srem128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__modti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -283,18 +330,27 @@ ) (return) ) - (func $urem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $urem128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__umodti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -329,7 +385,7 @@ ) (return) ) - (func $and128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $and128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (i64.store (i32.add (get_local $0) @@ -349,7 +405,7 @@ ) (return) ) - (func $or128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $or128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (i64.store (i32.add (get_local $0) @@ -369,7 +425,7 @@ ) (return) ) - (func $xor128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $xor128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (i64.store (i32.add (get_local $0) @@ -389,18 +445,27 @@ ) (return) ) - (func $shl128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $shl128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__ashlti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -436,18 +501,27 @@ ) (return) ) - (func $shr128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $shr128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__lshrti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -483,18 +557,27 @@ ) (return) ) - (func $sar128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $sar128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__ashrti3 - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 16) ) + (get_local $6) ) ) (get_local $1) @@ -530,7 +613,8 @@ ) (return) ) - (func $clz128 (param $0 i32) (param $1 i64) (param $2 i64) + (func $clz128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64) + (local $3 i64) (i64.store (get_local $0) (select @@ -545,19 +629,28 @@ ) (i64.ne (get_local $2) - (i64.store - (i32.add - (get_local $0) - (i32.const 8) + (block + (block + (set_local $3 + (i64.const 0) + ) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (get_local $3) + ) ) - (i64.const 0) + (get_local $3) ) ) ) ) (return) ) - (func $clz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64) + (func $clz128_zero_undef (type $2) (param $0 i32) (param $1 i64) (param $2 i64) + (local $3 i64) (i64.store (get_local $0) (select @@ -572,19 +665,28 @@ ) (i64.ne (get_local $2) - (i64.store - (i32.add - (get_local $0) - (i32.const 8) + (block + (block + (set_local $3 + (i64.const 0) + ) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (get_local $3) + ) ) - (i64.const 0) + (get_local $3) ) ) ) ) (return) ) - (func $ctz128 (param $0 i32) (param $1 i64) (param $2 i64) + (func $ctz128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64) + (local $3 i64) (i64.store (get_local $0) (select @@ -599,19 +701,28 @@ ) (i64.ne (get_local $1) - (i64.store - (i32.add - (get_local $0) - (i32.const 8) + (block + (block + (set_local $3 + (i64.const 0) + ) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (get_local $3) + ) ) - (i64.const 0) + (get_local $3) ) ) ) ) (return) ) - (func $ctz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64) + (func $ctz128_zero_undef (type $2) (param $0 i32) (param $1 i64) (param $2 i64) + (local $3 i64) (i64.store (get_local $0) (select @@ -626,19 +737,27 @@ ) (i64.ne (get_local $1) - (i64.store - (i32.add - (get_local $0) - (i32.const 8) + (block + (block + (set_local $3 + (i64.const 0) + ) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (get_local $3) + ) ) - (i64.const 0) + (get_local $3) ) ) ) ) (return) ) - (func $popcnt128 (param $0 i32) (param $1 i64) (param $2 i64) + (func $popcnt128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64) (i64.store (i32.add (get_local $0) @@ -659,7 +778,7 @@ ) (return) ) - (func $eqz128 (param $0 i64) (param $1 i64) (result i32) + (func $eqz128 (type $3) (param $0 i64) (param $1 i64) (result i32) (return (i64.eqz (i64.or @@ -669,19 +788,28 @@ ) ) ) - (func $rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $rotl (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__ashlti3 (i32.add - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 32) ) + (get_local $6) ) ) (i32.const 16) @@ -746,19 +874,28 @@ ) (return) ) - (func $masked_rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $masked_rotl (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__ashlti3 (i32.add - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 32) ) + (get_local $6) ) ) (i32.const 16) @@ -766,7 +903,7 @@ (get_local $1) (get_local $2) (i32.wrap/i64 - (set_local $3 + (tee_local $3 (i64.and (get_local $3) (i64.const 127) @@ -828,19 +965,28 @@ ) (return) ) - (func $rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $rotr (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__lshrti3 (i32.add - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 32) ) + (get_local $6) ) ) (i32.const 16) @@ -905,19 +1051,28 @@ ) (return) ) - (func $masked_rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $masked_rotr (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 i32) + (local $6 i32) (call_import $__lshrti3 (i32.add - (set_local $5 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $5 + (block + (block + (set_local $6 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store (i32.const 4) + (get_local $6) ) - (i32.const 32) ) + (get_local $6) ) ) (i32.const 16) @@ -925,7 +1080,7 @@ (get_local $1) (get_local $2) (i32.wrap/i64 - (set_local $3 + (tee_local $3 (i64.and (get_local $3) (i64.const 127) diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast index 33362acfc..981e552c9 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.wast +++ b/test/llvm_autogenerated/i64-load-store-alignment.wast @@ -215,28 +215,28 @@ (return) ) (func $sti32_a1 (param $0 i32) (param $1 i64) - (i64.store32 align=1 + (i64.store align=1 (get_local $0) (get_local $1) ) (return) ) (func $sti32_a2 (param $0 i32) (param $1 i64) - (i64.store32 align=2 + (i64.store align=2 (get_local $0) (get_local $1) ) (return) ) (func $sti32_a4 (param $0 i32) (param $1 i64) - (i64.store32 + (i64.store (get_local $0) (get_local $1) ) (return) ) (func $sti32_a8 (param $0 i32) (param $1 i64) - (i64.store32 + (i64.store (get_local $0) (get_local $1) ) diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast index 912efce02..37c487a3e 100644 --- a/test/llvm_autogenerated/legalize.wast +++ b/test/llvm_autogenerated/legalize.wast @@ -3,6 +3,12 @@ (data (i32.const 4) "\10\04\00\00") (export "memory" memory) (type $FUNCSIG$vijji (func (param i32 i64 i64 i32))) + (type $1 (func (param i32 i32 i32) (result i32))) + (type $2 (func (param i64 i64 i32) (result i64))) + (type $3 (func (param i64) (result i64))) + (type $4 (func (param i32) (result f64))) + (type $5 (func (param i32) (result f32))) + (type $6 (func (param i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64))) (import $__ashlti3 "env" "__ashlti3" (param i32 i64 i64 i32)) (import $__lshrti3 "env" "__lshrti3" (param i32 i64 i64 i32)) (export "shl_i3" $shl_i3) @@ -11,7 +17,7 @@ (export "fpext_f32_f64" $fpext_f32_f64) (export "fpconv_f64_f32" $fpconv_f64_f32) (export "bigshift" $bigshift) - (func $shl_i3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $shl_i3 (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (return (i32.shl (get_local $0) @@ -22,7 +28,7 @@ ) ) ) - (func $shl_i53 (param $0 i64) (param $1 i64) (param $2 i32) (result i64) + (func $shl_i53 (type $2) (param $0 i64) (param $1 i64) (param $2 i32) (result i64) (return (i64.shl (get_local $0) @@ -33,7 +39,7 @@ ) ) ) - (func $sext_in_reg_i32_i64 (param $0 i64) (result i64) + (func $sext_in_reg_i32_i64 (type $3) (param $0 i64) (result i64) (return (i64.shr_s (i64.shl @@ -44,7 +50,7 @@ ) ) ) - (func $fpext_f32_f64 (param $0 i32) (result f64) + (func $fpext_f32_f64 (type $4) (param $0 i32) (result f64) (return (f64.promote/f32 (f32.load @@ -53,7 +59,7 @@ ) ) ) - (func $fpconv_f64_f32 (param $0 i32) (result f32) + (func $fpconv_f64_f32 (type $5) (param $0 i32) (result f32) (return (f32.demote/f64 (f64.load @@ -62,7 +68,7 @@ ) ) ) - (func $bigshift (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (param $16 i64) (param $17 i64) (param $18 i64) (param $19 i64) (param $20 i64) (param $21 i64) (param $22 i64) (param $23 i64) (param $24 i64) (param $25 i64) (param $26 i64) (param $27 i64) (param $28 i64) (param $29 i64) (param $30 i64) (param $31 i64) (param $32 i64) + (func $bigshift (type $6) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (param $16 i64) (param $17 i64) (param $18 i64) (param $19 i64) (param $20 i64) (param $21 i64) (param $22 i64) (param $23 i64) (param $24 i64) (param $25 i64) (param $26 i64) (param $27 i64) (param $28 i64) (param $29 i64) (param $30 i64) (param $31 i64) (param $32 i64) (local $33 i32) (local $34 i32) (local $35 i32) @@ -83,24 +89,33 @@ (local $50 i32) (local $51 i32) (local $52 i32) + (local $53 i32) (call_import $__ashlti3 (i32.add - (set_local $33 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $33 + (block + (block + (set_local $53 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 1024) + ) + ) + (i32.store (i32.const 4) + (get_local $53) ) - (i32.const 1024) ) + (get_local $53) ) ) (i32.const 512) ) (get_local $1) (get_local $2) - (set_local $34 + (tee_local $34 (i32.wrap/i64 (get_local $17) ) @@ -122,7 +137,7 @@ ) (get_local $1) (get_local $2) - (set_local $42 + (tee_local $42 (i32.sub (i32.const 128) (get_local $34) @@ -136,7 +151,7 @@ ) (get_local $1) (get_local $2) - (set_local $43 + (tee_local $43 (i32.add (get_local $34) (i32.const -128) @@ -150,7 +165,7 @@ ) (get_local $1) (get_local $2) - (set_local $44 + (tee_local $44 (i32.sub (i32.const 384) (get_local $34) @@ -164,7 +179,7 @@ ) (get_local $3) (get_local $4) - (set_local $35 + (tee_local $35 (i32.add (get_local $34) (i32.const -256) @@ -178,7 +193,7 @@ ) (get_local $1) (get_local $2) - (set_local $40 + (tee_local $40 (i32.add (get_local $34) (i32.const -384) @@ -219,7 +234,7 @@ ) (get_local $3) (get_local $4) - (set_local $36 + (tee_local $36 (i32.sub (i32.const 256) (get_local $34) @@ -242,7 +257,7 @@ ) (get_local $3) (get_local $4) - (set_local $51 + (tee_local $51 (i32.sub (i32.const 128) (get_local $36) @@ -295,7 +310,7 @@ ) (get_local $3) (get_local $4) - (set_local $37 + (tee_local $37 (i32.add (get_local $34) (i32.const -768) @@ -321,7 +336,7 @@ ) (get_local $5) (get_local $6) - (set_local $46 + (tee_local $46 (i32.sub (i32.const 640) (get_local $34) @@ -335,7 +350,7 @@ ) (get_local $7) (get_local $8) - (set_local $38 + (tee_local $38 (i32.add (get_local $34) (i32.const -512) @@ -349,7 +364,7 @@ ) (get_local $5) (get_local $6) - (set_local $52 + (tee_local $52 (i32.add (get_local $34) (i32.const -640) @@ -363,7 +378,7 @@ ) (get_local $3) (get_local $4) - (set_local $39 + (tee_local $39 (i32.sub (i32.const 768) (get_local $34) @@ -440,7 +455,7 @@ ) (get_local $7) (get_local $8) - (set_local $40 + (tee_local $40 (i32.sub (i32.const 512) (get_local $34) @@ -463,7 +478,7 @@ ) (get_local $7) (get_local $8) - (set_local $45 + (tee_local $45 (i32.sub (i32.const 128) (get_local $40) @@ -633,7 +648,7 @@ ) (get_local $5) (get_local $6) - (set_local $41 + (tee_local $41 (i32.sub (i32.const 256) (get_local $40) @@ -778,7 +793,7 @@ ) ) (i64.const 0) - (set_local $42 + (tee_local $42 (i32.lt_u (get_local $34) (i32.const 128) @@ -786,7 +801,7 @@ ) ) (i64.const 0) - (set_local $43 + (tee_local $43 (i32.lt_u (get_local $34) (i32.const 256) @@ -794,7 +809,7 @@ ) ) (i64.const 0) - (set_local $44 + (tee_local $44 (i32.lt_u (get_local $34) (i32.const 512) @@ -958,7 +973,7 @@ ) ) (i64.const 0) - (set_local $46 + (tee_local $46 (i32.lt_u (get_local $36) (i32.const 128) @@ -997,7 +1012,7 @@ (i32.const 8) ) ) - (set_local $45 + (tee_local $45 (i32.lt_u (get_local $35) (i32.const 128) @@ -1324,7 +1339,7 @@ ) ) (i64.const 0) - (set_local $51 + (tee_local $51 (i32.lt_u (get_local $40) (i32.const 128) @@ -1332,7 +1347,7 @@ ) ) (i64.const 0) - (set_local $52 + (tee_local $52 (i32.lt_u (get_local $40) (i32.const 256) @@ -1374,7 +1389,7 @@ (i32.const 8) ) ) - (set_local $48 + (tee_local $48 (i32.lt_u (get_local $38) (i32.const 128) @@ -1395,7 +1410,7 @@ ) ) (i64.const 0) - (set_local $49 + (tee_local $49 (i32.lt_u (get_local $39) (i32.const 128) @@ -1434,7 +1449,7 @@ (i32.const 8) ) ) - (set_local $47 + (tee_local $47 (i32.lt_u (get_local $37) (i32.const 128) @@ -1444,7 +1459,7 @@ (get_local $4) (get_local $37) ) - (set_local $50 + (tee_local $50 (i32.lt_u (get_local $38) (i32.const 256) @@ -1978,7 +1993,7 @@ ) ) (i64.const 0) - (set_local $35 + (tee_local $35 (i32.lt_u (get_local $41) (i32.const 128) diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast index 62d586ad9..52d52c13a 100644 --- a/test/llvm_autogenerated/mem-intrinsics.wast +++ b/test/llvm_autogenerated/mem-intrinsics.wast @@ -5,6 +5,8 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $3 (func (param i32 i32 i32))) + (type $4 (func (param i32 i32 i32 i32 i32) (result i32))) (import $block_tail_dup "env" "block_tail_dup") (import $def "env" "def" (result i32)) (import $memcpy "env" "memcpy" (param i32 i32 i32) (result i32)) @@ -19,7 +21,7 @@ (export "frame_index" $frame_index) (export "drop_result" $drop_result) (export "tail_dup_to_reuse_result" $tail_dup_to_reuse_result) - (func $copy_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $copy_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (return (call_import $memcpy (get_local $0) @@ -28,15 +30,17 @@ ) ) ) - (func $copy_no (param $0 i32) (param $1 i32) (param $2 i32) - (call_import $memcpy - (get_local $0) - (get_local $1) - (get_local $2) + (func $copy_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32) + (drop + (call_import $memcpy + (get_local $0) + (get_local $1) + (get_local $2) + ) ) (return) ) - (func $move_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $move_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (return (call_import $memmove (get_local $0) @@ -45,15 +49,17 @@ ) ) ) - (func $move_no (param $0 i32) (param $1 i32) (param $2 i32) - (call_import $memmove - (get_local $0) - (get_local $1) - (get_local $2) + (func $move_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32) + (drop + (call_import $memmove + (get_local $0) + (get_local $1) + (get_local $2) + ) ) (return) ) - (func $set_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $set_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (return (call_import $memset (get_local $0) @@ -62,33 +68,46 @@ ) ) ) - (func $set_no (param $0 i32) (param $1 i32) (param $2 i32) - (call_import $memset - (get_local $0) - (get_local $1) - (get_local $2) + (func $set_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32) + (drop + (call_import $memset + (get_local $0) + (get_local $1) + (get_local $2) + ) ) (return) ) - (func $frame_index + (func $frame_index (type $FUNCSIG$v) (local $0 i32) - (call_import $memset - (i32.add - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load - (i32.const 4) + (local $1 i32) + (drop + (call_import $memset + (i32.add + (tee_local $0 + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 4096) + ) + ) + (i32.store + (i32.const 4) + (get_local $1) + ) ) - (i32.const 4096) + (get_local $1) ) ) + (i32.const 2048) ) - (i32.const 2048) + (i32.const 0) + (i32.const 1024) ) - (i32.const 0) - (i32.const 1024) ) (i32.store (i32.const 4) @@ -103,7 +122,7 @@ ) (return) ) - (func $drop_result (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $drop_result (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (block $label$0 (block $label$1 (block $label$2 @@ -128,17 +147,19 @@ (get_local $0) ) ) - (call_import $memset - (get_local $0) - (get_local $1) - (get_local $2) + (drop + (call_import $memset + (get_local $0) + (get_local $1) + (get_local $2) + ) ) (call_import $block_tail_dup) (return (get_local $0) ) ) - (func $tail_dup_to_reuse_result (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $tail_dup_to_reuse_result (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (block $label$0 (block $label$1 (block $label$2 diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast index a24a055e3..b86e801f2 100644 --- a/test/llvm_autogenerated/offset.wast +++ b/test/llvm_autogenerated/offset.wast @@ -3,6 +3,12 @@ (data (i32.const 4) "\10\04\00\00") (data (i32.const 12) "\00\00\00\00") (export "memory" memory) + (type $0 (func (param i32) (result i32))) + (type $1 (func (param i32) (result i64))) + (type $2 (func (param i32))) + (type $3 (func (result i32))) + (type $4 (func)) + (type $5 (func (param i32 i32))) (export "load_i32_with_folded_offset" $load_i32_with_folded_offset) (export "load_i32_with_folded_gep_offset" $load_i32_with_folded_gep_offset) (export "load_i32_with_unfolded_gep_negative_offset" $load_i32_with_unfolded_gep_negative_offset) @@ -38,17 +44,17 @@ (export "aggregate_load_store" $aggregate_load_store) (export "aggregate_return" $aggregate_return) (export "aggregate_return_without_merge" $aggregate_return_without_merge) - (func $load_i32_with_folded_offset (param $0 i32) (result i32) + (func $load_i32_with_folded_offset (type $0) (param $0 i32) (result i32) (i32.load offset=24 (get_local $0) ) ) - (func $load_i32_with_folded_gep_offset (param $0 i32) (result i32) + (func $load_i32_with_folded_gep_offset (type $0) (param $0 i32) (result i32) (i32.load offset=24 (get_local $0) ) ) - (func $load_i32_with_unfolded_gep_negative_offset (param $0 i32) (result i32) + (func $load_i32_with_unfolded_gep_negative_offset (type $0) (param $0 i32) (result i32) (i32.load (i32.add (get_local $0) @@ -56,7 +62,7 @@ ) ) ) - (func $load_i32_with_unfolded_offset (param $0 i32) (result i32) + (func $load_i32_with_unfolded_offset (type $0) (param $0 i32) (result i32) (i32.load (i32.add (get_local $0) @@ -64,7 +70,7 @@ ) ) ) - (func $load_i32_with_unfolded_gep_offset (param $0 i32) (result i32) + (func $load_i32_with_unfolded_gep_offset (type $0) (param $0 i32) (result i32) (i32.load (i32.add (get_local $0) @@ -72,17 +78,17 @@ ) ) ) - (func $load_i64_with_folded_offset (param $0 i32) (result i64) + (func $load_i64_with_folded_offset (type $1) (param $0 i32) (result i64) (i64.load offset=24 (get_local $0) ) ) - (func $load_i64_with_folded_gep_offset (param $0 i32) (result i64) + (func $load_i64_with_folded_gep_offset (type $1) (param $0 i32) (result i64) (i64.load offset=24 (get_local $0) ) ) - (func $load_i64_with_unfolded_gep_negative_offset (param $0 i32) (result i64) + (func $load_i64_with_unfolded_gep_negative_offset (type $1) (param $0 i32) (result i64) (i64.load (i32.add (get_local $0) @@ -90,7 +96,7 @@ ) ) ) - (func $load_i64_with_unfolded_offset (param $0 i32) (result i64) + (func $load_i64_with_unfolded_offset (type $1) (param $0 i32) (result i64) (i64.load (i32.add (get_local $0) @@ -98,7 +104,7 @@ ) ) ) - (func $load_i64_with_unfolded_gep_offset (param $0 i32) (result i64) + (func $load_i64_with_unfolded_gep_offset (type $1) (param $0 i32) (result i64) (i64.load (i32.add (get_local $0) @@ -106,7 +112,7 @@ ) ) ) - (func $load_i32_with_folded_or_offset (param $0 i32) (result i32) + (func $load_i32_with_folded_or_offset (type $0) (param $0 i32) (result i32) (i32.load8_s offset=2 (i32.and (get_local $0) @@ -114,19 +120,19 @@ ) ) ) - (func $store_i32_with_folded_offset (param $0 i32) + (func $store_i32_with_folded_offset (type $2) (param $0 i32) (i32.store offset=24 (get_local $0) (i32.const 0) ) ) - (func $store_i32_with_folded_gep_offset (param $0 i32) + (func $store_i32_with_folded_gep_offset (type $2) (param $0 i32) (i32.store offset=24 (get_local $0) (i32.const 0) ) ) - (func $store_i32_with_unfolded_gep_negative_offset (param $0 i32) + (func $store_i32_with_unfolded_gep_negative_offset (type $2) (param $0 i32) (i32.store (i32.add (get_local $0) @@ -135,7 +141,7 @@ (i32.const 0) ) ) - (func $store_i32_with_unfolded_offset (param $0 i32) + (func $store_i32_with_unfolded_offset (type $2) (param $0 i32) (i32.store (i32.add (get_local $0) @@ -144,7 +150,7 @@ (i32.const 0) ) ) - (func $store_i32_with_unfolded_gep_offset (param $0 i32) + (func $store_i32_with_unfolded_gep_offset (type $2) (param $0 i32) (i32.store (i32.add (get_local $0) @@ -153,19 +159,19 @@ (i32.const 0) ) ) - (func $store_i64_with_folded_offset (param $0 i32) + (func $store_i64_with_folded_offset (type $2) (param $0 i32) (i64.store offset=24 (get_local $0) (i64.const 0) ) ) - (func $store_i64_with_folded_gep_offset (param $0 i32) + (func $store_i64_with_folded_gep_offset (type $2) (param $0 i32) (i64.store offset=24 (get_local $0) (i64.const 0) ) ) - (func $store_i64_with_unfolded_gep_negative_offset (param $0 i32) + (func $store_i64_with_unfolded_gep_negative_offset (type $2) (param $0 i32) (i64.store (i32.add (get_local $0) @@ -174,7 +180,7 @@ (i64.const 0) ) ) - (func $store_i64_with_unfolded_offset (param $0 i32) + (func $store_i64_with_unfolded_offset (type $2) (param $0 i32) (i64.store (i32.add (get_local $0) @@ -183,7 +189,7 @@ (i64.const 0) ) ) - (func $store_i64_with_unfolded_gep_offset (param $0 i32) + (func $store_i64_with_unfolded_gep_offset (type $2) (param $0 i32) (i64.store (i32.add (get_local $0) @@ -192,7 +198,7 @@ (i64.const 0) ) ) - (func $store_i32_with_folded_or_offset (param $0 i32) + (func $store_i32_with_folded_or_offset (type $2) (param $0 i32) (i32.store8 offset=2 (i32.and (get_local $0) @@ -201,61 +207,61 @@ (i32.const 0) ) ) - (func $load_i32_from_numeric_address (result i32) + (func $load_i32_from_numeric_address (type $3) (result i32) (i32.load offset=42 (i32.const 0) ) ) - (func $load_i32_from_global_address (result i32) + (func $load_i32_from_global_address (type $3) (result i32) (i32.load offset=12 (i32.const 0) ) ) - (func $store_i32_to_numeric_address + (func $store_i32_to_numeric_address (type $4) (i32.store offset=42 (i32.const 0) (i32.const 0) ) ) - (func $store_i32_to_global_address + (func $store_i32_to_global_address (type $4) (i32.store offset=12 (i32.const 0) (i32.const 0) ) ) - (func $load_i8_s_with_folded_offset (param $0 i32) (result i32) + (func $load_i8_s_with_folded_offset (type $0) (param $0 i32) (result i32) (i32.load8_s offset=24 (get_local $0) ) ) - (func $load_i8_s_with_folded_gep_offset (param $0 i32) (result i32) + (func $load_i8_s_with_folded_gep_offset (type $0) (param $0 i32) (result i32) (i32.load8_s offset=24 (get_local $0) ) ) - (func $load_i8_u_with_folded_offset (param $0 i32) (result i32) + (func $load_i8_u_with_folded_offset (type $0) (param $0 i32) (result i32) (i32.load8_u offset=24 (get_local $0) ) ) - (func $load_i8_u_with_folded_gep_offset (param $0 i32) (result i32) + (func $load_i8_u_with_folded_gep_offset (type $0) (param $0 i32) (result i32) (i32.load8_u offset=24 (get_local $0) ) ) - (func $store_i8_with_folded_offset (param $0 i32) + (func $store_i8_with_folded_offset (type $2) (param $0 i32) (i32.store8 offset=24 (get_local $0) (i32.const 0) ) ) - (func $store_i8_with_folded_gep_offset (param $0 i32) + (func $store_i8_with_folded_gep_offset (type $2) (param $0 i32) (i32.store8 offset=24 (get_local $0) (i32.const 0) ) ) - (func $aggregate_load_store (param $0 i32) (param $1 i32) + (func $aggregate_load_store (type $5) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -293,24 +299,51 @@ (get_local $2) ) ) - (func $aggregate_return (param $0 i32) + (func $aggregate_return (type $2) (param $0 i32) + (local $1 i64) (i64.store align=4 (get_local $0) - (i64.store offset=8 align=4 - (get_local $0) - (i64.const 0) + (block + (block + (set_local $1 + (i64.const 0) + ) + (i64.store offset=8 align=4 + (get_local $0) + (get_local $1) + ) + ) + (get_local $1) ) ) ) - (func $aggregate_return_without_merge (param $0 i32) + (func $aggregate_return_without_merge (type $2) (param $0 i32) + (local $1 i32) + (local $2 i32) (i32.store offset=8 (get_local $0) - (i32.store16 offset=12 - (get_local $0) - (i32.store8 offset=14 - (get_local $0) - (i32.const 0) + (block + (block + (set_local $2 + (block + (block + (set_local $1 + (i32.const 0) + ) + (i32.store8 offset=14 + (get_local $0) + (get_local $1) + ) + ) + (get_local $1) + ) + ) + (i32.store16 offset=12 + (get_local $0) + (get_local $2) + ) ) + (get_local $2) ) ) (i64.store diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast index 3bd742e8d..6975b7197 100644 --- a/test/llvm_autogenerated/phi.wast +++ b/test/llvm_autogenerated/phi.wast @@ -49,7 +49,7 @@ ) (br_if $label$0 (i32.lt_s - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const 1) diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast index b9526b566..fa4225900 100644 --- a/test/llvm_autogenerated/reg-stackify.wast +++ b/test/llvm_autogenerated/reg-stackify.wast @@ -9,6 +9,11 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $6 (func (param i32 i32 i32) (result i32))) + (type $7 (func (param i32 i32 i32 i32) (result i32))) + (type $8 (func (param i32 i32 i32))) + (type $9 (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $10 (func (param i32 i32 i32 i32 i32))) (import $blue "env" "blue" (result i32)) (import $callee "env" "callee" (param i32) (result i32)) (import $evoke_side_effects "env" "evoke_side_effects") @@ -45,7 +50,7 @@ (export "no_stackify_past_epilogue" $no_stackify_past_epilogue) (export "stackify_indvar" $stackify_indvar) (export "stackpointer_dependency" $stackpointer_dependency) - (func $no0 (param $0 i32) (param $1 i32) (result i32) + (func $no0 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (set_local $1 (i32.load (get_local $1) @@ -59,7 +64,7 @@ (get_local $1) ) ) - (func $no1 (param $0 i32) (param $1 i32) (result i32) + (func $no1 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (set_local $1 (i32.load (get_local $1) @@ -73,7 +78,7 @@ (get_local $1) ) ) - (func $yes0 (param $0 i32) (param $1 i32) (result i32) + (func $yes0 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (i32.store (get_local $0) (i32.const 0) @@ -84,14 +89,14 @@ ) ) ) - (func $yes1 (param $0 i32) (result i32) + (func $yes1 (type $FUNCSIG$ii) (param $0 i32) (result i32) (return (i32.load (get_local $0) ) ) ) - (func $sink_trap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $sink_trap (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.store (get_local $2) (i32.const 0) @@ -103,7 +108,7 @@ ) ) ) - (func $sink_readnone_call (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $sink_readnone_call (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.store (get_local $2) (i32.const 0) @@ -112,7 +117,7 @@ (call_import $readnone_callee) ) ) - (func $no_sink_readonly_call (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $no_sink_readonly_call (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (set_local $3 (call_import $readonly_callee) @@ -125,7 +130,7 @@ (get_local $3) ) ) - (func $stack_uses (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $stack_uses (type $7) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (block $label$0 (br_if $label$0 (i32.ne @@ -162,12 +167,12 @@ (i32.const 1) ) ) - (func $multiple_uses (param $0 i32) (param $1 i32) (param $2 i32) + (func $multiple_uses (type $8) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (block $label$0 (br_if $label$0 (i32.ge_u - (set_local $3 + (tee_local $3 (i32.load (get_local $2) ) @@ -188,12 +193,21 @@ ) (return) ) - (func $stackify_store_across_side_effects (param $0 i32) + (func $stackify_store_across_side_effects (type $FUNCSIG$vi) (param $0 i32) (local $1 i64) + (local $2 i64) (set_local $1 - (i64.store - (get_local $0) - (i64.const 4611686018427387904) + (block + (block + (set_local $2 + (i64.const 4611686018427387904) + ) + (i64.store + (get_local $0) + (get_local $2) + ) + ) + (get_local $2) ) ) (call_import $evoke_side_effects) @@ -204,7 +218,7 @@ (call_import $evoke_side_effects) (return) ) - (func $div_tree (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (result i32) + (func $div_tree (type $9) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (result i32) (return (i32.div_s (i32.div_s @@ -254,9 +268,9 @@ ) ) ) - (func $simple_multiple_use (param $0 i32) (param $1 i32) + (func $simple_multiple_use (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (call_import $use_a - (set_local $1 + (tee_local $1 (i32.mul (get_local $1) (get_local $0) @@ -268,9 +282,9 @@ ) (return) ) - (func $multiple_uses_in_same_insn (param $0 i32) (param $1 i32) + (func $multiple_uses_in_same_insn (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (call_import $use_2 - (set_local $1 + (tee_local $1 (i32.mul (get_local $1) (get_local $0) @@ -280,7 +294,7 @@ ) (return) ) - (func $commute (result i32) + (func $commute (type $FUNCSIG$i) (result i32) (return (i32.add (i32.add @@ -291,7 +305,7 @@ ) ) ) - (func $no_stackify_past_use (param $0 i32) (result i32) + (func $no_stackify_past_use (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (call_import $callee @@ -313,11 +327,11 @@ ) ) ) - (func $commute_to_fix_ordering (param $0 i32) (result i32) + (func $commute_to_fix_ordering (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (return (i32.mul - (set_local $1 + (tee_local $1 (call_import $callee (get_local $0) ) @@ -334,7 +348,7 @@ ) ) ) - (func $multiple_defs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $multiple_defs (type $10) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) @@ -393,7 +407,7 @@ (f64.add (select (f64.const -11353.57) - (set_local $9 + (tee_local $9 (f64.add (get_local $7) (f64.const -1) @@ -401,7 +415,7 @@ ) (get_local $2) ) - (set_local $6 + (tee_local $6 (get_local $8) ) ) @@ -437,7 +451,7 @@ (br $label$0) ) ) - (func $no_stackify_call_past_load (result i32) + (func $no_stackify_call_past_load (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (set_local $0 @@ -448,18 +462,29 @@ (i32.const 0) ) ) - (call_import $callee - (get_local $0) + (drop + (call_import $callee + (get_local $0) + ) ) (return (get_local $1) ) ) - (func $no_stackify_store_past_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $no_stackify_store_past_load (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) (set_local $1 - (i32.store - (get_local $1) - (get_local $0) + (block + (block + (set_local $3 + (get_local $0) + ) + (i32.store + (get_local $1) + (get_local $3) + ) + ) + (get_local $3) ) ) (set_local $2 @@ -467,18 +492,31 @@ (get_local $2) ) ) - (call_import $callee - (get_local $1) + (drop + (call_import $callee + (get_local $1) + ) ) (return (get_local $2) ) ) - (func $store_past_invar_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (call_import $callee - (i32.store - (get_local $1) - (get_local $0) + (func $store_past_invar_load (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (drop + (call_import $callee + (block + (block + (set_local $3 + (get_local $0) + ) + (i32.store + (get_local $1) + (get_local $3) + ) + ) + (get_local $3) + ) ) ) (return @@ -487,24 +525,33 @@ ) ) ) - (func $ignore_dbg_value + (func $ignore_dbg_value (type $FUNCSIG$v) (unreachable) ) - (func $no_stackify_past_epilogue (result i32) + (func $no_stackify_past_epilogue (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) (set_local $1 (call_import $use_memory (i32.add - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $0 + (block + (block + (set_local $2 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $2) ) - (i32.const 16) ) + (get_local $2) ) ) (i32.const 12) @@ -522,7 +569,7 @@ (get_local $1) ) ) - (func $stackify_indvar (param $0 i32) (param $1 i32) + (func $stackify_indvar (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (set_local $2 (i32.const 0) @@ -540,7 +587,7 @@ (br_if $label$0 (i32.ne (get_local $0) - (set_local $2 + (tee_local $2 (i32.add (get_local $2) (i32.const 1) @@ -551,12 +598,12 @@ ) (return) ) - (func $stackpointer_dependency (param $0 i32) (result i32) + (func $stackpointer_dependency (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (set_local $0 (call_import $stackpointer_callee (get_local $0) - (set_local $1 + (tee_local $1 (i32.load (i32.const 4) ) diff --git a/test/llvm_autogenerated/store-results.wast b/test/llvm_autogenerated/store-results.wast index c0969bf5f..1f2cd9c98 100644 --- a/test/llvm_autogenerated/store-results.wast +++ b/test/llvm_autogenerated/store-results.wast @@ -2,19 +2,30 @@ (memory 1) (data (i32.const 4) " \04\00\00") (export "memory" memory) + (type $0 (func (param i32) (result i32))) + (type $1 (func)) (export "single_block" $single_block) (export "foo" $foo) (export "bar" $bar) (export "fi_ret" $fi_ret) - (func $single_block (param $0 i32) (result i32) + (func $single_block (type $0) (param $0 i32) (result i32) + (local $1 i32) (return - (i32.store - (get_local $0) - (i32.const 0) + (block + (block + (set_local $1 + (i32.const 0) + ) + (i32.store + (get_local $0) + (get_local $1) + ) + ) + (get_local $1) ) ) ) - (func $foo + (func $foo (type $1) (local $0 i32) (set_local $0 (i32.const 0) @@ -26,7 +37,7 @@ ) (br_if $label$0 (i32.ne - (set_local $0 + (tee_local $0 (i32.add (get_local $0) (i32.const 1) @@ -38,7 +49,7 @@ ) (return) ) - (func $bar + (func $bar (type $1) (local $0 f32) (set_local $0 (f32.const 0) @@ -50,7 +61,7 @@ ) (br_if $label$0 (f32.ne - (set_local $0 + (tee_local $0 (f32.add (get_local $0) (f32.const 1) @@ -62,16 +73,25 @@ ) (return) ) - (func $fi_ret (param $0 i32) (result i32) + (func $fi_ret (type $0) (param $0 i32) (result i32) + (local $1 i32) (return - (i32.store - (get_local $0) - (i32.sub - (i32.load - (i32.const 4) + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store + (get_local $0) + (get_local $1) ) - (i32.const 32) ) + (get_local $1) ) ) ) diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast index cf20bcd00..d37c3b5c0 100644 --- a/test/llvm_autogenerated/store-trunc.wast +++ b/test/llvm_autogenerated/store-trunc.wast @@ -32,7 +32,7 @@ ) ) (func $trunc_i32_i64 (param $0 i32) (param $1 i64) - (i64.store32 + (i64.store (get_local $0) (get_local $1) ) diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast index 216930a03..d9ccc83e5 100644 --- a/test/llvm_autogenerated/userstack.wast +++ b/test/llvm_autogenerated/userstack.wast @@ -3,6 +3,8 @@ (data (i32.const 4) "\10\04\00\00") (export "memory" memory) (type $FUNCSIG$vi (func (param i32))) + (type $1 (func)) + (type $2 (func (param i32 i32))) (import $ext_func "env" "ext_func" (param i32)) (import $ext_func_i32 "env" "ext_func_i32" (param i32)) (import $use_i8_star "env" "use_i8_star" (param i32)) @@ -18,18 +20,27 @@ (export "frameaddress_0" $frameaddress_0) (export "frameaddress_1" $frameaddress_1) (export "inline_asm" $inline_asm) - (func $alloca32 + (func $alloca32 (type $1) (local $0 i32) + (local $1 i32) (i32.store offset=12 - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $0 + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $1) ) - (i32.const 16) ) + (get_local $1) ) ) (i32.const 0) @@ -43,10 +54,10 @@ ) (return) ) - (func $alloca3264 + (func $alloca3264 (type $1) (local $0 i32) (i32.store offset=12 - (set_local $0 + (tee_local $0 (i32.sub (i32.load (i32.const 4) @@ -62,26 +73,44 @@ ) (return) ) - (func $allocarray + (func $allocarray (type $1) (local $0 i32) + (local $1 i32) + (local $2 i32) (i32.store offset=12 - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $0 + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 144) + ) + ) + (i32.store (i32.const 4) + (get_local $1) ) - (i32.const 144) ) + (get_local $1) ) ) - (i32.store - (i32.add - (get_local $0) - (i32.const 24) + (block + (block + (set_local $2 + (i32.const 1) + ) + (i32.store + (i32.add + (get_local $0) + (i32.const 24) + ) + (get_local $2) + ) ) - (i32.const 1) + (get_local $2) ) ) (i32.store @@ -93,19 +122,28 @@ ) (return) ) - (func $non_mem_use (param $0 i32) + (func $non_mem_use (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) + (local $2 i32) (call_import $ext_func (i32.add - (set_local $1 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $1 + (block + (block + (set_local $2 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 48) + ) + ) + (i32.store (i32.const 4) + (get_local $2) ) - (i32.const 48) ) + (get_local $2) ) ) (i32.const 8) @@ -130,23 +168,41 @@ ) (return) ) - (func $allocarray_inbounds + (func $allocarray_inbounds (type $1) (local $0 i32) + (local $1 i32) + (local $2 i32) (i32.store offset=12 - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $0 + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + (i32.store (i32.const 4) + (get_local $1) ) - (i32.const 32) ) + (get_local $1) ) ) - (i32.store offset=24 - (get_local $0) - (i32.const 1) + (block + (block + (set_local $2 + (i32.const 1) + ) + (i32.store offset=24 + (get_local $0) + (get_local $2) + ) + ) + (get_local $2) ) ) (call_import $ext_func @@ -161,13 +217,13 @@ ) (return) ) - (func $dynamic_alloca (param $0 i32) + (func $dynamic_alloca (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (i32.store (i32.const 4) - (set_local $0 + (tee_local $0 (i32.sub - (set_local $1 + (tee_local $1 (i32.load (i32.const 4) ) @@ -194,7 +250,7 @@ ) (return) ) - (func $dynamic_alloca_redzone (param $0 i32) + (func $dynamic_alloca_redzone (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (set_local $1 (i32.load @@ -222,22 +278,31 @@ ) (return) ) - (func $dynamic_static_alloca (param $0 i32) + (func $dynamic_static_alloca (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) + (local $2 i32) (i32.store (i32.const 4) - (set_local $0 + (tee_local $0 (i32.sub - (i32.store - (i32.const 4) - (set_local $1 - (i32.sub - (i32.load - (i32.const 4) + (block + (block + (set_local $2 + (tee_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) ) - (i32.const 16) + ) + (i32.store + (i32.const 4) + (get_local $2) ) ) + (get_local $2) ) (i32.and (i32.add @@ -265,7 +330,7 @@ ) (return) ) - (func $copytoreg_fi (param $0 i32) (param $1 i32) + (func $copytoreg_fi (type $2) (param $0 i32) (param $1 i32) (local $2 i32) (set_local $2 (i32.add @@ -298,10 +363,10 @@ ) (return) ) - (func $frameaddress_0 + (func $frameaddress_0 (type $1) (local $0 i32) (call_import $use_i8_star - (set_local $0 + (tee_local $0 (i32.load (i32.const 4) ) @@ -313,13 +378,13 @@ ) (return) ) - (func $frameaddress_1 + (func $frameaddress_1 (type $1) (call_import $use_i8_star (i32.const 0) ) (return) ) - (func $inline_asm + (func $inline_asm (type $1) (local $0 i32) (set_local $0 (i32.add diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast index 02b3f2202..17d93d1ae 100644 --- a/test/llvm_autogenerated/varargs.wast +++ b/test/llvm_autogenerated/varargs.wast @@ -3,6 +3,10 @@ (data (i32.const 4) "\10\04\00\00") (export "memory" memory) (type $FUNCSIG$vi (func (param i32))) + (type $1 (func (param i32 i32))) + (type $2 (func (param i32) (result i32))) + (type $3 (func)) + (type $4 (func (param i32 i32 i32))) (import $callee "env" "callee" (param i32)) (export "start" $start) (export "end" $end) @@ -13,17 +17,17 @@ (export "caller_none" $caller_none) (export "caller_some" $caller_some) (export "startbb" $startbb) - (func $start (param $0 i32) (param $1 i32) + (func $start (type $1) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) ) (return) ) - (func $end (param $0 i32) + (func $end (type $FUNCSIG$vi) (param $0 i32) (return) ) - (func $copy (param $0 i32) (param $1 i32) + (func $copy (type $1) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (i32.load @@ -32,12 +36,12 @@ ) (return) ) - (func $arg_i8 (param $0 i32) (result i32) + (func $arg_i8 (type $2) (param $0 i32) (result i32) (local $1 i32) (i32.store (get_local $0) (i32.add - (set_local $1 + (tee_local $1 (i32.load (get_local $0) ) @@ -51,12 +55,12 @@ ) ) ) - (func $arg_i32 (param $0 i32) (result i32) + (func $arg_i32 (type $2) (param $0 i32) (result i32) (local $1 i32) (i32.store (get_local $0) (i32.add - (set_local $1 + (tee_local $1 (i32.and (i32.add (i32.load @@ -76,27 +80,36 @@ ) ) ) - (func $arg_i128 (param $0 i32) (param $1 i32) + (func $arg_i128 (type $1) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) + (local $5 i32) (set_local $2 - (i32.store - (get_local $1) - (i32.add - (set_local $3 - (i32.and - (i32.add - (i32.load - (get_local $1) + (block + (block + (set_local $5 + (i32.add + (tee_local $3 + (i32.and + (i32.add + (i32.load + (get_local $1) + ) + (i32.const 7) + ) + (i32.const -8) ) - (i32.const 7) ) - (i32.const -8) + (i32.const 8) ) ) - (i32.const 8) + (i32.store + (get_local $1) + (get_local $5) + ) ) + (get_local $5) ) ) (set_local $4 @@ -126,24 +139,33 @@ ) (return) ) - (func $caller_none + (func $caller_none (type $3) (call_import $callee (i32.const 0) ) (return) ) - (func $caller_some + (func $caller_some (type $3) (local $0 i32) + (local $1 i32) (i64.store offset=8 - (set_local $0 - (i32.store - (i32.const 4) - (i32.sub - (i32.load + (tee_local $0 + (block + (block + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + (i32.store (i32.const 4) + (get_local $1) ) - (i32.const 16) ) + (get_local $1) ) ) (i64.const 4611686018427387904) @@ -164,7 +186,7 @@ ) (return) ) - (func $startbb (param $0 i32) (param $1 i32) (param $2 i32) + (func $startbb (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (block $label$0 (br_if $label$0 (i32.eqz diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index c07cc247e..d39786018 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -123,16 +123,16 @@ (block (if (i32.and - (set_local $12 + (tee_local $12 (i32.shr_u - (set_local $16 + (tee_local $16 (i32.load (i32.const 1208) ) ) - (set_local $2 + (tee_local $2 (i32.shr_u - (set_local $14 + (tee_local $14 (select (i32.const 16) (i32.and @@ -158,18 +158,18 @@ (block (set_local $11 (i32.load - (set_local $27 + (tee_local $27 (i32.add - (set_local $29 + (tee_local $29 (i32.load - (set_local $25 + (tee_local $25 (i32.add - (set_local $5 + (tee_local $5 (i32.add (i32.const 1248) (i32.shl (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.xor (i32.and @@ -228,7 +228,7 @@ (if (i32.eq (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $11) (i32.const 12) @@ -254,7 +254,7 @@ (i32.store offset=4 (get_local $29) (i32.or - (set_local $11 + (tee_local $11 (i32.shl (get_local $0) (i32.const 3) @@ -264,7 +264,7 @@ ) ) (i32.store - (set_local $25 + (tee_local $25 (i32.add (i32.add (get_local $29) @@ -292,7 +292,7 @@ (if (i32.gt_u (get_local $14) - (set_local $25 + (tee_local $25 (i32.load (i32.const 1216) ) @@ -305,17 +305,17 @@ (set_local $5 (i32.and (i32.shr_u - (set_local $11 + (tee_local $11 (i32.add (i32.and - (set_local $5 + (tee_local $5 (i32.and (i32.shl (get_local $12) (get_local $2) ) (i32.or - (set_local $11 + (tee_local $11 (i32.shl (i32.const 2) (get_local $2) @@ -343,27 +343,27 @@ ) (set_local $5 (i32.load - (set_local $19 + (tee_local $19 (i32.add - (set_local $8 + (tee_local $8 (i32.load - (set_local $0 + (tee_local $0 (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.const 1248) (i32.shl (i32.shl - (set_local $7 + (tee_local $7 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $11 + (tee_local $11 (i32.and (i32.shr_u - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $11) (get_local $5) @@ -376,10 +376,10 @@ ) (get_local $5) ) - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u - (set_local $8 + (tee_local $8 (i32.shr_u (get_local $19) (get_local $11) @@ -391,10 +391,10 @@ ) ) ) - (set_local $8 + (tee_local $8 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $8) (get_local $19) @@ -406,10 +406,10 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $3) (get_local $8) @@ -479,7 +479,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $5) (i32.const 12) @@ -515,14 +515,14 @@ ) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (get_local $14) ) ) (i32.or - (set_local $5 + (tee_local $5 (i32.sub (i32.shl (get_local $7) @@ -554,7 +554,7 @@ (i32.const 1248) (i32.shl (i32.shl - (set_local $25 + (tee_local $25 (i32.shr_u (get_local $39) (i32.const 3) @@ -568,12 +568,12 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (i32.const 1208) ) ) - (set_local $12 + (tee_local $12 (i32.shl (i32.const 1) (get_local $25) @@ -582,9 +582,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $12 + (tee_local $12 (i32.add (get_local $16) (i32.const 8) @@ -661,7 +661,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load (i32.const 1212) ) @@ -670,7 +670,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.add (i32.and (get_local $0) @@ -691,7 +691,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $25 + (tee_local $25 (i32.load (i32.add (i32.shl @@ -700,10 +700,10 @@ (i32.or (i32.or (i32.or - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $16 + (tee_local $16 (i32.shr_u (get_local $5) (get_local $0) @@ -716,10 +716,10 @@ ) (get_local $0) ) - (set_local $16 + (tee_local $16 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $16) (get_local $5) @@ -731,10 +731,10 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $3) (get_local $16) @@ -746,10 +746,10 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $2) (get_local $3) @@ -784,9 +784,9 @@ (set_local $3 (get_local $25) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if - (set_local $25 + (tee_local $25 (i32.load offset=16 (get_local $12) ) @@ -795,7 +795,7 @@ (get_local $25) ) (if - (set_local $16 + (tee_local $16 (i32.load offset=20 (get_local $12) ) @@ -810,13 +810,13 @@ (set_local $26 (get_local $3) ) - (br $while-out$6) + (br $while-out$23) ) ) ) (set_local $16 (i32.lt_u - (set_local $25 + (tee_local $25 (i32.sub (i32.and (i32.load offset=4 @@ -847,12 +847,12 @@ (get_local $16) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $26) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -863,7 +863,7 @@ (if (i32.ge_u (get_local $26) - (set_local $12 + (tee_local $12 (i32.add (get_local $26) (get_local $14) @@ -877,10 +877,10 @@ (get_local $26) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $19 + (tee_local $19 (i32.load offset=12 (get_local $26) ) @@ -889,9 +889,9 @@ ) (block (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $26) (i32.const 20) @@ -908,9 +908,9 @@ ) ) (if - (set_local $25 + (tee_local $25 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $26) (i32.const 16) @@ -930,15 +930,15 @@ (set_local $27 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $11) (i32.const 20) @@ -953,13 +953,13 @@ (set_local $0 (get_local $8) ) - (br $while-in$11) + (br $while-in$28) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $11) (i32.const 16) @@ -975,9 +975,9 @@ (get_local $8) ) ) - (br $while-out$10) + (br $while-out$27) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -999,7 +999,7 @@ (block (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load offset=8 (get_local $26) ) @@ -1011,7 +1011,7 @@ (if (i32.ne (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 12) @@ -1025,7 +1025,7 @@ (if (i32.eq (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $19) (i32.const 8) @@ -1052,7 +1052,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $2) (block @@ -1060,11 +1060,11 @@ (i32.eq (get_local $26) (i32.load - (set_local $3 + (tee_local $3 (i32.add (i32.const 1512) (i32.shl - (set_local $19 + (tee_local $19 (i32.load offset=28 (get_local $26) ) @@ -1100,7 +1100,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1117,7 +1117,7 @@ (if (i32.eq (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $2) (i32.const 16) @@ -1135,7 +1135,7 @@ (get_local $27) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eqz (get_local $27) ) @@ -1145,7 +1145,7 @@ (if (i32.lt_u (get_local $27) - (set_local $19 + (tee_local $19 (i32.load (i32.const 1224) ) @@ -1158,7 +1158,7 @@ (get_local $2) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=16 (get_local $26) ) @@ -1182,7 +1182,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=20 (get_local $26) ) @@ -1219,7 +1219,7 @@ (i32.store offset=4 (get_local $26) (i32.or - (set_local $2 + (tee_local $2 (i32.add (get_local $32) (get_local $14) @@ -1229,7 +1229,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (i32.add (get_local $26) @@ -1269,7 +1269,7 @@ (get_local $32) ) (if - (set_local $3 + (tee_local $3 (i32.load (i32.const 1216) ) @@ -1285,7 +1285,7 @@ (i32.const 1248) (i32.shl (i32.shl - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $3) (i32.const 3) @@ -1299,12 +1299,12 @@ ) (if (i32.and - (set_local $8 + (tee_local $8 (i32.load (i32.const 1208) ) ) - (set_local $16 + (tee_local $16 (i32.shl (i32.const 1) (get_local $19) @@ -1313,9 +1313,9 @@ ) (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $3) (i32.const 8) @@ -1416,7 +1416,7 @@ (block (set_local $2 (i32.and - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 11) @@ -1426,7 +1426,7 @@ ) ) (if - (set_local $8 + (tee_local $8 (i32.load (i32.const 1212) ) @@ -1440,13 +1440,13 @@ ) (block $label$break$a (if - (set_local $0 + (tee_local $0 (i32.load (i32.add (i32.shl - (set_local $34 + (tee_local $34 (if - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $3) (i32.const 8) @@ -1463,20 +1463,20 @@ (i32.shr_u (get_local $2) (i32.add - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $19) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -1499,11 +1499,11 @@ ) (get_local $3) ) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $25 + (tee_local $25 (i32.shl (get_local $7) (get_local $19) @@ -1579,12 +1579,12 @@ (set_local $5 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $29 + (tee_local $29 (i32.sub - (set_local $27 + (tee_local $27 (i32.and (i32.load offset=4 (get_local $19) @@ -1638,7 +1638,7 @@ (set_local $27 (select (get_local $25) - (set_local $29 + (tee_local $29 (i32.load offset=20 (get_local $19) ) @@ -1650,7 +1650,7 @@ ) (i32.eq (get_local $29) - (set_local $19 + (tee_local $19 (i32.load (i32.add (i32.add @@ -1672,7 +1672,7 @@ ) ) (if - (set_local $29 + (tee_local $29 (i32.eq (get_local $19) (i32.const 0) @@ -1691,7 +1691,7 @@ (set_local $7 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $7 @@ -1717,7 +1717,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) (block @@ -1742,7 +1742,7 @@ (i32.const 86) ) (if - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -1757,11 +1757,11 @@ (block (if (i32.eqz - (set_local $16 + (tee_local $16 (i32.and (get_local $8) (i32.or - (set_local $0 + (tee_local $0 (i32.shl (i32.const 2) (get_local $34) @@ -1785,7 +1785,7 @@ (set_local $16 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.add (i32.and (get_local $16) @@ -1810,10 +1810,10 @@ (i32.or (i32.or (i32.or - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $14 + (tee_local $14 (i32.shr_u (get_local $0) (get_local $16) @@ -1826,10 +1826,10 @@ ) (get_local $16) ) - (set_local $14 + (tee_local $14 (i32.and (i32.shr_u - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $14) (get_local $0) @@ -1841,10 +1841,10 @@ ) ) ) - (set_local $12 + (tee_local $12 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $12) (get_local $14) @@ -1856,10 +1856,10 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $5) (get_local $12) @@ -1914,13 +1914,13 @@ (get_local $7) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $7 (i32.const 0) ) (set_local $3 (i32.lt_u - (set_local $5 + (tee_local $5 (i32.sub (i32.and (i32.load offset=4 @@ -1949,7 +1949,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=16 (get_local $18) ) @@ -1964,11 +1964,11 @@ (set_local $17 (get_local $5) ) - (br $while-in$20) + (br $while-in$6) ) ) (if - (set_local $18 + (tee_local $18 (i32.load offset=20 (get_local $18) ) @@ -1988,10 +1988,10 @@ (set_local $9 (get_local $5) ) - (br $while-out$19) + (br $while-out$5) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2010,7 +2010,7 @@ (if (i32.lt_u (get_local $9) - (set_local $8 + (tee_local $8 (i32.load (i32.const 1224) ) @@ -2021,7 +2021,7 @@ (if (i32.ge_u (get_local $9) - (set_local $5 + (tee_local $5 (i32.add (get_local $9) (get_local $2) @@ -2035,10 +2035,10 @@ (get_local $9) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=12 (get_local $9) ) @@ -2047,9 +2047,9 @@ ) (block (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $9) (i32.const 20) @@ -2066,9 +2066,9 @@ ) ) (if - (set_local $25 + (tee_local $25 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $9) (i32.const 16) @@ -2083,15 +2083,15 @@ (set_local $20 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $11) (i32.const 20) @@ -2106,13 +2106,13 @@ (set_local $0 (get_local $14) ) - (br $while-in$24) + (br $while-in$10) ) ) (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $11) (i32.const 16) @@ -2128,9 +2128,9 @@ (get_local $14) ) ) - (br $while-out$23) + (br $while-out$9) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2152,7 +2152,7 @@ (block (if (i32.lt_u - (set_local $14 + (tee_local $14 (i32.load offset=8 (get_local $9) ) @@ -2164,7 +2164,7 @@ (if (i32.ne (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $14) (i32.const 12) @@ -2178,7 +2178,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const 8) @@ -2205,7 +2205,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $12) (block @@ -2213,11 +2213,11 @@ (i32.eq (get_local $9) (i32.load - (set_local $8 + (tee_local $8 (i32.add (i32.const 1512) (i32.shl - (set_local $3 + (tee_local $3 (i32.load offset=28 (get_local $9) ) @@ -2253,7 +2253,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2270,7 +2270,7 @@ (if (i32.eq (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $12) (i32.const 16) @@ -2288,7 +2288,7 @@ (get_local $20) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eqz (get_local $20) ) @@ -2298,7 +2298,7 @@ (if (i32.lt_u (get_local $20) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -2311,7 +2311,7 @@ (get_local $12) ) (if - (set_local $8 + (tee_local $8 (i32.load offset=16 (get_local $9) ) @@ -2335,7 +2335,7 @@ ) ) (if - (set_local $8 + (tee_local $8 (i32.load offset=20 (get_local $9) ) @@ -2363,7 +2363,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $22) @@ -2373,7 +2373,7 @@ (i32.store offset=4 (get_local $9) (i32.or - (set_local $12 + (tee_local $12 (i32.add (get_local $22) (get_local $2) @@ -2383,7 +2383,7 @@ ) ) (i32.store - (set_local $8 + (tee_local $8 (i32.add (i32.add (get_local $9) @@ -2448,12 +2448,12 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.load (i32.const 1208) ) ) - (set_local $14 + (tee_local $14 (i32.shl (i32.const 1) (get_local $8) @@ -2462,9 +2462,9 @@ ) (if (i32.lt_u - (set_local $3 + (tee_local $3 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $12) (i32.const 8) @@ -2521,16 +2521,16 @@ (get_local $5) (get_local $12) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $0 (i32.add (i32.const 1512) (i32.shl - (set_local $20 + (tee_local $20 (if - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $22) (i32.const 8) @@ -2547,20 +2547,20 @@ (i32.shr_u (get_local $22) (i32.add - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $12 + (tee_local $12 (i32.and (i32.shr_u (i32.add - (set_local $14 + (tee_local $14 (i32.shl (get_local $12) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -2583,11 +2583,11 @@ ) (get_local $3) ) - (set_local $14 + (tee_local $14 (i32.and (i32.shr_u (i32.add - (set_local $8 + (tee_local $8 (i32.shl (get_local $14) (get_local $12) @@ -2634,7 +2634,7 @@ (get_local $20) ) (i32.store offset=4 - (set_local $14 + (tee_local $14 (i32.add (get_local $5) (i32.const 16) @@ -2649,12 +2649,12 @@ (if (i32.eqz (i32.and - (set_local $14 + (tee_local $14 (i32.load (i32.const 1212) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $20) @@ -2686,7 +2686,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $8 @@ -2713,7 +2713,7 @@ (get_local $0) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -2731,13 +2731,13 @@ (set_local $7 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $14) @@ -2775,10 +2775,10 @@ (set_local $7 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -2820,9 +2820,9 @@ (if (i32.and (i32.ge_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $21) (i32.const 8) @@ -2830,7 +2830,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -2900,7 +2900,7 @@ ) (if (i32.ge_u - (set_local $9 + (tee_local $9 (i32.load (i32.const 1216) ) @@ -2915,7 +2915,7 @@ ) (if (i32.gt_u - (set_local $21 + (tee_local $21 (i32.sub (get_local $9) (get_local $18) @@ -2926,7 +2926,7 @@ (block (i32.store (i32.const 1228) - (set_local $6 + (tee_local $6 (i32.add (get_local $24) (get_local $18) @@ -2976,7 +2976,7 @@ ) ) (i32.store - (set_local $21 + (tee_local $21 (i32.add (i32.add (get_local $24) @@ -3008,7 +3008,7 @@ ) (if (i32.gt_u - (set_local $24 + (tee_local $24 (i32.load (i32.const 1220) ) @@ -3018,7 +3018,7 @@ (block (i32.store (i32.const 1220) - (set_local $21 + (tee_local $21 (i32.sub (get_local $24) (get_local $18) @@ -3027,9 +3027,9 @@ ) (i32.store (i32.const 1232) - (set_local $9 + (tee_local $9 (i32.add - (set_local $24 + (tee_local $24 (i32.load (i32.const 1232) ) @@ -3097,7 +3097,7 @@ ) (i32.store (get_local $15) - (set_local $24 + (tee_local $24 (i32.xor (i32.and (get_local $15) @@ -3121,16 +3121,16 @@ ) (if (i32.le_u - (set_local $15 + (tee_local $15 (i32.and - (set_local $9 + (tee_local $9 (i32.add - (set_local $15 + (tee_local $15 (i32.load (i32.const 1688) ) ) - (set_local $21 + (tee_local $21 (i32.add (get_local $18) (i32.const 47) @@ -3138,7 +3138,7 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.sub (i32.const 0) (get_local $15) @@ -3159,7 +3159,7 @@ ) ) (if - (set_local $22 + (tee_local $22 (i32.load (i32.const 1648) ) @@ -3167,9 +3167,9 @@ (if (i32.or (i32.le_u - (set_local $13 + (tee_local $13 (i32.add - (set_local $20 + (tee_local $20 (i32.load (i32.const 1640) ) @@ -3197,7 +3197,7 @@ ) (if (i32.eq - (set_local $7 + (tee_local $7 (block $label$break$b (if (i32.and @@ -3210,7 +3210,7 @@ (block (block $label$break$c (if - (set_local $22 + (tee_local $22 (i32.load (i32.const 1232) ) @@ -3222,7 +3222,7 @@ (loop $while-out$35 $while-in$36 (if (i32.le_u - (set_local $20 + (tee_local $20 (i32.load (get_local $13) ) @@ -3234,7 +3234,7 @@ (i32.add (get_local $20) (i32.load - (set_local $23 + (tee_local $23 (i32.add (get_local $13) (i32.const 4) @@ -3257,7 +3257,7 @@ ) (if (i32.eqz - (set_local $13 + (tee_local $13 (i32.load offset=8 (get_local $13) ) @@ -3274,7 +3274,7 @@ ) (if (i32.lt_u - (set_local $13 + (tee_local $13 (i32.and (i32.sub (get_local $9) @@ -3289,7 +3289,7 @@ ) (if (i32.eq - (set_local $23 + (tee_local $23 (call_import $ta (get_local $13) ) @@ -3347,7 +3347,7 @@ ) (if (i32.ne - (set_local $22 + (tee_local $22 (call_import $ta (i32.const 0) ) @@ -3358,9 +3358,9 @@ (set_local $6 (if (i32.and - (set_local $23 + (tee_local $23 (i32.add - (set_local $13 + (tee_local $13 (i32.load (i32.const 1684) ) @@ -3368,7 +3368,7 @@ (i32.const -1) ) ) - (set_local $2 + (tee_local $2 (get_local $22) ) ) @@ -3393,7 +3393,7 @@ ) (set_local $2 (i32.add - (set_local $13 + (tee_local $13 (i32.load (i32.const 1640) ) @@ -3414,7 +3414,7 @@ ) (block (if - (set_local $23 + (tee_local $23 (i32.load (i32.const 1648) ) @@ -3434,7 +3434,7 @@ ) (if (i32.eq - (set_local $23 + (tee_local $23 (call_import $ta (get_local $6) ) @@ -3502,14 +3502,14 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.and (i32.add (i32.sub (get_local $21) (get_local $1) ) - (set_local $22 + (tee_local $22 (i32.load (i32.const 1688) ) @@ -3531,8 +3531,10 @@ (i32.const -1) ) (block - (call_import $ta - (get_local $23) + (drop + (call_import $ta + (get_local $23) + ) ) (br $label$break$d) ) @@ -3595,12 +3597,12 @@ (if (i32.and (i32.lt_u - (set_local $4 + (tee_local $4 (call_import $ta (get_local $15) ) ) - (set_local $15 + (tee_local $15 (call_import $ta (i32.const 0) ) @@ -3619,7 +3621,7 @@ ) (if (i32.gt_u - (set_local $10 + (tee_local $10 (i32.sub (get_local $15) (get_local $4) @@ -3653,7 +3655,7 @@ (block (i32.store (i32.const 1640) - (set_local $10 + (tee_local $10 (i32.add (i32.load (i32.const 1640) @@ -3676,7 +3678,7 @@ ) (block $do-once$42 (if - (set_local $10 + (tee_local $10 (i32.load (i32.const 1232) ) @@ -3685,19 +3687,19 @@ (set_local $1 (i32.const 1656) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$44 $do-in$45 (if (i32.eq (get_local $28) (i32.add - (set_local $4 + (tee_local $4 (i32.load (get_local $1) ) ) - (set_local $21 + (tee_local $21 (i32.load - (set_local $15 + (tee_local $15 (i32.add (get_local $1) (i32.const 4) @@ -3723,12 +3725,12 @@ (set_local $7 (i32.const 201) ) - (br $do-out$46) + (br $do-out$44) ) ) - (br_if $do-in$47 + (br_if $do-in$45 (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -3773,13 +3775,13 @@ (set_local $1 (i32.add (get_local $10) - (set_local $21 + (tee_local $21 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $10) (i32.const 8) @@ -3847,7 +3849,7 @@ (if (i32.lt_u (get_local $28) - (set_local $15 + (tee_local $15 (i32.load (i32.const 1224) ) @@ -3872,7 +3874,7 @@ (set_local $1 (i32.const 1656) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (i32.load @@ -3890,12 +3892,12 @@ (set_local $7 (i32.const 209) ) - (br $while-out$48) + (br $while-out$46) ) ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -3905,10 +3907,10 @@ (set_local $37 (i32.const 1656) ) - (br $while-out$48) + (br $while-out$46) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -3931,7 +3933,7 @@ (get_local $28) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $45) (i32.const 4) @@ -3952,7 +3954,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $28) (i32.const 8) @@ -3979,7 +3981,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -4020,7 +4022,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$48 (if (i32.eq (get_local $4) @@ -4029,7 +4031,7 @@ (block (i32.store (i32.const 1220) - (set_local $6 + (tee_local $6 (i32.add (i32.load (i32.const 1220) @@ -4061,7 +4063,7 @@ (block (i32.store (i32.const 1216) - (set_local $6 + (tee_local $6 (i32.add (i32.load (i32.const 1216) @@ -4088,16 +4090,16 @@ ) (get_local $6) ) - (br $do-once$50) + (br $do-once$48) ) ) (i32.store - (set_local $0 + (tee_local $0 (i32.add (if (i32.eq (i32.and - (set_local $6 + (tee_local $6 (i32.load offset=4 (get_local $4) ) @@ -4131,15 +4133,15 @@ (get_local $4) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.ne - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $4) ) ) - (set_local $23 + (tee_local $23 (i32.add (i32.const 1248) (i32.shl @@ -4160,7 +4162,7 @@ ) (call_import $qa) ) - (br_if $do-once$53 + (br_if $do-once$59 (i32.eq (i32.load offset=12 (get_local $6) @@ -4196,7 +4198,7 @@ (br $label$break$e) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $9) @@ -4219,7 +4221,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $9) (i32.const 8) @@ -4232,7 +4234,7 @@ (set_local $46 (get_local $2) ) - (br $do-once$55) + (br $do-once$61) ) ) (call_import $qa) @@ -4254,10 +4256,10 @@ (get_local $4) ) ) - (block $do-once$57 + (block $do-once$51 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $4) ) @@ -4266,11 +4268,11 @@ ) (block (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add - (set_local $22 + (tee_local $22 (i32.add (get_local $4) (i32.const 16) @@ -4290,7 +4292,7 @@ ) ) (if - (set_local $20 + (tee_local $20 (i32.load (get_local $22) ) @@ -4307,15 +4309,15 @@ (set_local $30 (i32.const 0) ) - (br $do-once$57) + (br $do-once$51) ) ) ) - (loop $while-out$59 $while-in$60 + (loop $while-out$53 $while-in$54 (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $11) (i32.const 20) @@ -4330,13 +4332,13 @@ (set_local $0 (get_local $13) ) - (br $while-in$60) + (br $while-in$54) ) ) (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $11) (i32.const 16) @@ -4352,9 +4354,9 @@ (get_local $13) ) ) - (br $while-out$59) + (br $while-out$53) ) - (br $while-in$60) + (br $while-in$54) ) (if (i32.lt_u @@ -4376,7 +4378,7 @@ (block (if (i32.lt_u - (set_local $13 + (tee_local $13 (i32.load offset=8 (get_local $4) ) @@ -4388,7 +4390,7 @@ (if (i32.ne (i32.load - (set_local $20 + (tee_local $20 (i32.add (get_local $13) (i32.const 12) @@ -4402,7 +4404,7 @@ (if (i32.eq (i32.load - (set_local $22 + (tee_local $22 (i32.add (get_local $2) (i32.const 8) @@ -4434,16 +4436,16 @@ (get_local $23) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $4) (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.const 1512) (i32.shl - (set_local $2 + (tee_local $2 (i32.load offset=28 (get_local $4) ) @@ -4459,7 +4461,7 @@ (get_local $6) (get_local $30) ) - (br_if $do-once$61 + (br_if $do-once$55 (get_local $30) ) (i32.store @@ -4492,7 +4494,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $23) (i32.const 16) @@ -4521,7 +4523,7 @@ (if (i32.lt_u (get_local $30) - (set_local $2 + (tee_local $2 (i32.load (i32.const 1224) ) @@ -4534,9 +4536,9 @@ (get_local $23) ) (if - (set_local $9 + (tee_local $9 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $4) (i32.const 16) @@ -4564,7 +4566,7 @@ ) (br_if $label$break$e (i32.eqz - (set_local $9 + (tee_local $9 (i32.load offset=4 (get_local $6) ) @@ -4659,15 +4661,15 @@ ) ) ) - (block $do-once$65 + (block $do-once$63 (if (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.const 1208) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $0) @@ -4677,9 +4679,9 @@ (block (if (i32.ge_u - (set_local $23 + (tee_local $23 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $6) (i32.const 8) @@ -4698,7 +4700,7 @@ (set_local $41 (get_local $23) ) - (br $do-once$65) + (br $do-once$63) ) ) (call_import $qa) @@ -4739,24 +4741,24 @@ (get_local $1) (get_local $6) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $2 (i32.add (i32.const 1512) (i32.shl - (set_local $0 - (block $do-once$67 + (tee_local $0 + (block $do-once$65 (if - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $11) (i32.const 8) ) ) (block - (br_if $do-once$67 + (br_if $do-once$65 (i32.const 31) (i32.gt_u (get_local $11) @@ -4768,20 +4770,20 @@ (i32.shr_u (get_local $11) (i32.add - (set_local $13 + (tee_local $13 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $23 + (tee_local $23 (i32.and (i32.shr_u (i32.add - (set_local $17 + (tee_local $17 (i32.shl (get_local $2) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u (i32.add @@ -4804,11 +4806,11 @@ ) (get_local $9) ) - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $0 + (tee_local $0 (i32.shl (get_local $17) (get_local $23) @@ -4856,7 +4858,7 @@ (get_local $0) ) (i32.store offset=4 - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 16) @@ -4871,12 +4873,12 @@ (if (i32.eqz (i32.and - (set_local $6 + (tee_local $6 (i32.load (i32.const 1212) ) ) - (set_local $13 + (tee_local $13 (i32.shl (i32.const 1) (get_local $0) @@ -4908,7 +4910,7 @@ (get_local $1) (get_local $1) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $13 @@ -4935,7 +4937,7 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$67 $while-in$68 (if (i32.eq (i32.and @@ -4953,13 +4955,13 @@ (set_local $7 (i32.const 279) ) - (br $while-out$69) + (br $while-out$67) ) ) (if - (set_local $17 + (tee_local $17 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $6) @@ -4997,10 +4999,10 @@ (set_local $7 (i32.const 276) ) - (br $while-out$69) + (br $while-out$67) ) ) - (br $while-in$70) + (br $while-in$68) ) (if (i32.eq @@ -5042,9 +5044,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $42) (i32.const 8) @@ -5052,7 +5054,7 @@ ) ) ) - (set_local $17 + (tee_local $17 (i32.load (i32.const 1224) ) @@ -5105,10 +5107,10 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (if (i32.le_u - (set_local $1 + (tee_local $1 (i32.load (get_local $37) ) @@ -5117,7 +5119,7 @@ ) (if (i32.gt_u - (set_local $24 + (tee_local $24 (i32.add (get_local $1) (i32.load offset=4 @@ -5131,7 +5133,7 @@ (set_local $0 (get_local $24) ) - (br $while-out$71) + (br $while-out$69) ) ) ) @@ -5140,11 +5142,11 @@ (get_local $37) ) ) - (br $while-in$72) + (br $while-in$70) ) (set_local $24 (i32.add - (set_local $21 + (tee_local $21 (i32.add (get_local $0) (i32.const -47) @@ -5155,10 +5157,10 @@ ) (set_local $1 (i32.add - (set_local $21 + (tee_local $21 (select (get_local $10) - (set_local $1 + (tee_local $1 (i32.add (get_local $21) (select @@ -5182,7 +5184,7 @@ ) (i32.lt_u (get_local $1) - (set_local $24 + (tee_local $24 (i32.add (get_local $10) (i32.const 16) @@ -5196,16 +5198,16 @@ ) (i32.store (i32.const 1232) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) - (set_local $15 + (tee_local $15 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) (i32.const 8) @@ -5228,7 +5230,7 @@ ) (i32.store (i32.const 1220) - (set_local $13 + (tee_local $13 (i32.sub (i32.add (get_local $33) @@ -5259,7 +5261,7 @@ ) ) (i32.store - (set_local $13 + (tee_local $13 (i32.add (get_local $21) (i32.const 4) @@ -5313,9 +5315,9 @@ (i32.const 24) ) ) - (loop $do-in$74 + (loop $do-in$72 (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 4) @@ -5323,7 +5325,7 @@ ) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$72 (i32.lt_u (i32.add (get_local $1) @@ -5351,7 +5353,7 @@ (i32.store offset=4 (get_local $10) (i32.or - (set_local $1 + (tee_local $1 (i32.sub (get_local $21) (get_local $10) @@ -5390,12 +5392,12 @@ ) (if (i32.and - (set_local $6 + (tee_local $6 (i32.load (i32.const 1208) ) ) - (set_local $17 + (tee_local $17 (i32.shl (i32.const 1) (get_local $4) @@ -5404,9 +5406,9 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $15) (i32.const 8) @@ -5470,9 +5472,9 @@ (i32.add (i32.const 1512) (i32.shl - (set_local $0 + (tee_local $0 (if - (set_local $15 + (tee_local $15 (i32.shr_u (get_local $1) (i32.const 8) @@ -5489,20 +5491,20 @@ (i32.shr_u (get_local $1) (i32.add - (set_local $2 + (tee_local $2 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $17 + (tee_local $17 (i32.shl (get_local $15) - (set_local $6 + (tee_local $6 (i32.and (i32.shr_u (i32.add @@ -5525,11 +5527,11 @@ ) (get_local $6) ) - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $17) (get_local $15) @@ -5586,12 +5588,12 @@ (if (i32.eqz (i32.and - (set_local $17 + (tee_local $17 (i32.load (i32.const 1212) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $0) @@ -5650,7 +5652,7 @@ (get_local $2) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (if (i32.eq (i32.and @@ -5668,13 +5670,13 @@ (set_local $7 (i32.const 305) ) - (br $while-out$75) + (br $while-out$73) ) ) (if - (set_local $6 + (tee_local $6 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $17) @@ -5712,10 +5714,10 @@ (set_local $7 (i32.const 302) ) - (br $while-out$75) + (br $while-out$73) ) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.eq @@ -5757,9 +5759,9 @@ (if (i32.and (i32.ge_u - (set_local $4 + (tee_local $4 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $32) (i32.const 8) @@ -5767,7 +5769,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 1224) ) @@ -5811,7 +5813,7 @@ (if (i32.or (i32.eq - (set_local $4 + (tee_local $4 (i32.load (i32.const 1224) ) @@ -5853,9 +5855,9 @@ (set_local $4 (i32.const 0) ) - (loop $do-in$45 + (loop $do-in$76 (i32.store offset=12 - (set_local $15 + (tee_local $15 (i32.add (i32.const 1248) (i32.shl @@ -5873,9 +5875,9 @@ (get_local $15) (get_local $15) ) - (br_if $do-in$45 + (br_if $do-in$76 (i32.ne - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const 1) @@ -5887,16 +5889,16 @@ ) (i32.store (i32.const 1232) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) - (set_local $15 + (tee_local $15 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) (i32.const 8) @@ -5919,7 +5921,7 @@ ) (i32.store (i32.const 1220) - (set_local $1 + (tee_local $1 (i32.sub (i32.add (get_local $33) @@ -5954,7 +5956,7 @@ ) (if (i32.gt_u - (set_local $10 + (tee_local $10 (i32.load (i32.const 1220) ) @@ -5964,7 +5966,7 @@ (block (i32.store (i32.const 1220) - (set_local $32 + (tee_local $32 (i32.sub (get_local $10) (get_local $18) @@ -5973,9 +5975,9 @@ ) (i32.store (i32.const 1232) - (set_local $7 + (tee_local $7 (i32.add - (set_local $10 + (tee_local $10 (i32.load (i32.const 1232) ) @@ -6050,13 +6052,13 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $14 + (tee_local $14 (i32.load (i32.const 1224) ) @@ -6066,9 +6068,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.add (get_local $0) @@ -6086,7 +6088,7 @@ (set_local $7 (i32.add (get_local $1) - (set_local $5 + (tee_local $5 (i32.and (get_local $9) (i32.const -8) @@ -6128,7 +6130,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.sub @@ -6152,9 +6154,9 @@ (if (i32.ne (i32.and - (set_local $6 + (tee_local $6 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $7) (i32.const 4) @@ -6223,12 +6225,12 @@ ) (if (i32.ne - (set_local $9 + (tee_local $9 (i32.load offset=8 (get_local $0) ) ) - (set_local $4 + (tee_local $4 (i32.add (i32.const 1248) (i32.shl @@ -6312,7 +6314,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 8) @@ -6353,7 +6355,7 @@ (block $do-once$2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $0) ) @@ -6362,11 +6364,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 16) @@ -6387,7 +6389,7 @@ ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load (get_local $4) ) @@ -6403,9 +6405,9 @@ ) (loop $while-out$4 $while-in$5 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 20) @@ -6424,9 +6426,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 16) @@ -6474,7 +6476,7 @@ (block (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $0) ) @@ -6486,7 +6488,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $6) (i32.const 12) @@ -6500,7 +6502,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 8) @@ -6534,11 +6536,11 @@ (i32.eq (get_local $0) (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.const 1512) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $0) ) @@ -6597,7 +6599,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 16) @@ -6634,7 +6636,7 @@ (if (i32.lt_u (get_local $3) - (set_local $1 + (tee_local $1 (i32.load (i32.const 1224) ) @@ -6647,9 +6649,9 @@ (get_local $9) ) (if - (set_local $4 + (tee_local $4 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 16) @@ -6676,7 +6678,7 @@ ) ) (if - (set_local $4 + (tee_local $4 (i32.load offset=4 (get_local $6) ) @@ -6738,9 +6740,9 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 4) @@ -6795,7 +6797,7 @@ (block (i32.store (i32.const 1220) - (set_local $3 + (tee_local $3 (i32.add (i32.load (i32.const 1220) @@ -6845,7 +6847,7 @@ (block (i32.store (i32.const 1216) - (set_local $3 + (tee_local $3 (i32.add (i32.load (i32.const 1216) @@ -6904,12 +6906,12 @@ ) (if (i32.ne - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $7) ) ) - (set_local $4 + (tee_local $4 (i32.add (i32.const 1248) (i32.shl @@ -6991,7 +6993,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $10) (i32.const 8) @@ -7025,7 +7027,7 @@ (block $do-once$10 (if (i32.eq - (set_local $10 + (tee_local $10 (i32.load offset=12 (get_local $7) ) @@ -7034,11 +7036,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $7) (i32.const 16) @@ -7059,7 +7061,7 @@ ) (if (i32.eqz - (set_local $0 + (tee_local $0 (i32.load (get_local $4) ) @@ -7075,9 +7077,9 @@ ) (loop $while-out$12 $while-in$13 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -7096,9 +7098,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -7140,7 +7142,7 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $7) ) @@ -7154,7 +7156,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $1) (i32.const 12) @@ -7168,7 +7170,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $10) (i32.const 8) @@ -7202,11 +7204,11 @@ (i32.eq (get_local $7) (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.const 1512) (i32.shl - (set_local $10 + (tee_local $10 (i32.load offset=28 (get_local $7) ) @@ -7259,7 +7261,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $6) (i32.const 16) @@ -7287,7 +7289,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 1224) ) @@ -7300,9 +7302,9 @@ (get_local $6) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 16) @@ -7329,7 +7331,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $5) ) @@ -7419,12 +7421,12 @@ ) (if (i32.and - (set_local $5 + (tee_local $5 (i32.load (i32.const 1208) ) ) - (set_local $3 + (tee_local $3 (i32.shl (i32.const 1) (get_local $8) @@ -7433,9 +7435,9 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $1) (i32.const 8) @@ -7499,9 +7501,9 @@ (i32.add (i32.const 1512) (i32.shl - (set_local $1 + (tee_local $1 (if - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $0) (i32.const 8) @@ -7518,20 +7520,20 @@ (i32.shr_u (get_local $0) (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $15 + (tee_local $15 (i32.shl (get_local $1) - (set_local $13 + (tee_local $13 (i32.and (i32.shr_u (i32.add @@ -7554,11 +7556,11 @@ ) (get_local $13) ) - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $5 (i32.shl (get_local $15) (get_local $1) @@ -7614,12 +7616,12 @@ ) (if (i32.and - (set_local $15 + (tee_local $15 (i32.load (i32.const 1212) ) ) - (set_local $5 + (tee_local $5 (i32.shl (i32.const 1) (get_local $1) @@ -7673,9 +7675,9 @@ ) ) (if - (set_local $12 + (tee_local $12 (i32.load - (set_local $8 + (tee_local $8 (i32.add (i32.add (get_local $1) @@ -7758,9 +7760,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $16) (i32.const 8) @@ -7768,7 +7770,7 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.load (i32.const 1224) ) @@ -7834,7 +7836,7 @@ ) (i32.store (i32.const 1240) - (set_local $2 + (tee_local $2 (i32.add (i32.load (i32.const 1240) @@ -7852,7 +7854,7 @@ ) (loop $while-out$20 $while-in$21 (if - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -7913,15 +7915,15 @@ (get_local $11) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $11) (i32.const 32) ) ) - (set_local $8 + (tee_local $8 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $0) (i32.const 28) @@ -7932,10 +7934,10 @@ ) (i32.store offset=4 (get_local $3) - (set_local $10 + (tee_local $10 (i32.sub (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 20) @@ -7982,7 +7984,7 @@ (if (i32.eq (get_local $5) - (set_local $6 + (tee_local $6 (if (i32.load (i32.const 1160) @@ -8079,7 +8081,7 @@ (if (i32.gt_u (get_local $6) - (set_local $5 + (tee_local $5 (i32.load offset=4 (get_local $4) ) @@ -8088,7 +8090,7 @@ (block (i32.store (get_local $9) - (set_local $7 + (tee_local $7 (i32.load (get_local $8) ) @@ -8191,7 +8193,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $5 + (tee_local $5 (i32.load (get_local $8) ) @@ -8203,7 +8205,7 @@ ) (i32.store (get_local $9) - (set_local $8 + (tee_local $8 (get_local $5) ) ) @@ -8273,9 +8275,9 @@ (local $6 i32) (local $7 i32) (if - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $2) (i32.const 16) @@ -8318,9 +8320,9 @@ ) (block (set_local $6 - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -8392,7 +8394,7 @@ (i32.load8_s (i32.add (get_local $0) - (set_local $7 + (tee_local $7 (i32.add (get_local $3) (i32.const -1) @@ -8465,10 +8467,12 @@ ) ) ) - (call $jb - (get_local $6) - (get_local $2) - (get_local $0) + (drop + (call $jb + (get_local $6) + (get_local $2) + (get_local $0) + ) ) (i32.store (get_local $5) @@ -8499,7 +8503,7 @@ (block $label$break$a (if (i32.and - (set_local $3 + (tee_local $3 (get_local $0) ) (i32.const 3) @@ -8523,18 +8527,19 @@ ) ) (if - (i32.and - (set_local $4 - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -8572,7 +8577,7 @@ (i32.and (i32.xor (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $1) ) @@ -8614,7 +8619,7 @@ (loop $while-out$5 $while-in$6 (if (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 1) @@ -8629,7 +8634,6 @@ (br $while-in$6) ) ) - (get_local $1) ) (set_local $5 (get_local $1) @@ -8703,7 +8707,7 @@ (i32.const 1188) ) (if - (set_local $2 + (tee_local $2 (i32.load (i32.const 1184) ) @@ -8756,12 +8760,13 @@ ) ) (if - (set_local $1 - (i32.load offset=56 - (get_local $1) + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - (get_local $2) (block (set_local $0 (get_local $2) @@ -8772,7 +8777,6 @@ (br $while-in$3) ) ) - (get_local $0) ) (call_import $xa (i32.const 1188) @@ -8806,10 +8810,10 @@ ) ) (i32.store8 - (set_local $6 + (tee_local $6 (get_local $5) ) - (set_local $9 + (tee_local $9 (i32.and (get_local $1) (i32.const 255) @@ -8817,9 +8821,9 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 16) @@ -8863,9 +8867,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8877,7 +8881,7 @@ ) (if (i32.ne - (set_local $4 + (tee_local $4 (i32.and (get_local $1) (i32.const 255) @@ -8947,7 +8951,7 @@ (if (i32.gt_u (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8955,7 +8959,7 @@ ) ) (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 28) @@ -8964,19 +8968,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 3) ) - (i32.const 3) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (if (i32.load @@ -9002,9 +9008,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 4) @@ -9012,9 +9018,9 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 8) @@ -9235,7 +9241,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -9264,7 +9270,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -9354,7 +9360,7 @@ (if (i32.gt_s (i32.load offset=76 - (set_local $1 + (tee_local $1 (i32.load (i32.const 1024) ) @@ -9389,9 +9395,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 20) @@ -9451,7 +9457,7 @@ (local $2 i32) (set_local $2 (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 74) @@ -9471,7 +9477,7 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -9499,7 +9505,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -9533,7 +9539,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.gt_s (i32.load offset=76 @@ -9602,7 +9608,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -9619,7 +9625,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -9819,7 +9825,7 @@ ) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -10039,8 +10045,10 @@ (i32.const 0) ) (func $Na (result i32) - (call $db - (i32.const 1144) + (drop + (call $db + (i32.const 1144) + ) ) (i32.const 0) ) @@ -10080,7 +10088,7 @@ (func $ib (result i32) (i32.const 0) ) - (func $__growWasmMemory (param $newSize i32) + (func $__growWasmMemory (param $newSize i32) (result i32) (grow_memory (get_local $newSize) ) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 5482b08f6..b876bc869 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -122,16 +122,16 @@ (block (if (i32.and - (set_local $12 + (tee_local $12 (i32.shr_u - (set_local $16 + (tee_local $16 (i32.load (i32.const 1208) ) ) - (set_local $2 + (tee_local $2 (i32.shr_u - (set_local $14 + (tee_local $14 (select (i32.const 16) (i32.and @@ -157,18 +157,18 @@ (block (set_local $11 (i32.load - (set_local $27 + (tee_local $27 (i32.add - (set_local $29 + (tee_local $29 (i32.load - (set_local $25 + (tee_local $25 (i32.add - (set_local $5 + (tee_local $5 (i32.add (i32.const 1248) (i32.shl (i32.shl - (set_local $0 + (tee_local $0 (i32.add (i32.xor (i32.and @@ -227,7 +227,7 @@ (if (i32.eq (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $11) (i32.const 12) @@ -253,7 +253,7 @@ (i32.store offset=4 (get_local $29) (i32.or - (set_local $11 + (tee_local $11 (i32.shl (get_local $0) (i32.const 3) @@ -263,7 +263,7 @@ ) ) (i32.store - (set_local $25 + (tee_local $25 (i32.add (i32.add (get_local $29) @@ -291,7 +291,7 @@ (if (i32.gt_u (get_local $14) - (set_local $25 + (tee_local $25 (i32.load (i32.const 1216) ) @@ -304,17 +304,17 @@ (set_local $5 (i32.and (i32.shr_u - (set_local $11 + (tee_local $11 (i32.add (i32.and - (set_local $5 + (tee_local $5 (i32.and (i32.shl (get_local $12) (get_local $2) ) (i32.or - (set_local $11 + (tee_local $11 (i32.shl (i32.const 2) (get_local $2) @@ -342,27 +342,27 @@ ) (set_local $5 (i32.load - (set_local $19 + (tee_local $19 (i32.add - (set_local $8 + (tee_local $8 (i32.load - (set_local $0 + (tee_local $0 (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.const 1248) (i32.shl (i32.shl - (set_local $7 + (tee_local $7 (i32.add (i32.or (i32.or (i32.or (i32.or - (set_local $11 + (tee_local $11 (i32.and (i32.shr_u - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $11) (get_local $5) @@ -375,10 +375,10 @@ ) (get_local $5) ) - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u - (set_local $8 + (tee_local $8 (i32.shr_u (get_local $19) (get_local $11) @@ -390,10 +390,10 @@ ) ) ) - (set_local $8 + (tee_local $8 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $8) (get_local $19) @@ -405,10 +405,10 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.shr_u (get_local $3) (get_local $8) @@ -478,7 +478,7 @@ (if (i32.eq (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $5) (i32.const 12) @@ -514,14 +514,14 @@ ) ) (i32.store offset=4 - (set_local $0 + (tee_local $0 (i32.add (get_local $8) (get_local $14) ) ) (i32.or - (set_local $5 + (tee_local $5 (i32.sub (i32.shl (get_local $7) @@ -553,7 +553,7 @@ (i32.const 1248) (i32.shl (i32.shl - (set_local $25 + (tee_local $25 (i32.shr_u (get_local $39) (i32.const 3) @@ -567,12 +567,12 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (i32.const 1208) ) ) - (set_local $12 + (tee_local $12 (i32.shl (i32.const 1) (get_local $25) @@ -581,9 +581,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $12 + (tee_local $12 (i32.add (get_local $16) (i32.const 8) @@ -660,7 +660,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load (i32.const 1212) ) @@ -669,7 +669,7 @@ (set_local $0 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.add (i32.and (get_local $0) @@ -690,7 +690,7 @@ (i32.sub (i32.and (i32.load offset=4 - (set_local $25 + (tee_local $25 (i32.load (i32.add (i32.shl @@ -699,10 +699,10 @@ (i32.or (i32.or (i32.or - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $16 + (tee_local $16 (i32.shr_u (get_local $5) (get_local $0) @@ -715,10 +715,10 @@ ) (get_local $0) ) - (set_local $16 + (tee_local $16 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $16) (get_local $5) @@ -730,10 +730,10 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $3) (get_local $16) @@ -745,10 +745,10 @@ ) ) ) - (set_local $2 + (tee_local $2 (i32.and (i32.shr_u - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $2) (get_local $3) @@ -783,9 +783,9 @@ (set_local $3 (get_local $25) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (if - (set_local $25 + (tee_local $25 (i32.load offset=16 (get_local $12) ) @@ -794,7 +794,7 @@ (get_local $25) ) (if - (set_local $16 + (tee_local $16 (i32.load offset=20 (get_local $12) ) @@ -809,13 +809,13 @@ (set_local $26 (get_local $3) ) - (br $while-out$6) + (br $while-out$23) ) ) ) (set_local $16 (i32.lt_u - (set_local $25 + (tee_local $25 (i32.sub (i32.and (i32.load offset=4 @@ -846,12 +846,12 @@ (get_local $16) ) ) - (br $while-in$7) + (br $while-in$24) ) (if (i32.lt_u (get_local $26) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -862,7 +862,7 @@ (if (i32.ge_u (get_local $26) - (set_local $12 + (tee_local $12 (i32.add (get_local $26) (get_local $14) @@ -876,10 +876,10 @@ (get_local $26) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq - (set_local $19 + (tee_local $19 (i32.load offset=12 (get_local $26) ) @@ -888,9 +888,9 @@ ) (block (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $26) (i32.const 20) @@ -907,9 +907,9 @@ ) ) (if - (set_local $25 + (tee_local $25 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $26) (i32.const 16) @@ -929,15 +929,15 @@ (set_local $27 (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $11) (i32.const 20) @@ -952,13 +952,13 @@ (set_local $0 (get_local $8) ) - (br $while-in$11) + (br $while-in$28) ) ) (if - (set_local $7 + (tee_local $7 (i32.load - (set_local $8 + (tee_local $8 (i32.add (get_local $11) (i32.const 16) @@ -974,9 +974,9 @@ (get_local $8) ) ) - (br $while-out$10) + (br $while-out$27) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -998,7 +998,7 @@ (block (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load offset=8 (get_local $26) ) @@ -1010,7 +1010,7 @@ (if (i32.ne (i32.load - (set_local $7 + (tee_local $7 (i32.add (get_local $8) (i32.const 12) @@ -1024,7 +1024,7 @@ (if (i32.eq (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $19) (i32.const 8) @@ -1051,7 +1051,7 @@ ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $2) (block @@ -1059,11 +1059,11 @@ (i32.eq (get_local $26) (i32.load - (set_local $3 + (tee_local $3 (i32.add (i32.const 1512) (i32.shl - (set_local $19 + (tee_local $19 (i32.load offset=28 (get_local $26) ) @@ -1099,7 +1099,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1116,7 +1116,7 @@ (if (i32.eq (i32.load - (set_local $19 + (tee_local $19 (i32.add (get_local $2) (i32.const 16) @@ -1134,7 +1134,7 @@ (get_local $27) ) ) - (br_if $do-once$12 + (br_if $do-once$29 (i32.eqz (get_local $27) ) @@ -1144,7 +1144,7 @@ (if (i32.lt_u (get_local $27) - (set_local $19 + (tee_local $19 (i32.load (i32.const 1224) ) @@ -1157,7 +1157,7 @@ (get_local $2) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=16 (get_local $26) ) @@ -1181,7 +1181,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=20 (get_local $26) ) @@ -1218,7 +1218,7 @@ (i32.store offset=4 (get_local $26) (i32.or - (set_local $2 + (tee_local $2 (i32.add (get_local $32) (get_local $14) @@ -1228,7 +1228,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (i32.add (get_local $26) @@ -1268,7 +1268,7 @@ (get_local $32) ) (if - (set_local $3 + (tee_local $3 (i32.load (i32.const 1216) ) @@ -1284,7 +1284,7 @@ (i32.const 1248) (i32.shl (i32.shl - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $3) (i32.const 3) @@ -1298,12 +1298,12 @@ ) (if (i32.and - (set_local $8 + (tee_local $8 (i32.load (i32.const 1208) ) ) - (set_local $16 + (tee_local $16 (i32.shl (i32.const 1) (get_local $19) @@ -1312,9 +1312,9 @@ ) (if (i32.lt_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $3) (i32.const 8) @@ -1415,7 +1415,7 @@ (block (set_local $2 (i32.and - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 11) @@ -1425,7 +1425,7 @@ ) ) (if - (set_local $8 + (tee_local $8 (i32.load (i32.const 1212) ) @@ -1439,13 +1439,13 @@ ) (block $label$break$a (if - (set_local $0 + (tee_local $0 (i32.load (i32.add (i32.shl - (set_local $34 + (tee_local $34 (if - (set_local $19 + (tee_local $19 (i32.shr_u (get_local $3) (i32.const 8) @@ -1462,20 +1462,20 @@ (i32.shr_u (get_local $2) (i32.add - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $19 + (tee_local $19 (i32.and (i32.shr_u (i32.add - (set_local $7 + (tee_local $7 (i32.shl (get_local $19) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -1498,11 +1498,11 @@ ) (get_local $3) ) - (set_local $7 + (tee_local $7 (i32.and (i32.shr_u (i32.add - (set_local $25 + (tee_local $25 (i32.shl (get_local $7) (get_local $19) @@ -1578,12 +1578,12 @@ (set_local $5 (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (if (i32.lt_u - (set_local $29 + (tee_local $29 (i32.sub - (set_local $27 + (tee_local $27 (i32.and (i32.load offset=4 (get_local $19) @@ -1637,7 +1637,7 @@ (set_local $27 (select (get_local $25) - (set_local $29 + (tee_local $29 (i32.load offset=20 (get_local $19) ) @@ -1649,7 +1649,7 @@ ) (i32.eq (get_local $29) - (set_local $19 + (tee_local $19 (i32.load (i32.add (i32.add @@ -1671,7 +1671,7 @@ ) ) (if - (set_local $29 + (tee_local $29 (i32.eq (get_local $19) (i32.const 0) @@ -1690,7 +1690,7 @@ (set_local $7 (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $7 @@ -1716,7 +1716,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) (block @@ -1741,7 +1741,7 @@ (i32.const 86) ) (if - (set_local $0 + (tee_local $0 (if (i32.and (i32.eq @@ -1756,11 +1756,11 @@ (block (if (i32.eqz - (set_local $16 + (tee_local $16 (i32.and (get_local $8) (i32.or - (set_local $0 + (tee_local $0 (i32.shl (i32.const 2) (get_local $34) @@ -1784,7 +1784,7 @@ (set_local $16 (i32.and (i32.shr_u - (set_local $0 + (tee_local $0 (i32.add (i32.and (get_local $16) @@ -1809,10 +1809,10 @@ (i32.or (i32.or (i32.or - (set_local $0 + (tee_local $0 (i32.and (i32.shr_u - (set_local $14 + (tee_local $14 (i32.shr_u (get_local $0) (get_local $16) @@ -1825,10 +1825,10 @@ ) (get_local $16) ) - (set_local $14 + (tee_local $14 (i32.and (i32.shr_u - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $14) (get_local $0) @@ -1840,10 +1840,10 @@ ) ) ) - (set_local $12 + (tee_local $12 (i32.and (i32.shr_u - (set_local $5 + (tee_local $5 (i32.shr_u (get_local $12) (get_local $14) @@ -1855,10 +1855,10 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.and (i32.shr_u - (set_local $3 + (tee_local $3 (i32.shr_u (get_local $5) (get_local $12) @@ -1913,13 +1913,13 @@ (get_local $7) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $7 (i32.const 0) ) (set_local $3 (i32.lt_u - (set_local $5 + (tee_local $5 (i32.sub (i32.and (i32.load offset=4 @@ -1948,7 +1948,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load offset=16 (get_local $18) ) @@ -1963,11 +1963,11 @@ (set_local $17 (get_local $5) ) - (br $while-in$20) + (br $while-in$6) ) ) (if - (set_local $18 + (tee_local $18 (i32.load offset=20 (get_local $18) ) @@ -1987,10 +1987,10 @@ (set_local $9 (get_local $5) ) - (br $while-out$19) + (br $while-out$5) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2009,7 +2009,7 @@ (if (i32.lt_u (get_local $9) - (set_local $8 + (tee_local $8 (i32.load (i32.const 1224) ) @@ -2020,7 +2020,7 @@ (if (i32.ge_u (get_local $9) - (set_local $5 + (tee_local $5 (i32.add (get_local $9) (get_local $2) @@ -2034,10 +2034,10 @@ (get_local $9) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq - (set_local $3 + (tee_local $3 (i32.load offset=12 (get_local $9) ) @@ -2046,9 +2046,9 @@ ) (block (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $9) (i32.const 20) @@ -2065,9 +2065,9 @@ ) ) (if - (set_local $25 + (tee_local $25 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $9) (i32.const 16) @@ -2082,15 +2082,15 @@ (set_local $20 (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $11) (i32.const 20) @@ -2105,13 +2105,13 @@ (set_local $0 (get_local $14) ) - (br $while-in$24) + (br $while-in$10) ) ) (if - (set_local $16 + (tee_local $16 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $11) (i32.const 16) @@ -2127,9 +2127,9 @@ (get_local $14) ) ) - (br $while-out$23) + (br $while-out$9) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2151,7 +2151,7 @@ (block (if (i32.lt_u - (set_local $14 + (tee_local $14 (i32.load offset=8 (get_local $9) ) @@ -2163,7 +2163,7 @@ (if (i32.ne (i32.load - (set_local $16 + (tee_local $16 (i32.add (get_local $14) (i32.const 12) @@ -2177,7 +2177,7 @@ (if (i32.eq (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $3) (i32.const 8) @@ -2204,7 +2204,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $12) (block @@ -2212,11 +2212,11 @@ (i32.eq (get_local $9) (i32.load - (set_local $8 + (tee_local $8 (i32.add (i32.const 1512) (i32.shl - (set_local $3 + (tee_local $3 (i32.load offset=28 (get_local $9) ) @@ -2252,7 +2252,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2269,7 +2269,7 @@ (if (i32.eq (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $12) (i32.const 16) @@ -2287,7 +2287,7 @@ (get_local $20) ) ) - (br_if $do-once$25 + (br_if $do-once$11 (i32.eqz (get_local $20) ) @@ -2297,7 +2297,7 @@ (if (i32.lt_u (get_local $20) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -2310,7 +2310,7 @@ (get_local $12) ) (if - (set_local $8 + (tee_local $8 (i32.load offset=16 (get_local $9) ) @@ -2334,7 +2334,7 @@ ) ) (if - (set_local $8 + (tee_local $8 (i32.load offset=20 (get_local $9) ) @@ -2362,7 +2362,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $22) @@ -2372,7 +2372,7 @@ (i32.store offset=4 (get_local $9) (i32.or - (set_local $12 + (tee_local $12 (i32.add (get_local $22) (get_local $2) @@ -2382,7 +2382,7 @@ ) ) (i32.store - (set_local $8 + (tee_local $8 (i32.add (i32.add (get_local $9) @@ -2447,12 +2447,12 @@ ) (if (i32.and - (set_local $3 + (tee_local $3 (i32.load (i32.const 1208) ) ) - (set_local $14 + (tee_local $14 (i32.shl (i32.const 1) (get_local $8) @@ -2461,9 +2461,9 @@ ) (if (i32.lt_u - (set_local $3 + (tee_local $3 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $12) (i32.const 8) @@ -2520,16 +2520,16 @@ (get_local $5) (get_local $12) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $0 (i32.add (i32.const 1512) (i32.shl - (set_local $20 + (tee_local $20 (if - (set_local $12 + (tee_local $12 (i32.shr_u (get_local $22) (i32.const 8) @@ -2546,20 +2546,20 @@ (i32.shr_u (get_local $22) (i32.add - (set_local $0 + (tee_local $0 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $12 + (tee_local $12 (i32.and (i32.shr_u (i32.add - (set_local $14 + (tee_local $14 (i32.shl (get_local $12) - (set_local $3 + (tee_local $3 (i32.and (i32.shr_u (i32.add @@ -2582,11 +2582,11 @@ ) (get_local $3) ) - (set_local $14 + (tee_local $14 (i32.and (i32.shr_u (i32.add - (set_local $8 + (tee_local $8 (i32.shl (get_local $14) (get_local $12) @@ -2633,7 +2633,7 @@ (get_local $20) ) (i32.store offset=4 - (set_local $14 + (tee_local $14 (i32.add (get_local $5) (i32.const 16) @@ -2648,12 +2648,12 @@ (if (i32.eqz (i32.and - (set_local $14 + (tee_local $14 (i32.load (i32.const 1212) ) ) - (set_local $8 + (tee_local $8 (i32.shl (i32.const 1) (get_local $20) @@ -2685,7 +2685,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $8 @@ -2712,7 +2712,7 @@ (get_local $0) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -2730,13 +2730,13 @@ (set_local $7 (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $0 + (tee_local $0 (i32.add (i32.add (get_local $14) @@ -2774,10 +2774,10 @@ (set_local $7 (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -2819,9 +2819,9 @@ (if (i32.and (i32.ge_u - (set_local $8 + (tee_local $8 (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $21) (i32.const 8) @@ -2829,7 +2829,7 @@ ) ) ) - (set_local $3 + (tee_local $3 (i32.load (i32.const 1224) ) @@ -2899,7 +2899,7 @@ ) (if (i32.ge_u - (set_local $9 + (tee_local $9 (i32.load (i32.const 1216) ) @@ -2914,7 +2914,7 @@ ) (if (i32.gt_u - (set_local $21 + (tee_local $21 (i32.sub (get_local $9) (get_local $18) @@ -2925,7 +2925,7 @@ (block (i32.store (i32.const 1228) - (set_local $6 + (tee_local $6 (i32.add (get_local $24) (get_local $18) @@ -2975,7 +2975,7 @@ ) ) (i32.store - (set_local $21 + (tee_local $21 (i32.add (i32.add (get_local $24) @@ -3007,7 +3007,7 @@ ) (if (i32.gt_u - (set_local $24 + (tee_local $24 (i32.load (i32.const 1220) ) @@ -3017,7 +3017,7 @@ (block (i32.store (i32.const 1220) - (set_local $21 + (tee_local $21 (i32.sub (get_local $24) (get_local $18) @@ -3026,9 +3026,9 @@ ) (i32.store (i32.const 1232) - (set_local $9 + (tee_local $9 (i32.add - (set_local $24 + (tee_local $24 (i32.load (i32.const 1232) ) @@ -3096,7 +3096,7 @@ ) (i32.store (get_local $15) - (set_local $24 + (tee_local $24 (i32.xor (i32.and (get_local $15) @@ -3120,16 +3120,16 @@ ) (if (i32.le_u - (set_local $15 + (tee_local $15 (i32.and - (set_local $9 + (tee_local $9 (i32.add - (set_local $15 + (tee_local $15 (i32.load (i32.const 1688) ) ) - (set_local $21 + (tee_local $21 (i32.add (get_local $18) (i32.const 47) @@ -3137,7 +3137,7 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.sub (i32.const 0) (get_local $15) @@ -3158,7 +3158,7 @@ ) ) (if - (set_local $22 + (tee_local $22 (i32.load (i32.const 1648) ) @@ -3166,9 +3166,9 @@ (if (i32.or (i32.le_u - (set_local $13 + (tee_local $13 (i32.add - (set_local $20 + (tee_local $20 (i32.load (i32.const 1640) ) @@ -3196,7 +3196,7 @@ ) (if (i32.eq - (set_local $7 + (tee_local $7 (block $label$break$b (if (i32.and @@ -3209,7 +3209,7 @@ (block (block $label$break$c (if - (set_local $22 + (tee_local $22 (i32.load (i32.const 1232) ) @@ -3221,7 +3221,7 @@ (loop $while-out$35 $while-in$36 (if (i32.le_u - (set_local $20 + (tee_local $20 (i32.load (get_local $13) ) @@ -3233,7 +3233,7 @@ (i32.add (get_local $20) (i32.load - (set_local $23 + (tee_local $23 (i32.add (get_local $13) (i32.const 4) @@ -3256,7 +3256,7 @@ ) (if (i32.eqz - (set_local $13 + (tee_local $13 (i32.load offset=8 (get_local $13) ) @@ -3273,7 +3273,7 @@ ) (if (i32.lt_u - (set_local $13 + (tee_local $13 (i32.and (i32.sub (get_local $9) @@ -3288,7 +3288,7 @@ ) (if (i32.eq - (set_local $23 + (tee_local $23 (call_import $ta (get_local $13) ) @@ -3346,7 +3346,7 @@ ) (if (i32.ne - (set_local $22 + (tee_local $22 (call_import $ta (i32.const 0) ) @@ -3357,9 +3357,9 @@ (set_local $6 (if (i32.and - (set_local $23 + (tee_local $23 (i32.add - (set_local $13 + (tee_local $13 (i32.load (i32.const 1684) ) @@ -3367,7 +3367,7 @@ (i32.const -1) ) ) - (set_local $2 + (tee_local $2 (get_local $22) ) ) @@ -3392,7 +3392,7 @@ ) (set_local $2 (i32.add - (set_local $13 + (tee_local $13 (i32.load (i32.const 1640) ) @@ -3413,7 +3413,7 @@ ) (block (if - (set_local $23 + (tee_local $23 (i32.load (i32.const 1648) ) @@ -3433,7 +3433,7 @@ ) (if (i32.eq - (set_local $23 + (tee_local $23 (call_import $ta (get_local $6) ) @@ -3501,14 +3501,14 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.and (i32.add (i32.sub (get_local $21) (get_local $1) ) - (set_local $22 + (tee_local $22 (i32.load (i32.const 1688) ) @@ -3530,8 +3530,10 @@ (i32.const -1) ) (block - (call_import $ta - (get_local $23) + (drop + (call_import $ta + (get_local $23) + ) ) (br $label$break$d) ) @@ -3594,12 +3596,12 @@ (if (i32.and (i32.lt_u - (set_local $4 + (tee_local $4 (call_import $ta (get_local $15) ) ) - (set_local $15 + (tee_local $15 (call_import $ta (i32.const 0) ) @@ -3618,7 +3620,7 @@ ) (if (i32.gt_u - (set_local $10 + (tee_local $10 (i32.sub (get_local $15) (get_local $4) @@ -3652,7 +3654,7 @@ (block (i32.store (i32.const 1640) - (set_local $10 + (tee_local $10 (i32.add (i32.load (i32.const 1640) @@ -3675,7 +3677,7 @@ ) (block $do-once$42 (if - (set_local $10 + (tee_local $10 (i32.load (i32.const 1232) ) @@ -3684,19 +3686,19 @@ (set_local $1 (i32.const 1656) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$44 $do-in$45 (if (i32.eq (get_local $28) (i32.add - (set_local $4 + (tee_local $4 (i32.load (get_local $1) ) ) - (set_local $21 + (tee_local $21 (i32.load - (set_local $15 + (tee_local $15 (i32.add (get_local $1) (i32.const 4) @@ -3722,12 +3724,12 @@ (set_local $7 (i32.const 201) ) - (br $do-out$46) + (br $do-out$44) ) ) - (br_if $do-in$47 + (br_if $do-in$45 (i32.ne - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -3772,13 +3774,13 @@ (set_local $1 (i32.add (get_local $10) - (set_local $21 + (tee_local $21 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $10) (i32.const 8) @@ -3846,7 +3848,7 @@ (if (i32.lt_u (get_local $28) - (set_local $15 + (tee_local $15 (i32.load (i32.const 1224) ) @@ -3871,7 +3873,7 @@ (set_local $1 (i32.const 1656) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (i32.load @@ -3889,12 +3891,12 @@ (set_local $7 (i32.const 209) ) - (br $while-out$48) + (br $while-out$46) ) ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $1) ) @@ -3904,10 +3906,10 @@ (set_local $37 (i32.const 1656) ) - (br $while-out$48) + (br $while-out$46) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -3930,7 +3932,7 @@ (get_local $28) ) (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $45) (i32.const 4) @@ -3951,7 +3953,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $28) (i32.const 8) @@ -3978,7 +3980,7 @@ (i32.and (i32.sub (i32.const 0) - (set_local $1 + (tee_local $1 (i32.add (get_local $15) (i32.const 8) @@ -4019,7 +4021,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$48 (if (i32.eq (get_local $4) @@ -4028,7 +4030,7 @@ (block (i32.store (i32.const 1220) - (set_local $6 + (tee_local $6 (i32.add (i32.load (i32.const 1220) @@ -4060,7 +4062,7 @@ (block (i32.store (i32.const 1216) - (set_local $6 + (tee_local $6 (i32.add (i32.load (i32.const 1216) @@ -4087,16 +4089,16 @@ ) (get_local $6) ) - (br $do-once$50) + (br $do-once$48) ) ) (i32.store - (set_local $0 + (tee_local $0 (i32.add (if (i32.eq (i32.and - (set_local $6 + (tee_local $6 (i32.load offset=4 (get_local $4) ) @@ -4130,15 +4132,15 @@ (get_local $4) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.ne - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $4) ) ) - (set_local $23 + (tee_local $23 (i32.add (i32.const 1248) (i32.shl @@ -4159,7 +4161,7 @@ ) (call_import $qa) ) - (br_if $do-once$53 + (br_if $do-once$59 (i32.eq (i32.load offset=12 (get_local $6) @@ -4195,7 +4197,7 @@ (br $label$break$e) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $9) @@ -4218,7 +4220,7 @@ (if (i32.eq (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $9) (i32.const 8) @@ -4231,7 +4233,7 @@ (set_local $46 (get_local $2) ) - (br $do-once$55) + (br $do-once$61) ) ) (call_import $qa) @@ -4253,10 +4255,10 @@ (get_local $4) ) ) - (block $do-once$57 + (block $do-once$51 (if (i32.eq - (set_local $2 + (tee_local $2 (i32.load offset=12 (get_local $4) ) @@ -4265,11 +4267,11 @@ ) (block (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add - (set_local $22 + (tee_local $22 (i32.add (get_local $4) (i32.const 16) @@ -4289,7 +4291,7 @@ ) ) (if - (set_local $20 + (tee_local $20 (i32.load (get_local $22) ) @@ -4306,15 +4308,15 @@ (set_local $30 (i32.const 0) ) - (br $do-once$57) + (br $do-once$51) ) ) ) - (loop $while-out$59 $while-in$60 + (loop $while-out$53 $while-in$54 (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $11) (i32.const 20) @@ -4329,13 +4331,13 @@ (set_local $0 (get_local $13) ) - (br $while-in$60) + (br $while-in$54) ) ) (if - (set_local $20 + (tee_local $20 (i32.load - (set_local $13 + (tee_local $13 (i32.add (get_local $11) (i32.const 16) @@ -4351,9 +4353,9 @@ (get_local $13) ) ) - (br $while-out$59) + (br $while-out$53) ) - (br $while-in$60) + (br $while-in$54) ) (if (i32.lt_u @@ -4375,7 +4377,7 @@ (block (if (i32.lt_u - (set_local $13 + (tee_local $13 (i32.load offset=8 (get_local $4) ) @@ -4387,7 +4389,7 @@ (if (i32.ne (i32.load - (set_local $20 + (tee_local $20 (i32.add (get_local $13) (i32.const 12) @@ -4401,7 +4403,7 @@ (if (i32.eq (i32.load - (set_local $22 + (tee_local $22 (i32.add (get_local $2) (i32.const 8) @@ -4433,16 +4435,16 @@ (get_local $23) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $4) (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.const 1512) (i32.shl - (set_local $2 + (tee_local $2 (i32.load offset=28 (get_local $4) ) @@ -4458,7 +4460,7 @@ (get_local $6) (get_local $30) ) - (br_if $do-once$61 + (br_if $do-once$55 (get_local $30) ) (i32.store @@ -4491,7 +4493,7 @@ (if (i32.eq (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $23) (i32.const 16) @@ -4520,7 +4522,7 @@ (if (i32.lt_u (get_local $30) - (set_local $2 + (tee_local $2 (i32.load (i32.const 1224) ) @@ -4533,9 +4535,9 @@ (get_local $23) ) (if - (set_local $9 + (tee_local $9 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $4) (i32.const 16) @@ -4563,7 +4565,7 @@ ) (br_if $label$break$e (i32.eqz - (set_local $9 + (tee_local $9 (i32.load offset=4 (get_local $6) ) @@ -4658,15 +4660,15 @@ ) ) ) - (block $do-once$65 + (block $do-once$63 (if (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.const 1208) ) ) - (set_local $2 + (tee_local $2 (i32.shl (i32.const 1) (get_local $0) @@ -4676,9 +4678,9 @@ (block (if (i32.ge_u - (set_local $23 + (tee_local $23 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $6) (i32.const 8) @@ -4697,7 +4699,7 @@ (set_local $41 (get_local $23) ) - (br $do-once$65) + (br $do-once$63) ) ) (call_import $qa) @@ -4738,24 +4740,24 @@ (get_local $1) (get_local $6) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $2 (i32.add (i32.const 1512) (i32.shl - (set_local $0 - (block $do-once$67 + (tee_local $0 + (block $do-once$65 (if - (set_local $2 + (tee_local $2 (i32.shr_u (get_local $11) (i32.const 8) ) ) (block - (br_if $do-once$67 + (br_if $do-once$65 (i32.const 31) (i32.gt_u (get_local $11) @@ -4767,20 +4769,20 @@ (i32.shr_u (get_local $11) (i32.add - (set_local $13 + (tee_local $13 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $23 + (tee_local $23 (i32.and (i32.shr_u (i32.add - (set_local $17 + (tee_local $17 (i32.shl (get_local $2) - (set_local $9 + (tee_local $9 (i32.and (i32.shr_u (i32.add @@ -4803,11 +4805,11 @@ ) (get_local $9) ) - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $0 + (tee_local $0 (i32.shl (get_local $17) (get_local $23) @@ -4855,7 +4857,7 @@ (get_local $0) ) (i32.store offset=4 - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 16) @@ -4870,12 +4872,12 @@ (if (i32.eqz (i32.and - (set_local $6 + (tee_local $6 (i32.load (i32.const 1212) ) ) - (set_local $13 + (tee_local $13 (i32.shl (i32.const 1) (get_local $0) @@ -4907,7 +4909,7 @@ (get_local $1) (get_local $1) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $13 @@ -4934,7 +4936,7 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$67 $while-in$68 (if (i32.eq (i32.and @@ -4952,13 +4954,13 @@ (set_local $7 (i32.const 279) ) - (br $while-out$69) + (br $while-out$67) ) ) (if - (set_local $17 + (tee_local $17 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $6) @@ -4996,10 +4998,10 @@ (set_local $7 (i32.const 276) ) - (br $while-out$69) + (br $while-out$67) ) ) - (br $while-in$70) + (br $while-in$68) ) (if (i32.eq @@ -5041,9 +5043,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $42) (i32.const 8) @@ -5051,7 +5053,7 @@ ) ) ) - (set_local $17 + (tee_local $17 (i32.load (i32.const 1224) ) @@ -5104,10 +5106,10 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (if (i32.le_u - (set_local $1 + (tee_local $1 (i32.load (get_local $37) ) @@ -5116,7 +5118,7 @@ ) (if (i32.gt_u - (set_local $24 + (tee_local $24 (i32.add (get_local $1) (i32.load offset=4 @@ -5130,7 +5132,7 @@ (set_local $0 (get_local $24) ) - (br $while-out$71) + (br $while-out$69) ) ) ) @@ -5139,11 +5141,11 @@ (get_local $37) ) ) - (br $while-in$72) + (br $while-in$70) ) (set_local $24 (i32.add - (set_local $21 + (tee_local $21 (i32.add (get_local $0) (i32.const -47) @@ -5154,10 +5156,10 @@ ) (set_local $1 (i32.add - (set_local $21 + (tee_local $21 (select (get_local $10) - (set_local $1 + (tee_local $1 (i32.add (get_local $21) (select @@ -5181,7 +5183,7 @@ ) (i32.lt_u (get_local $1) - (set_local $24 + (tee_local $24 (i32.add (get_local $10) (i32.const 16) @@ -5195,16 +5197,16 @@ ) (i32.store (i32.const 1232) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) - (set_local $15 + (tee_local $15 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) (i32.const 8) @@ -5227,7 +5229,7 @@ ) (i32.store (i32.const 1220) - (set_local $13 + (tee_local $13 (i32.sub (i32.add (get_local $33) @@ -5258,7 +5260,7 @@ ) ) (i32.store - (set_local $13 + (tee_local $13 (i32.add (get_local $21) (i32.const 4) @@ -5312,9 +5314,9 @@ (i32.const 24) ) ) - (loop $do-in$74 + (loop $do-in$72 (i32.store - (set_local $1 + (tee_local $1 (i32.add (get_local $1) (i32.const 4) @@ -5322,7 +5324,7 @@ ) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$72 (i32.lt_u (i32.add (get_local $1) @@ -5350,7 +5352,7 @@ (i32.store offset=4 (get_local $10) (i32.or - (set_local $1 + (tee_local $1 (i32.sub (get_local $21) (get_local $10) @@ -5389,12 +5391,12 @@ ) (if (i32.and - (set_local $6 + (tee_local $6 (i32.load (i32.const 1208) ) ) - (set_local $17 + (tee_local $17 (i32.shl (i32.const 1) (get_local $4) @@ -5403,9 +5405,9 @@ ) (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $15) (i32.const 8) @@ -5469,9 +5471,9 @@ (i32.add (i32.const 1512) (i32.shl - (set_local $0 + (tee_local $0 (if - (set_local $15 + (tee_local $15 (i32.shr_u (get_local $1) (i32.const 8) @@ -5488,20 +5490,20 @@ (i32.shr_u (get_local $1) (i32.add - (set_local $2 + (tee_local $2 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $17 + (tee_local $17 (i32.shl (get_local $15) - (set_local $6 + (tee_local $6 (i32.and (i32.shr_u (i32.add @@ -5524,11 +5526,11 @@ ) (get_local $6) ) - (set_local $17 + (tee_local $17 (i32.and (i32.shr_u (i32.add - (set_local $4 + (tee_local $4 (i32.shl (get_local $17) (get_local $15) @@ -5585,12 +5587,12 @@ (if (i32.eqz (i32.and - (set_local $17 + (tee_local $17 (i32.load (i32.const 1212) ) ) - (set_local $4 + (tee_local $4 (i32.shl (i32.const 1) (get_local $0) @@ -5649,7 +5651,7 @@ (get_local $2) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (if (i32.eq (i32.and @@ -5667,13 +5669,13 @@ (set_local $7 (i32.const 305) ) - (br $while-out$75) + (br $while-out$73) ) ) (if - (set_local $6 + (tee_local $6 (i32.load - (set_local $2 + (tee_local $2 (i32.add (i32.add (get_local $17) @@ -5711,10 +5713,10 @@ (set_local $7 (i32.const 302) ) - (br $while-out$75) + (br $while-out$73) ) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.eq @@ -5756,9 +5758,9 @@ (if (i32.and (i32.ge_u - (set_local $4 + (tee_local $4 (i32.load - (set_local $17 + (tee_local $17 (i32.add (get_local $32) (i32.const 8) @@ -5766,7 +5768,7 @@ ) ) ) - (set_local $1 + (tee_local $1 (i32.load (i32.const 1224) ) @@ -5810,7 +5812,7 @@ (if (i32.or (i32.eq - (set_local $4 + (tee_local $4 (i32.load (i32.const 1224) ) @@ -5852,9 +5854,9 @@ (set_local $4 (i32.const 0) ) - (loop $do-in$45 + (loop $do-in$76 (i32.store offset=12 - (set_local $15 + (tee_local $15 (i32.add (i32.const 1248) (i32.shl @@ -5872,9 +5874,9 @@ (get_local $15) (get_local $15) ) - (br_if $do-in$45 + (br_if $do-in$76 (i32.ne - (set_local $4 + (tee_local $4 (i32.add (get_local $4) (i32.const 1) @@ -5886,16 +5888,16 @@ ) (i32.store (i32.const 1232) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) - (set_local $15 + (tee_local $15 (select (i32.const 0) (i32.and (i32.sub (i32.const 0) - (set_local $4 + (tee_local $4 (i32.add (get_local $28) (i32.const 8) @@ -5918,7 +5920,7 @@ ) (i32.store (i32.const 1220) - (set_local $1 + (tee_local $1 (i32.sub (i32.add (get_local $33) @@ -5953,7 +5955,7 @@ ) (if (i32.gt_u - (set_local $10 + (tee_local $10 (i32.load (i32.const 1220) ) @@ -5963,7 +5965,7 @@ (block (i32.store (i32.const 1220) - (set_local $32 + (tee_local $32 (i32.sub (get_local $10) (get_local $18) @@ -5972,9 +5974,9 @@ ) (i32.store (i32.const 1232) - (set_local $7 + (tee_local $7 (i32.add - (set_local $10 + (tee_local $10 (i32.load (i32.const 1232) ) @@ -6049,13 +6051,13 @@ ) (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const -8) ) ) - (set_local $14 + (tee_local $14 (i32.load (i32.const 1224) ) @@ -6065,9 +6067,9 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (i32.and - (set_local $9 + (tee_local $9 (i32.load (i32.add (get_local $0) @@ -6085,7 +6087,7 @@ (set_local $7 (i32.add (get_local $1) - (set_local $5 + (tee_local $5 (i32.and (get_local $9) (i32.const -8) @@ -6127,7 +6129,7 @@ ) (if (i32.lt_u - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.sub @@ -6151,9 +6153,9 @@ (if (i32.ne (i32.and - (set_local $6 + (tee_local $6 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $7) (i32.const 4) @@ -6222,12 +6224,12 @@ ) (if (i32.ne - (set_local $9 + (tee_local $9 (i32.load offset=8 (get_local $0) ) ) - (set_local $4 + (tee_local $4 (i32.add (i32.const 1248) (i32.shl @@ -6311,7 +6313,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 8) @@ -6352,7 +6354,7 @@ (block $do-once$2 (if (i32.eq - (set_local $1 + (tee_local $1 (i32.load offset=12 (get_local $0) ) @@ -6361,11 +6363,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 16) @@ -6386,7 +6388,7 @@ ) (if (i32.eqz - (set_local $1 + (tee_local $1 (i32.load (get_local $4) ) @@ -6402,9 +6404,9 @@ ) (loop $while-out$4 $while-in$5 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 20) @@ -6423,9 +6425,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $1) (i32.const 16) @@ -6473,7 +6475,7 @@ (block (if (i32.lt_u - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $0) ) @@ -6485,7 +6487,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $6) (i32.const 12) @@ -6499,7 +6501,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $1) (i32.const 8) @@ -6533,11 +6535,11 @@ (i32.eq (get_local $0) (i32.load - (set_local $6 + (tee_local $6 (i32.add (i32.const 1512) (i32.shl - (set_local $1 + (tee_local $1 (i32.load offset=28 (get_local $0) ) @@ -6596,7 +6598,7 @@ (if (i32.eq (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $9) (i32.const 16) @@ -6633,7 +6635,7 @@ (if (i32.lt_u (get_local $3) - (set_local $1 + (tee_local $1 (i32.load (i32.const 1224) ) @@ -6646,9 +6648,9 @@ (get_local $9) ) (if - (set_local $4 + (tee_local $4 (i32.load - (set_local $6 + (tee_local $6 (i32.add (get_local $0) (i32.const 16) @@ -6675,7 +6677,7 @@ ) ) (if - (set_local $4 + (tee_local $4 (i32.load offset=4 (get_local $6) ) @@ -6737,9 +6739,9 @@ (if (i32.eqz (i32.and - (set_local $1 + (tee_local $1 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 4) @@ -6794,7 +6796,7 @@ (block (i32.store (i32.const 1220) - (set_local $3 + (tee_local $3 (i32.add (i32.load (i32.const 1220) @@ -6844,7 +6846,7 @@ (block (i32.store (i32.const 1216) - (set_local $3 + (tee_local $3 (i32.add (i32.load (i32.const 1216) @@ -6903,12 +6905,12 @@ ) (if (i32.ne - (set_local $6 + (tee_local $6 (i32.load offset=8 (get_local $7) ) ) - (set_local $4 + (tee_local $4 (i32.add (i32.const 1248) (i32.shl @@ -6990,7 +6992,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $10) (i32.const 8) @@ -7024,7 +7026,7 @@ (block $do-once$10 (if (i32.eq - (set_local $10 + (tee_local $10 (i32.load offset=12 (get_local $7) ) @@ -7033,11 +7035,11 @@ ) (block (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add - (set_local $4 + (tee_local $4 (i32.add (get_local $7) (i32.const 16) @@ -7058,7 +7060,7 @@ ) (if (i32.eqz - (set_local $0 + (tee_local $0 (i32.load (get_local $4) ) @@ -7074,9 +7076,9 @@ ) (loop $while-out$12 $while-in$13 (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 20) @@ -7095,9 +7097,9 @@ ) ) (if - (set_local $11 + (tee_local $11 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 16) @@ -7139,7 +7141,7 @@ (block (if (i32.lt_u - (set_local $1 + (tee_local $1 (i32.load offset=8 (get_local $7) ) @@ -7153,7 +7155,7 @@ (if (i32.ne (i32.load - (set_local $11 + (tee_local $11 (i32.add (get_local $1) (i32.const 12) @@ -7167,7 +7169,7 @@ (if (i32.eq (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $10) (i32.const 8) @@ -7201,11 +7203,11 @@ (i32.eq (get_local $7) (i32.load - (set_local $5 + (tee_local $5 (i32.add (i32.const 1512) (i32.shl - (set_local $10 + (tee_local $10 (i32.load offset=28 (get_local $7) ) @@ -7258,7 +7260,7 @@ (if (i32.eq (i32.load - (set_local $10 + (tee_local $10 (i32.add (get_local $6) (i32.const 16) @@ -7286,7 +7288,7 @@ (if (i32.lt_u (get_local $12) - (set_local $10 + (tee_local $10 (i32.load (i32.const 1224) ) @@ -7299,9 +7301,9 @@ (get_local $6) ) (if - (set_local $0 + (tee_local $0 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $7) (i32.const 16) @@ -7328,7 +7330,7 @@ ) ) (if - (set_local $0 + (tee_local $0 (i32.load offset=4 (get_local $5) ) @@ -7418,12 +7420,12 @@ ) (if (i32.and - (set_local $5 + (tee_local $5 (i32.load (i32.const 1208) ) ) - (set_local $3 + (tee_local $3 (i32.shl (i32.const 1) (get_local $8) @@ -7432,9 +7434,9 @@ ) (if (i32.lt_u - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $1) (i32.const 8) @@ -7498,9 +7500,9 @@ (i32.add (i32.const 1512) (i32.shl - (set_local $1 + (tee_local $1 (if - (set_local $1 + (tee_local $1 (i32.shr_u (get_local $0) (i32.const 8) @@ -7517,20 +7519,20 @@ (i32.shr_u (get_local $0) (i32.add - (set_local $3 + (tee_local $3 (i32.add (i32.sub (i32.const 14) (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (i32.shr_u (i32.add - (set_local $15 + (tee_local $15 (i32.shl (get_local $1) - (set_local $13 + (tee_local $13 (i32.and (i32.shr_u (i32.add @@ -7553,11 +7555,11 @@ ) (get_local $13) ) - (set_local $15 + (tee_local $15 (i32.and (i32.shr_u (i32.add - (set_local $5 + (tee_local $5 (i32.shl (get_local $15) (get_local $1) @@ -7613,12 +7615,12 @@ ) (if (i32.and - (set_local $15 + (tee_local $15 (i32.load (i32.const 1212) ) ) - (set_local $5 + (tee_local $5 (i32.shl (i32.const 1) (get_local $1) @@ -7672,9 +7674,9 @@ ) ) (if - (set_local $12 + (tee_local $12 (i32.load - (set_local $8 + (tee_local $8 (i32.add (i32.add (get_local $1) @@ -7757,9 +7759,9 @@ (if (i32.and (i32.ge_u - (set_local $13 + (tee_local $13 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $16) (i32.const 8) @@ -7767,7 +7769,7 @@ ) ) ) - (set_local $5 + (tee_local $5 (i32.load (i32.const 1224) ) @@ -7833,7 +7835,7 @@ ) (i32.store (i32.const 1240) - (set_local $2 + (tee_local $2 (i32.add (i32.load (i32.const 1240) @@ -7851,7 +7853,7 @@ ) (loop $while-out$20 $while-in$21 (if - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -7912,15 +7914,15 @@ (get_local $11) ) (i32.store - (set_local $3 + (tee_local $3 (i32.add (get_local $11) (i32.const 32) ) ) - (set_local $8 + (tee_local $8 (i32.load - (set_local $9 + (tee_local $9 (i32.add (get_local $0) (i32.const 28) @@ -7931,10 +7933,10 @@ ) (i32.store offset=4 (get_local $3) - (set_local $10 + (tee_local $10 (i32.sub (i32.load - (set_local $14 + (tee_local $14 (i32.add (get_local $0) (i32.const 20) @@ -7981,7 +7983,7 @@ (if (i32.eq (get_local $5) - (set_local $6 + (tee_local $6 (if (i32.load (i32.const 1160) @@ -8078,7 +8080,7 @@ (if (i32.gt_u (get_local $6) - (set_local $5 + (tee_local $5 (i32.load offset=4 (get_local $4) ) @@ -8087,7 +8089,7 @@ (block (i32.store (get_local $9) - (set_local $7 + (tee_local $7 (i32.load (get_local $8) ) @@ -8190,7 +8192,7 @@ (i32.store offset=16 (get_local $0) (i32.add - (set_local $5 + (tee_local $5 (i32.load (get_local $8) ) @@ -8202,7 +8204,7 @@ ) (i32.store (get_local $9) - (set_local $8 + (tee_local $8 (get_local $5) ) ) @@ -8272,9 +8274,9 @@ (local $6 i32) (local $7 i32) (if - (set_local $5 + (tee_local $5 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $2) (i32.const 16) @@ -8317,9 +8319,9 @@ ) (block (set_local $6 - (set_local $3 + (tee_local $3 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $2) (i32.const 20) @@ -8391,7 +8393,7 @@ (i32.load8_s (i32.add (get_local $0) - (set_local $7 + (tee_local $7 (i32.add (get_local $3) (i32.const -1) @@ -8464,10 +8466,12 @@ ) ) ) - (call $jb - (get_local $6) - (get_local $2) - (get_local $0) + (drop + (call $jb + (get_local $6) + (get_local $2) + (get_local $0) + ) ) (i32.store (get_local $5) @@ -8498,7 +8502,7 @@ (block $label$break$a (if (i32.and - (set_local $3 + (tee_local $3 (get_local $0) ) (i32.const 3) @@ -8522,18 +8526,19 @@ ) ) (if - (i32.and - (set_local $4 - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) ) - (get_local $0) (block (set_local $2 (get_local $0) @@ -8571,7 +8576,7 @@ (i32.and (i32.xor (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $1) ) @@ -8613,7 +8618,7 @@ (loop $while-out$5 $while-in$6 (if (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $2) (i32.const 1) @@ -8628,7 +8633,6 @@ (br $while-in$6) ) ) - (get_local $1) ) (set_local $5 (get_local $1) @@ -8702,7 +8706,7 @@ (i32.const 1188) ) (if - (set_local $2 + (tee_local $2 (i32.load (i32.const 1184) ) @@ -8755,12 +8759,13 @@ ) ) (if - (set_local $1 - (i32.load offset=56 - (get_local $1) + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - (get_local $2) (block (set_local $0 (get_local $2) @@ -8771,7 +8776,6 @@ (br $while-in$3) ) ) - (get_local $0) ) (call_import $xa (i32.const 1188) @@ -8805,10 +8809,10 @@ ) ) (i32.store8 - (set_local $6 + (tee_local $6 (get_local $5) ) - (set_local $9 + (tee_local $9 (i32.and (get_local $1) (i32.const 255) @@ -8816,9 +8820,9 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.load - (set_local $2 + (tee_local $2 (i32.add (get_local $0) (i32.const 16) @@ -8862,9 +8866,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8876,7 +8880,7 @@ ) (if (i32.ne - (set_local $4 + (tee_local $4 (i32.and (get_local $1) (i32.const 255) @@ -8946,7 +8950,7 @@ (if (i32.gt_u (i32.load - (set_local $3 + (tee_local $3 (i32.add (get_local $0) (i32.const 20) @@ -8954,7 +8958,7 @@ ) ) (i32.load - (set_local $4 + (tee_local $4 (i32.add (get_local $0) (i32.const 28) @@ -8963,19 +8967,21 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load offset=36 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load offset=36 + (get_local $0) + ) + (i32.const 3) ) - (i32.const 3) + (i32.const 2) ) - (i32.const 2) + (get_local $0) + (i32.const 0) + (i32.const 0) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) (if (i32.load @@ -9001,9 +9007,9 @@ (block (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 4) @@ -9011,9 +9017,9 @@ ) ) ) - (set_local $6 + (tee_local $6 (i32.load - (set_local $5 + (tee_local $5 (i32.add (get_local $0) (i32.const 8) @@ -9234,7 +9240,7 @@ (i32.or (i32.or (i32.or - (set_local $1 + (tee_local $1 (i32.and (get_local $1) (i32.const 255) @@ -9263,7 +9269,7 @@ ) ) (if - (set_local $3 + (tee_local $3 (i32.and (get_local $0) (i32.const 3) @@ -9353,7 +9359,7 @@ (if (i32.gt_s (i32.load offset=76 - (set_local $1 + (tee_local $1 (i32.load (i32.const 1024) ) @@ -9388,9 +9394,9 @@ ) (if (i32.lt_u - (set_local $2 + (tee_local $2 (i32.load - (set_local $0 + (tee_local $0 (i32.add (get_local $1) (i32.const 20) @@ -9450,7 +9456,7 @@ (local $2 i32) (set_local $2 (i32.load8_s - (set_local $1 + (tee_local $1 (i32.add (get_local $0) (i32.const 74) @@ -9470,7 +9476,7 @@ ) (if (i32.and - (set_local $2 + (tee_local $2 (i32.load (get_local $0) ) @@ -9498,7 +9504,7 @@ ) (i32.store offset=28 (get_local $0) - (set_local $1 + (tee_local $1 (i32.load offset=44 (get_local $0) ) @@ -9532,7 +9538,7 @@ ) (if (i32.eq - (set_local $0 + (tee_local $0 (if (i32.gt_s (i32.load offset=76 @@ -9601,7 +9607,7 @@ ) ) (i32.store - (set_local $3 + (tee_local $3 (get_local $4) ) (i32.load offset=60 @@ -9618,7 +9624,7 @@ ) (i32.store offset=12 (get_local $3) - (set_local $0 + (tee_local $0 (i32.add (get_local $4) (i32.const 20) @@ -9818,7 +9824,7 @@ ) ) (i32.store - (set_local $2 + (tee_local $2 (get_local $1) ) (i32.load offset=60 @@ -10038,8 +10044,10 @@ (i32.const 0) ) (func $Na (result i32) - (call $db - (i32.const 1144) + (drop + (call $db + (i32.const 1144) + ) ) (i32.const 0) ) @@ -10079,7 +10087,7 @@ (func $ib (result i32) (i32.const 0) ) - (func $__growWasmMemory (param $newSize i32) + (func $__growWasmMemory (param $newSize i32) (result i32) (grow_memory (get_local $newSize) ) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index ddd73a5f8..3dcf5fc53 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -244,7 +244,7 @@ (get_local $m) ) ) - (block $do-once$2 + (block $do-once$19 (if (i32.eq (get_local $i) @@ -295,7 +295,7 @@ (get_local $j) (get_local $n) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $qa) ) @@ -519,7 +519,7 @@ (get_local $o) ) ) - (block $do-once$4 + (block $do-once$21 (if (i32.eq (get_local $s) @@ -580,7 +580,7 @@ (i32.const 1216) ) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $qa) ) @@ -912,7 +912,7 @@ (set_local $s (get_local $j) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $j (i32.load (i32.add @@ -945,7 +945,7 @@ (set_local $A (get_local $s) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $B (get_local $f) @@ -993,7 +993,7 @@ (get_local $s) ) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $s (i32.load @@ -1036,7 +1036,7 @@ ) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq (get_local $o) @@ -1078,7 +1078,7 @@ (set_local $C (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $D @@ -1099,7 +1099,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $q (i32.add (get_local $D) @@ -1120,7 +1120,7 @@ (set_local $E (get_local $q) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $q @@ -1145,7 +1145,7 @@ (set_local $G (get_local $E) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $D @@ -1156,7 +1156,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -1172,7 +1172,7 @@ (set_local $C (get_local $F) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -1232,14 +1232,14 @@ (set_local $C (get_local $o) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $qa) ) ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $e) (block @@ -1292,7 +1292,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1335,7 +1335,7 @@ (i32.eqz (get_local $C) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1366,7 +1366,7 @@ ) ) ) - (block $do-once$14 + (block $do-once$31 (if (get_local $s) (if @@ -1390,7 +1390,7 @@ ) (get_local $C) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -1428,7 +1428,7 @@ ) (get_local $C) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1874,7 +1874,7 @@ (set_local $i (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $m (i32.and (i32.load @@ -1997,7 +1997,7 @@ (set_local $N (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $u @@ -2023,7 +2023,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -2224,7 +2224,7 @@ (get_local $N) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $N (i32.const 0) ) @@ -2285,7 +2285,7 @@ (set_local $N (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $P @@ -2307,7 +2307,7 @@ (set_local $V (get_local $i) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $O @@ -2321,7 +2321,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2383,7 +2383,7 @@ ) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq (get_local $s) @@ -2425,7 +2425,7 @@ (set_local $W (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $X @@ -2446,7 +2446,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $d (i32.add (get_local $X) @@ -2467,7 +2467,7 @@ (set_local $Y (get_local $d) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $d @@ -2492,7 +2492,7 @@ (set_local $_ (get_local $Y) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $X @@ -2503,7 +2503,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2519,7 +2519,7 @@ (set_local $W (get_local $Z) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -2579,14 +2579,14 @@ (set_local $W (get_local $s) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $qa) ) ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $g) (block @@ -2639,7 +2639,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2682,7 +2682,7 @@ (i32.eqz (get_local $W) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2713,7 +2713,7 @@ ) ) ) - (block $do-once$27 + (block $do-once$13 (if (get_local $q) (if @@ -2737,7 +2737,7 @@ ) (get_local $W) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -2775,14 +2775,14 @@ ) (get_local $W) ) - (br $do-once$25) + (br $do-once$11) ) ) ) ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $U) @@ -2968,7 +2968,7 @@ ) (get_local $g) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $g @@ -3167,7 +3167,7 @@ ) (get_local $i) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $q @@ -3194,7 +3194,7 @@ (get_local $t) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -3215,7 +3215,7 @@ (set_local $N (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $t @@ -3252,7 +3252,7 @@ (set_local $N (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $q @@ -3266,7 +3266,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -3307,7 +3307,7 @@ ) (get_local $i) ) - (br $do-once$29) + (br $do-once$15) ) ) (if @@ -3376,7 +3376,7 @@ ) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $qa) ) @@ -4123,8 +4123,10 @@ (i32.const -1) ) (block - (call_import $ta - (get_local $$) + (drop + (call_import $ta + (get_local $$) + ) ) (br $label$break$d) ) @@ -4344,7 +4346,7 @@ (set_local $ma (i32.const 0) ) - (loop $do-out$44 $do-in$45 + (loop $do-out$75 $do-in$76 (set_local $c (i32.add (i32.const 1248) @@ -4377,7 +4379,7 @@ (i32.const 1) ) ) - (br_if $do-in$45 + (br_if $do-in$76 (i32.ne (get_local $ma) (i32.const 32) @@ -4463,7 +4465,7 @@ (set_local $ka (i32.const 1656) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$44 $do-in$45 (set_local $ma (i32.load (get_local $ka) @@ -4504,7 +4506,7 @@ (set_local $N (i32.const 201) ) - (br $do-out$46) + (br $do-out$44) ) ) (set_local $ka @@ -4515,7 +4517,7 @@ ) ) ) - (br_if $do-in$47 + (br_if $do-in$45 (i32.ne (get_local $ka) (i32.const 0) @@ -4671,7 +4673,7 @@ (set_local $ka (i32.const 1656) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (i32.load @@ -4689,7 +4691,7 @@ (set_local $N (i32.const 209) ) - (br $while-out$48) + (br $while-out$46) ) ) (set_local $ka @@ -4708,10 +4710,10 @@ (set_local $wa (i32.const 1656) ) - (br $while-out$48) + (br $while-out$46) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -4831,7 +4833,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$48 (if (i32.eq (get_local $ma) @@ -4907,7 +4909,7 @@ ) (get_local $la) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $la @@ -4974,7 +4976,7 @@ ) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.ne (get_local $da) @@ -4998,7 +5000,7 @@ ) (get_local $ma) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $qa) ) @@ -5028,7 +5030,7 @@ (br $label$break$e) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $V) @@ -5065,7 +5067,7 @@ (set_local $xa (get_local $e) ) - (br $do-once$55) + (br $do-once$61) ) ) (call_import $qa) @@ -5101,7 +5103,7 @@ ) ) ) - (block $do-once$57 + (block $do-once$51 (if (i32.eq (get_local $e) @@ -5143,7 +5145,7 @@ (set_local $ya (i32.const 0) ) - (br $do-once$57) + (br $do-once$51) ) (block (set_local $za @@ -5164,7 +5166,7 @@ ) ) ) - (loop $while-out$59 $while-in$60 + (loop $while-out$53 $while-in$54 (set_local $aa (i32.add (get_local $za) @@ -5185,7 +5187,7 @@ (set_local $Aa (get_local $aa) ) - (br $while-in$60) + (br $while-in$54) ) ) (set_local $aa @@ -5210,7 +5212,7 @@ (set_local $Ca (get_local $Aa) ) - (br $while-out$59) + (br $while-out$53) ) (block (set_local $za @@ -5221,7 +5223,7 @@ ) ) ) - (br $while-in$60) + (br $while-in$54) ) (if (i32.lt_u @@ -5237,7 +5239,7 @@ (set_local $ya (get_local $Ba) ) - (br $do-once$57) + (br $do-once$51) ) ) ) @@ -5297,7 +5299,7 @@ (set_local $ya (get_local $e) ) - (br $do-once$57) + (br $do-once$51) ) (call_import $qa) ) @@ -5327,7 +5329,7 @@ ) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $ma) @@ -5342,7 +5344,7 @@ ) (if (get_local $ya) - (br $do-once$61) + (br $do-once$55) ) (i32.store (i32.const 1212) @@ -5435,7 +5437,7 @@ (get_local $da) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $V) (if @@ -5459,7 +5461,7 @@ ) (get_local $ya) ) - (br $do-once$63) + (br $do-once$57) ) ) ) @@ -5596,7 +5598,7 @@ (get_local $fa) ) ) - (block $do-once$65 + (block $do-once$63 (if (i32.eqz (i32.and @@ -5648,7 +5650,7 @@ (set_local $Ga (get_local $$) ) - (br $do-once$65) + (br $do-once$63) ) ) (call_import $qa) @@ -5680,7 +5682,7 @@ ) (get_local $la) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $e @@ -5689,7 +5691,7 @@ (i32.const 8) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eqz (get_local $e) @@ -5707,7 +5709,7 @@ (set_local $Ha (i32.const 31) ) - (br $do-once$67) + (br $do-once$65) ) ) (set_local $V @@ -5884,7 +5886,7 @@ ) (get_local $ka) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $aa @@ -5911,7 +5913,7 @@ (get_local $e) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$67 $while-in$68 (if (i32.eq (i32.and @@ -5932,7 +5934,7 @@ (set_local $N (i32.const 279) ) - (br $while-out$69) + (br $while-out$67) ) ) (set_local $e @@ -5969,7 +5971,7 @@ (set_local $N (i32.const 276) ) - (br $while-out$69) + (br $while-out$67) ) (block (set_local $aa @@ -5983,7 +5985,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$68) ) (if (i32.eq @@ -6024,7 +6026,7 @@ ) (get_local $ka) ) - (br $do-once$50) + (br $do-once$48) ) ) (if @@ -6093,7 +6095,7 @@ ) (i32.const 0) ) - (br $do-once$50) + (br $do-once$48) ) (call_import $qa) ) @@ -6122,7 +6124,7 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (set_local $ka (i32.load (get_local $wa) @@ -6154,7 +6156,7 @@ (set_local $La (get_local $ea) ) - (br $while-out$71) + (br $while-out$69) ) ) ) @@ -6167,7 +6169,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (set_local $ca (i32.add @@ -6364,7 +6366,7 @@ (i32.const 24) ) ) - (loop $do-out$73 $do-in$74 + (loop $do-out$71 $do-in$72 (set_local $ka (i32.add (get_local $ka) @@ -6375,7 +6377,7 @@ (get_local $ka) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$72 (i32.lt_u (i32.add (get_local $ka) @@ -6756,7 +6758,7 @@ (get_local $e) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (if (i32.eq (i32.and @@ -6777,7 +6779,7 @@ (set_local $N (i32.const 305) ) - (br $while-out$75) + (br $while-out$73) ) ) (set_local $e @@ -6814,7 +6816,7 @@ (set_local $N (i32.const 302) ) - (br $while-out$75) + (br $while-out$73) ) (block (set_local $ma @@ -6828,7 +6830,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.eq @@ -9932,10 +9934,12 @@ ) ) ) - (call $jb - (get_local $n) - (get_local $m) - (get_local $l) + (drop + (call $jb + (get_local $n) + (get_local $m) + (get_local $l) + ) ) (i32.store (get_local $e) @@ -10557,22 +10561,24 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load - (i32.add - (get_local $a) - (i32.const 36) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load + (i32.add + (get_local $a) + (i32.const 36) + ) ) + (i32.const 3) ) - (i32.const 3) + (i32.const 2) ) - (i32.const 2) + (get_local $a) + (i32.const 0) + (i32.const 0) ) - (get_local $a) - (i32.const 0) - (i32.const 0) ) (if (i32.eqz @@ -11914,8 +11920,10 @@ ) ) (func $Na (result i32) - (call $db - (i32.const 1144) + (drop + (call $db + (i32.const 1144) + ) ) (return (i32.const 0) @@ -11965,7 +11973,7 @@ (i32.const 0) ) ) - (func $__growWasmMemory (param $newSize i32) + (func $__growWasmMemory (param $newSize i32) (result i32) (grow_memory (get_local $newSize) ) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index c0a7307c5..0f4b278c2 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -245,7 +245,7 @@ (get_local $m) ) ) - (block $do-once$2 + (block $do-once$19 (if (i32.eq (get_local $i) @@ -296,7 +296,7 @@ (get_local $j) (get_local $n) ) - (br $do-once$2) + (br $do-once$19) ) (call_import $qa) ) @@ -520,7 +520,7 @@ (get_local $o) ) ) - (block $do-once$4 + (block $do-once$21 (if (i32.eq (get_local $s) @@ -581,7 +581,7 @@ (i32.const 1216) ) ) - (br $do-once$4) + (br $do-once$21) ) (call_import $qa) ) @@ -913,7 +913,7 @@ (set_local $s (get_local $j) ) - (loop $while-out$6 $while-in$7 + (loop $while-out$23 $while-in$24 (set_local $j (i32.load (i32.add @@ -946,7 +946,7 @@ (set_local $A (get_local $s) ) - (br $while-out$6) + (br $while-out$23) ) (set_local $B (get_local $f) @@ -994,7 +994,7 @@ (get_local $s) ) ) - (br $while-in$7) + (br $while-in$24) ) (set_local $s (i32.load @@ -1037,7 +1037,7 @@ ) ) ) - (block $do-once$8 + (block $do-once$25 (if (i32.eq (get_local $o) @@ -1079,7 +1079,7 @@ (set_local $C (i32.const 0) ) - (br $do-once$8) + (br $do-once$25) ) (block (set_local $D @@ -1100,7 +1100,7 @@ ) ) ) - (loop $while-out$10 $while-in$11 + (loop $while-out$27 $while-in$28 (set_local $q (i32.add (get_local $D) @@ -1121,7 +1121,7 @@ (set_local $E (get_local $q) ) - (br $while-in$11) + (br $while-in$28) ) ) (set_local $q @@ -1146,7 +1146,7 @@ (set_local $G (get_local $E) ) - (br $while-out$10) + (br $while-out$27) ) (block (set_local $D @@ -1157,7 +1157,7 @@ ) ) ) - (br $while-in$11) + (br $while-in$28) ) (if (i32.lt_u @@ -1173,7 +1173,7 @@ (set_local $C (get_local $F) ) - (br $do-once$8) + (br $do-once$25) ) ) ) @@ -1233,14 +1233,14 @@ (set_local $C (get_local $o) ) - (br $do-once$8) + (br $do-once$25) ) (call_import $qa) ) ) ) ) - (block $do-once$12 + (block $do-once$29 (if (get_local $e) (block @@ -1293,7 +1293,7 @@ ) ) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1336,7 +1336,7 @@ (i32.eqz (get_local $C) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1367,7 +1367,7 @@ ) ) ) - (block $do-once$14 + (block $do-once$31 (if (get_local $s) (if @@ -1391,7 +1391,7 @@ ) (get_local $C) ) - (br $do-once$14) + (br $do-once$31) ) ) ) @@ -1429,7 +1429,7 @@ ) (get_local $C) ) - (br $do-once$12) + (br $do-once$29) ) ) ) @@ -1875,7 +1875,7 @@ (set_local $i (i32.const 0) ) - (loop $while-out$17 $while-in$18 + (loop $while-out$3 $while-in$4 (set_local $m (i32.and (i32.load @@ -1998,7 +1998,7 @@ (set_local $N (i32.const 86) ) - (br $while-out$17) + (br $while-out$3) ) (block (set_local $u @@ -2024,7 +2024,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$4) ) ) ) @@ -2225,7 +2225,7 @@ (get_local $N) (i32.const 90) ) - (loop $while-out$19 $while-in$20 + (loop $while-out$5 $while-in$6 (set_local $N (i32.const 0) ) @@ -2286,7 +2286,7 @@ (set_local $N (i32.const 90) ) - (br $while-in$20) + (br $while-in$6) ) ) (set_local $P @@ -2308,7 +2308,7 @@ (set_local $V (get_local $i) ) - (br $while-out$19) + (br $while-out$5) ) (block (set_local $O @@ -2322,7 +2322,7 @@ ) ) ) - (br $while-in$20) + (br $while-in$6) ) ) (if @@ -2384,7 +2384,7 @@ ) ) ) - (block $do-once$21 + (block $do-once$7 (if (i32.eq (get_local $s) @@ -2426,7 +2426,7 @@ (set_local $W (i32.const 0) ) - (br $do-once$21) + (br $do-once$7) ) (block (set_local $X @@ -2447,7 +2447,7 @@ ) ) ) - (loop $while-out$23 $while-in$24 + (loop $while-out$9 $while-in$10 (set_local $d (i32.add (get_local $X) @@ -2468,7 +2468,7 @@ (set_local $Y (get_local $d) ) - (br $while-in$24) + (br $while-in$10) ) ) (set_local $d @@ -2493,7 +2493,7 @@ (set_local $_ (get_local $Y) ) - (br $while-out$23) + (br $while-out$9) ) (block (set_local $X @@ -2504,7 +2504,7 @@ ) ) ) - (br $while-in$24) + (br $while-in$10) ) (if (i32.lt_u @@ -2520,7 +2520,7 @@ (set_local $W (get_local $Z) ) - (br $do-once$21) + (br $do-once$7) ) ) ) @@ -2580,14 +2580,14 @@ (set_local $W (get_local $s) ) - (br $do-once$21) + (br $do-once$7) ) (call_import $qa) ) ) ) ) - (block $do-once$25 + (block $do-once$11 (if (get_local $g) (block @@ -2640,7 +2640,7 @@ ) ) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2683,7 +2683,7 @@ (i32.eqz (get_local $W) ) - (br $do-once$25) + (br $do-once$11) ) ) ) @@ -2714,7 +2714,7 @@ ) ) ) - (block $do-once$27 + (block $do-once$13 (if (get_local $q) (if @@ -2738,7 +2738,7 @@ ) (get_local $W) ) - (br $do-once$27) + (br $do-once$13) ) ) ) @@ -2776,14 +2776,14 @@ ) (get_local $W) ) - (br $do-once$25) + (br $do-once$11) ) ) ) ) ) ) - (block $do-once$29 + (block $do-once$15 (if (i32.lt_u (get_local $U) @@ -2969,7 +2969,7 @@ ) (get_local $g) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $g @@ -3168,7 +3168,7 @@ ) (get_local $i) ) - (br $do-once$29) + (br $do-once$15) ) ) (set_local $q @@ -3195,7 +3195,7 @@ (get_local $t) ) ) - (loop $while-out$31 $while-in$32 + (loop $while-out$17 $while-in$18 (if (i32.eq (i32.and @@ -3216,7 +3216,7 @@ (set_local $N (i32.const 148) ) - (br $while-out$31) + (br $while-out$17) ) ) (set_local $t @@ -3253,7 +3253,7 @@ (set_local $N (i32.const 145) ) - (br $while-out$31) + (br $while-out$17) ) (block (set_local $q @@ -3267,7 +3267,7 @@ ) ) ) - (br $while-in$32) + (br $while-in$18) ) (if (i32.eq @@ -3308,7 +3308,7 @@ ) (get_local $i) ) - (br $do-once$29) + (br $do-once$15) ) ) (if @@ -3377,7 +3377,7 @@ ) (i32.const 0) ) - (br $do-once$29) + (br $do-once$15) ) (call_import $qa) ) @@ -4124,8 +4124,10 @@ (i32.const -1) ) (block - (call_import $ta - (get_local $$) + (drop + (call_import $ta + (get_local $$) + ) ) (br $label$break$d) ) @@ -4345,7 +4347,7 @@ (set_local $ma (i32.const 0) ) - (loop $do-out$44 $do-in$45 + (loop $do-out$75 $do-in$76 (set_local $c (i32.add (i32.const 1248) @@ -4378,7 +4380,7 @@ (i32.const 1) ) ) - (br_if $do-in$45 + (br_if $do-in$76 (i32.ne (get_local $ma) (i32.const 32) @@ -4464,7 +4466,7 @@ (set_local $ka (i32.const 1656) ) - (loop $do-out$46 $do-in$47 + (loop $do-out$44 $do-in$45 (set_local $ma (i32.load (get_local $ka) @@ -4505,7 +4507,7 @@ (set_local $N (i32.const 201) ) - (br $do-out$46) + (br $do-out$44) ) ) (set_local $ka @@ -4516,7 +4518,7 @@ ) ) ) - (br_if $do-in$47 + (br_if $do-in$45 (i32.ne (get_local $ka) (i32.const 0) @@ -4672,7 +4674,7 @@ (set_local $ka (i32.const 1656) ) - (loop $while-out$48 $while-in$49 + (loop $while-out$46 $while-in$47 (if (i32.eq (i32.load @@ -4690,7 +4692,7 @@ (set_local $N (i32.const 209) ) - (br $while-out$48) + (br $while-out$46) ) ) (set_local $ka @@ -4709,10 +4711,10 @@ (set_local $wa (i32.const 1656) ) - (br $while-out$48) + (br $while-out$46) ) ) - (br $while-in$49) + (br $while-in$47) ) (if (i32.eq @@ -4832,7 +4834,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$48 (if (i32.eq (get_local $ma) @@ -4908,7 +4910,7 @@ ) (get_local $la) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $la @@ -4975,7 +4977,7 @@ ) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.ne (get_local $da) @@ -4999,7 +5001,7 @@ ) (get_local $ma) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $qa) ) @@ -5029,7 +5031,7 @@ (br $label$break$e) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $V) @@ -5066,7 +5068,7 @@ (set_local $xa (get_local $e) ) - (br $do-once$55) + (br $do-once$61) ) ) (call_import $qa) @@ -5102,7 +5104,7 @@ ) ) ) - (block $do-once$57 + (block $do-once$51 (if (i32.eq (get_local $e) @@ -5144,7 +5146,7 @@ (set_local $ya (i32.const 0) ) - (br $do-once$57) + (br $do-once$51) ) (block (set_local $za @@ -5165,7 +5167,7 @@ ) ) ) - (loop $while-out$59 $while-in$60 + (loop $while-out$53 $while-in$54 (set_local $aa (i32.add (get_local $za) @@ -5186,7 +5188,7 @@ (set_local $Aa (get_local $aa) ) - (br $while-in$60) + (br $while-in$54) ) ) (set_local $aa @@ -5211,7 +5213,7 @@ (set_local $Ca (get_local $Aa) ) - (br $while-out$59) + (br $while-out$53) ) (block (set_local $za @@ -5222,7 +5224,7 @@ ) ) ) - (br $while-in$60) + (br $while-in$54) ) (if (i32.lt_u @@ -5238,7 +5240,7 @@ (set_local $ya (get_local $Ba) ) - (br $do-once$57) + (br $do-once$51) ) ) ) @@ -5298,7 +5300,7 @@ (set_local $ya (get_local $e) ) - (br $do-once$57) + (br $do-once$51) ) (call_import $qa) ) @@ -5328,7 +5330,7 @@ ) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $ma) @@ -5343,7 +5345,7 @@ ) (if (get_local $ya) - (br $do-once$61) + (br $do-once$55) ) (i32.store (i32.const 1212) @@ -5436,7 +5438,7 @@ (get_local $da) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $V) (if @@ -5460,7 +5462,7 @@ ) (get_local $ya) ) - (br $do-once$63) + (br $do-once$57) ) ) ) @@ -5597,7 +5599,7 @@ (get_local $fa) ) ) - (block $do-once$65 + (block $do-once$63 (if (i32.eqz (i32.and @@ -5649,7 +5651,7 @@ (set_local $Ga (get_local $$) ) - (br $do-once$65) + (br $do-once$63) ) ) (call_import $qa) @@ -5681,7 +5683,7 @@ ) (get_local $la) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $e @@ -5690,7 +5692,7 @@ (i32.const 8) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eqz (get_local $e) @@ -5708,7 +5710,7 @@ (set_local $Ha (i32.const 31) ) - (br $do-once$67) + (br $do-once$65) ) ) (set_local $V @@ -5885,7 +5887,7 @@ ) (get_local $ka) ) - (br $do-once$50) + (br $do-once$48) ) ) (set_local $aa @@ -5912,7 +5914,7 @@ (get_local $e) ) ) - (loop $while-out$69 $while-in$70 + (loop $while-out$67 $while-in$68 (if (i32.eq (i32.and @@ -5933,7 +5935,7 @@ (set_local $N (i32.const 279) ) - (br $while-out$69) + (br $while-out$67) ) ) (set_local $e @@ -5970,7 +5972,7 @@ (set_local $N (i32.const 276) ) - (br $while-out$69) + (br $while-out$67) ) (block (set_local $aa @@ -5984,7 +5986,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$68) ) (if (i32.eq @@ -6025,7 +6027,7 @@ ) (get_local $ka) ) - (br $do-once$50) + (br $do-once$48) ) ) (if @@ -6094,7 +6096,7 @@ ) (i32.const 0) ) - (br $do-once$50) + (br $do-once$48) ) (call_import $qa) ) @@ -6123,7 +6125,7 @@ ) ) ) - (loop $while-out$71 $while-in$72 + (loop $while-out$69 $while-in$70 (set_local $ka (i32.load (get_local $wa) @@ -6155,7 +6157,7 @@ (set_local $La (get_local $ea) ) - (br $while-out$71) + (br $while-out$69) ) ) ) @@ -6168,7 +6170,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) (set_local $ca (i32.add @@ -6365,7 +6367,7 @@ (i32.const 24) ) ) - (loop $do-out$73 $do-in$74 + (loop $do-out$71 $do-in$72 (set_local $ka (i32.add (get_local $ka) @@ -6376,7 +6378,7 @@ (get_local $ka) (i32.const 7) ) - (br_if $do-in$74 + (br_if $do-in$72 (i32.lt_u (i32.add (get_local $ka) @@ -6757,7 +6759,7 @@ (get_local $e) ) ) - (loop $while-out$75 $while-in$76 + (loop $while-out$73 $while-in$74 (if (i32.eq (i32.and @@ -6778,7 +6780,7 @@ (set_local $N (i32.const 305) ) - (br $while-out$75) + (br $while-out$73) ) ) (set_local $e @@ -6815,7 +6817,7 @@ (set_local $N (i32.const 302) ) - (br $while-out$75) + (br $while-out$73) ) (block (set_local $ma @@ -6829,7 +6831,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$74) ) (if (i32.eq @@ -9933,10 +9935,12 @@ ) ) ) - (call $jb - (get_local $n) - (get_local $m) - (get_local $l) + (drop + (call $jb + (get_local $n) + (get_local $m) + (get_local $l) + ) ) (i32.store (get_local $e) @@ -10558,22 +10562,24 @@ ) ) (block - (call_indirect $FUNCSIG$iiii - (i32.add - (i32.and - (i32.load - (i32.add - (get_local $a) - (i32.const 36) + (drop + (call_indirect $FUNCSIG$iiii + (i32.add + (i32.and + (i32.load + (i32.add + (get_local $a) + (i32.const 36) + ) ) + (i32.const 3) ) - (i32.const 3) + (i32.const 2) ) - (i32.const 2) + (get_local $a) + (i32.const 0) + (i32.const 0) ) - (get_local $a) - (i32.const 0) - (i32.const 0) ) (if (i32.eqz @@ -11915,8 +11921,10 @@ ) ) (func $Na (result i32) - (call $db - (i32.const 1144) + (drop + (call $db + (i32.const 1144) + ) ) (return (i32.const 0) @@ -11966,7 +11974,7 @@ (i32.const 0) ) ) - (func $__growWasmMemory (param $newSize i32) + (func $__growWasmMemory (param $newSize i32) (result i32) (grow_memory (get_local $newSize) ) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 4e90b3f34..9b9d6a353 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -31,17 +31,25 @@ ) ) (func $bitcasts (param $i i32) (param $f f32) - (f32.reinterpret/i32 - (get_local $i) - ) - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) + (drop + (block + (drop + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) + ) + ) + ) + (i32.reinterpret/f32 + (get_local $f) + ) ) ) - (i32.reinterpret/f32 - (get_local $f) - ) ) (func $ctzzzz (result i32) (return diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 4e90b3f34..9b9d6a353 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -31,17 +31,25 @@ ) ) (func $bitcasts (param $i i32) (param $f f32) - (f32.reinterpret/i32 - (get_local $i) - ) - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) + (drop + (block + (drop + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) + ) + ) + ) + (i32.reinterpret/f32 + (get_local $f) + ) ) ) - (i32.reinterpret/f32 - (get_local $f) - ) ) (func $ctzzzz (result i32) (return diff --git a/test/min.wast b/test/min.wast index 44d848991..4702215a9 100644 --- a/test/min.wast +++ b/test/min.wast @@ -14,7 +14,7 @@ ) (func $neg (type $1) (param $k i32) (param $p i32) (result f32) (local $n f32) - (set_local $n + (tee_local $n (f32.neg (block $block0 (i32.store diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary index f48fdf8ec..7750086aa 100644 --- a/test/min.wast.fromBinary +++ b/test/min.wast.fromBinary @@ -14,7 +14,7 @@ ) (func $neg (type $1) (param $var$0 i32) (param $var$1 i32) (result f32) (local $var$2 f32) - (set_local $var$2 + (tee_local $var$2 (f32.neg (block $label$0 (i32.store diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt index 44ad12f53..6ec6f94ae 100644 --- a/test/passes/coalesce-locals-learning.txt +++ b/test/passes/coalesce-locals-learning.txt @@ -28,35 +28,49 @@ (set_local $1 (i32.const 0) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $almost-interfere (type $2) (local $0 i32) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $redundant-copy (type $2) (local $0 i32) (set_local $0 (i32.const 0) ) - (get_local $0) - (get_local $0) + (nop) + (drop + (get_local $0) + ) ) (func $ineffective-store (type $2) (local $0 i32) - (i32.const 0) + (drop + (i32.const 0) + ) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $block (type $2) (local $0 i32) @@ -65,7 +79,9 @@ (i32.const 0) ) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $see-both-sides (type $2) (local $0 i32) @@ -78,8 +94,12 @@ (i32.const 0) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $see-br-and-ignore-dead (type $2) (local $0 i32) @@ -88,11 +108,19 @@ ) (block $block (br $block) - (i32.const 0) + (drop + (i32.const 0) + ) + (drop + (get_local $0) + ) + (drop + (i32.const -1) + ) + ) + (drop (get_local $0) - (i32.const -1) ) - (get_local $0) ) (func $see-block-body (type $2) (local $0 i32) @@ -104,30 +132,46 @@ (set_local $1 (i32.const 0) ) - (get_local $1) + (drop + (get_local $1) + ) (br $block) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $zero-init (type $2) (local $0 i32) (local $1 i32) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $multi (type $2) (local $0 i32) (local $1 i32) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-else (type $2) (local $0 i32) (local $1 i32) (if (i32.const 0) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (func $if-else-parallel (type $2) @@ -138,13 +182,17 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (block $block3 (set_local $0 (i32.const 1) ) - (get_local $0) + (drop + (get_local $0) + ) ) ) ) @@ -160,8 +208,12 @@ (i32.const 1) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-else-through (type $2) (local $0 i32) @@ -174,11 +226,19 @@ ) (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + ) + (drop + (get_local $0) + ) + (drop + (get_local $1) ) - (get_local $0) - (get_local $1) ) (func $if-through (type $2) (local $0 i32) @@ -191,10 +251,16 @@ ) (if (i32.const 0) - (i32.const 1) + (drop + (i32.const 1) + ) + ) + (drop + (get_local $0) + ) + (drop + (get_local $1) ) - (get_local $0) - (get_local $1) ) (func $if-through2 (type $2) (local $0 i32) @@ -208,8 +274,12 @@ (i32.const 1) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-through2 (type $2) (local $0 i32) @@ -220,8 +290,12 @@ (if (i32.const 0) (block $block1 - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -229,12 +303,16 @@ (local $0 i32) (local $1 i32) (if - (set_local $0 + (tee_local $0 (i32.const 0) ) (block $block1 - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -247,10 +325,14 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) ) - (get_local $1) + (drop + (get_local $1) + ) ) (func $if4 (type $2) (local $0 i32) @@ -260,13 +342,17 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 1) ) ) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $if5 (type $2) (local $0 i32) @@ -274,23 +360,31 @@ (if (i32.const 0) (block $block1 - (get_local $0) + (drop + (get_local $0) + ) (set_local $1 (i32.const 1) ) ) ) - (get_local $1) + (drop + (get_local $1) + ) ) (func $loop (type $2) (local $0 i32) (local $1 i32) (loop $out $in - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 0) ) - (get_local $1) + (drop + (get_local $1) + ) (br $in) ) ) @@ -298,33 +392,51 @@ (local $0 i32) (block $block (br $block) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $interfere-in-dead2 (type $2) (local $0 i32) (block $block (unreachable) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $interfere-in-dead3 (type $2) (local $0 i32) (block $block (return) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $params (type $3) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) - (get_local $2) - (get_local $3) - (get_local $4) + (drop + (get_local $2) + ) + (drop + (get_local $3) + ) + (drop + (get_local $4) + ) ) (func $interfere-in-dead (type $2) (local $0 i32) @@ -333,8 +445,12 @@ (br_if $block (i32.const 0) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (func $switch (type $2) @@ -347,13 +463,21 @@ (br_table $switch-case$1 $switch-case$2 $switch-case$1 $switch-case$1 $switch$def (i32.const 100) ) + (drop + (get_local $0) + ) + ) + (drop (get_local $0) ) - (get_local $0) ) - (get_local $1) + (drop + (get_local $1) + ) + ) + (drop + (get_local $2) ) - (get_local $2) ) (func $greedy-can-be-happy (type $2) (local $0 i32) @@ -371,8 +495,12 @@ (set_local $1 (i32.const 101) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block5 (set_local $0 @@ -381,8 +509,12 @@ (set_local $1 (i32.const 103) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (if @@ -394,8 +526,12 @@ (set_local $1 (i32.const 105) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block10 (set_local $0 @@ -404,8 +540,12 @@ (set_local $1 (i32.const 107) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -418,8 +558,12 @@ (set_local $1 (i32.const 109) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block15 (set_local $0 @@ -428,8 +572,12 @@ (set_local $1 (i32.const 111) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -450,8 +598,12 @@ (set_local $1 (i32.const 101) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block5 (set_local $0 @@ -460,8 +612,12 @@ (set_local $1 (i32.const 103) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (if @@ -473,8 +629,12 @@ (set_local $1 (i32.const 105) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block10 (set_local $0 @@ -483,8 +643,12 @@ (set_local $1 (i32.const 107) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -497,8 +661,12 @@ (set_local $1 (i32.const 109) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block15 (set_local $0 @@ -507,8 +675,12 @@ (set_local $1 (i32.const 111) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -520,7 +692,9 @@ (get_local $2) (i32.const 4096) ) - (get_local $0) + (drop + (get_local $0) + ) ) (set_local $3 (get_local $0) @@ -679,6 +853,8 @@ ) (nop) ) - (get_local $0) + (drop + (get_local $0) + ) ) ) diff --git a/test/passes/coalesce-locals-learning.wast b/test/passes/coalesce-locals-learning.wast index a7152d16a..1e82a73b9 100644 --- a/test/passes/coalesce-locals-learning.wast +++ b/test/passes/coalesce-locals-learning.wast @@ -1,288 +1,472 @@ (module (memory 10) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $2 (func)) + (type $3 (func (param i32 f32))) + (type $4 (func (param i32))) (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32)) - (table) - (func $nothing-to-do + (func $nothing-to-do (type $2) (local $x i32) + (nop) ) - (func $merge + (func $merge (type $2) (local $x i32) (local $y i32) + (nop) ) - (func $leave-type + (func $leave-type (type $2) (local $x i32) (local $y f32) + (nop) ) - (func $leave-interfere + (func $leave-interfere (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 0)) - (get_local $x) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $almost-interfere + (func $almost-interfere (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (get_local $x) - (set_local $y (i32.const 0)) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) ) - (func $redundant-copy + (func $redundant-copy (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (get_local $x)) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (set_local $y + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $ineffective-store + (func $ineffective-store (type $2) (local $x i32) - (set_local $x (i32.const 0)) - (set_local $x (i32.const 0)) - (get_local $x) + (set_local $x + (i32.const 0) + ) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) ) - (func $block + (func $block (type $2) (local $x i32) - (block - (set_local $x (i32.const 0)) + (block $block0 + (set_local $x + (i32.const 0) + ) + ) + (drop + (get_local $x) ) - (get_local $x) ) - (func $see-both-sides + (func $see-both-sides (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (block - (set_local $y (i32.const 0)) + (set_local $x + (i32.const 0) + ) + (block $block0 + (set_local $y + (i32.const 0) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $see-br-and-ignore-dead + (func $see-br-and-ignore-dead (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (block $block (br $block) - (set_local $y (i32.const 0)) - (get_local $y) - (set_local $x (i32.const -1)) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) + (set_local $x + (i32.const -1) + ) + ) + (drop + (get_local $x) ) - (get_local $x) ) - (func $see-block-body + (func $see-block-body (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (block $block - (set_local $y (i32.const 0)) - (get_local $y) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) (br $block) ) - (get_local $x) + (drop + (get_local $x) + ) ) - (func $zero-init + (func $zero-init (type $2) (local $x i32) (local $y i32) - (get_local $x) - (get_local $y) - ) - (func $multi - (local $x i32) ;; x is free, but y and z conflict - (local $y i32) - (local $z i32) - (get_local $y) - (get_local $z) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $if-else + (func $multi (type $2) (local $x i32) (local $y i32) - (if ;; x and y conflict when they are merged into their shared predecessor - (i32.const 0) - (get_local $x) + (local $z i32) + (drop (get_local $y) ) + (drop + (get_local $z) + ) ) - (func $if-else-parallel + (func $if-else (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) + (drop (get_local $x) ) - (block - (set_local $y (i32.const 1)) + (drop (get_local $y) ) ) ) - (func $if-else-after + (func $if-else-parallel (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + ) + (block $block3 + (set_local $y + (i32.const 1) + ) + (drop + (get_local $y) + ) + ) ) - (get_local $x) - (get_local $y) ) - (func $if-else-through + (func $if-else-after (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $if-through + (func $if-else-through (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 1) + ) (if (i32.const 0) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) + ) + (func $if-through (type $2) + (local $x i32) + (local $y i32) + (set_local $x + (i32.const 0) + ) + (set_local $y (i32.const 1) ) - (get_local $x) - (get_local $y) + (if + (i32.const 0) + (drop + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $if-through2 + (func $if-through2 (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (if (i32.const 0) - (set_local $y (i32.const 1)) + (set_local $y + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $if-through2 + (func $if-through2 (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (if (i32.const 0) - (block - (get_local $x) - (get_local $y) + (block $block1 + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) ) - (func $if2 + (func $if2 (type $2) (local $x i32) (local $y i32) (if - (set_local $x (i32.const 0)) - (block - (get_local $x) - (get_local $y) + (tee_local $x + (i32.const 0) + ) + (block $block1 + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) ) - (func $if3 + (func $if3 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) - (get_local $x) + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $if4 + (func $if4 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) - (get_local $x) - (set_local $y (i32.const 1)) ;; we might not go through here, but it's ok + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + (set_local $y + (i32.const 1) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $if5 + (func $if5 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (get_local $x) ;; we might go through here, and it causes interference - (set_local $y (i32.const 1)) + (block $block1 + (drop + (get_local $x) + ) + (set_local $y + (i32.const 1) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $loop + (func $loop (type $2) (local $x i32) (local $y i32) (loop $out $in - (get_local $x) - (set_local $x (i32.const 0)) ;; effective, due to looping - (get_local $y) + (drop + (get_local $x) + ) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $y) + ) (br $in) ) ) - (func $interfere-in-dead + (func $interfere-in-dead (type $2) (local $x i32) (local $y i32) (block $block (br $block) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $interfere-in-dead2 + (func $interfere-in-dead2 (type $2) (local $x i32) (local $y i32) (block $block (unreachable) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $interfere-in-dead3 + (func $interfere-in-dead3 (type $2) (local $x i32) (local $y i32) (block $block (return) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $params (param $p i32) (param $q f32) - (local $x i32) ;; x is free, but others conflict + (func $params (type $3) (param $p i32) (param $q f32) + (local $x i32) (local $y i32) (local $z i32) (local $w i32) - (get_local $y) - (get_local $z) - (get_local $w) + (drop + (get_local $y) + ) + (drop + (get_local $z) + ) + (drop + (get_local $w) + ) ) - (func $interfere-in-dead + (func $interfere-in-dead (type $2) (local $x i32) (local $y i32) (block $block - (br_if $block (i32.const 0)) - (get_local $x) - (get_local $y) + (br_if $block + (i32.const 0) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $switch + (func $switch (type $2) (local $x i32) (local $y i32) (local $z i32) @@ -293,15 +477,23 @@ (br_table $switch-case$1 $switch-case$2 $switch-case$1 $switch-case$1 $switch$def (i32.const 100) ) - (get_local $x) ;; unreachable + (drop + (get_local $x) + ) + ) + (drop + (get_local $y) ) - (get_local $y) ) - (get_local $z) + (drop + (get_local $z) + ) + ) + (drop + (get_local $w) ) - (get_local $w) ) - (func $greedy-can-be-happy + (func $greedy-can-be-happy (type $2) (local $x1 i32) (local $x2 i32) (local $x3 i32) @@ -314,53 +506,101 @@ (i32.const 1) (if (i32.const 2) - (block - (set_local $x1 (i32.const 100)) - (set_local $y2 (i32.const 101)) - (get_local $x1) - (get_local $y2) + (block $block3 + (set_local $x1 + (i32.const 100) + ) + (set_local $y2 + (i32.const 101) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y2) + ) ) - (block - (set_local $x1 (i32.const 102)) - (set_local $y3 (i32.const 103)) - (get_local $x1) - (get_local $y3) + (block $block5 + (set_local $x1 + (i32.const 102) + ) + (set_local $y3 + (i32.const 103) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y3) + ) ) ) (if (i32.const 3) - (block - (set_local $x2 (i32.const 104)) - (set_local $y1 (i32.const 105)) - (get_local $x2) - (get_local $y1) + (block $block8 + (set_local $x2 + (i32.const 104) + ) + (set_local $y1 + (i32.const 105) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x2 (i32.const 106)) - (set_local $y3 (i32.const 107)) - (get_local $x2) - (get_local $y3) + (block $block10 + (set_local $x2 + (i32.const 106) + ) + (set_local $y3 + (i32.const 107) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y3) + ) ) ) ) (if (i32.const 4) - (block - (set_local $x3 (i32.const 108)) - (set_local $y1 (i32.const 109)) - (get_local $x3) - (get_local $y1) + (block $block13 + (set_local $x3 + (i32.const 108) + ) + (set_local $y1 + (i32.const 109) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x3 (i32.const 110)) - (set_local $y2 (i32.const 111)) - (get_local $x3) - (get_local $y2) + (block $block15 + (set_local $x3 + (i32.const 110) + ) + (set_local $y2 + (i32.const 111) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y2) + ) ) ) ) ) - (func $greedy-can-be-sad + (func $greedy-can-be-sad (type $2) (local $x1 i32) (local $y1 i32) (local $x2 i32) @@ -373,63 +613,110 @@ (i32.const 1) (if (i32.const 2) - (block - (set_local $x1 (i32.const 100)) - (set_local $y2 (i32.const 101)) - (get_local $x1) - (get_local $y2) + (block $block3 + (set_local $x1 + (i32.const 100) + ) + (set_local $y2 + (i32.const 101) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y2) + ) ) - (block - (set_local $x1 (i32.const 102)) - (set_local $y3 (i32.const 103)) - (get_local $x1) - (get_local $y3) + (block $block5 + (set_local $x1 + (i32.const 102) + ) + (set_local $y3 + (i32.const 103) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y3) + ) ) ) (if (i32.const 3) - (block - (set_local $x2 (i32.const 104)) - (set_local $y1 (i32.const 105)) - (get_local $x2) - (get_local $y1) + (block $block8 + (set_local $x2 + (i32.const 104) + ) + (set_local $y1 + (i32.const 105) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x2 (i32.const 106)) - (set_local $y3 (i32.const 107)) - (get_local $x2) - (get_local $y3) + (block $block10 + (set_local $x2 + (i32.const 106) + ) + (set_local $y3 + (i32.const 107) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y3) + ) ) ) ) (if (i32.const 4) - (block - (set_local $x3 (i32.const 108)) - (set_local $y1 (i32.const 109)) - (get_local $x3) - (get_local $y1) + (block $block13 + (set_local $x3 + (i32.const 108) + ) + (set_local $y1 + (i32.const 109) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x3 (i32.const 110)) - (set_local $y2 (i32.const 111)) - (get_local $x3) - (get_local $y2) + (block $block15 + (set_local $x3 + (i32.const 110) + ) + (set_local $y2 + (i32.const 111) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y2) + ) ) ) ) ) - (func $_memcpy (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (func $_memcpy (type $FUNCSIG$iiii) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) (local $i4 i32) (if (i32.ge_s (get_local $i3) (i32.const 4096) ) - (get_local $i1) - (get_local $i2) - (get_local $i3) - (return) + (drop + (get_local $i1) + ) ) (set_local $i4 (get_local $i1) @@ -445,7 +732,7 @@ (i32.const 3) ) ) - (block + (block $block2 (loop $while-out$0 $while-in$1 (if (i32.eqz @@ -456,7 +743,7 @@ ) (br $while-out$0) ) - (block + (block $block4 (if (i32.eqz (get_local $i3) @@ -502,7 +789,7 @@ ) (br $while-out$2) ) - (block + (block $block7 (i32.store (get_local $i1) (i32.load @@ -542,7 +829,7 @@ ) (br $while-out$4) ) - (block + (block $block9 (i32.store8 (get_local $i1) (i32.load8_s @@ -574,21 +861,22 @@ (get_local $i4) ) ) - (func $this-is-effective-i-tell-you (param $x i32) + (func $this-is-effective-i-tell-you (type $4) (param $x i32) (if (i32.const -1) - (block - (if ;; this is important for the bug + (block $block1 + (if (i32.const 0) (nop) ) - (set_local $x ;; this set is effective! + (set_local $x (i32.const 1) ) ) - (nop) ;; this is enough for the bug + (nop) + ) + (drop + (get_local $x) ) - (get_local $x) ;; this ends up with the wrong value in the test ) ) - diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index c24cf34e9..b8d97b921 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -28,35 +28,49 @@ (set_local $1 (i32.const 0) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $almost-interfere (type $2) (local $0 i32) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $redundant-copy (type $2) (local $0 i32) (set_local $0 (i32.const 0) ) - (get_local $0) - (get_local $0) + (nop) + (drop + (get_local $0) + ) ) (func $ineffective-store (type $2) (local $0 i32) - (i32.const 0) + (drop + (i32.const 0) + ) (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $block (type $2) (local $0 i32) @@ -65,7 +79,9 @@ (i32.const 0) ) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $see-both-sides (type $2) (local $0 i32) @@ -78,8 +94,12 @@ (i32.const 0) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $see-br-and-ignore-dead (type $2) (local $0 i32) @@ -88,11 +108,19 @@ ) (block $block (br $block) - (i32.const 0) + (drop + (i32.const 0) + ) + (drop + (get_local $0) + ) + (drop + (i32.const -1) + ) + ) + (drop (get_local $0) - (i32.const -1) ) - (get_local $0) ) (func $see-block-body (type $2) (local $0 i32) @@ -104,30 +132,46 @@ (set_local $1 (i32.const 0) ) - (get_local $1) + (drop + (get_local $1) + ) (br $block) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $zero-init (type $2) (local $0 i32) (local $1 i32) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $multi (type $2) (local $0 i32) (local $1 i32) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-else (type $2) (local $0 i32) (local $1 i32) (if (i32.const 0) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (func $if-else-parallel (type $2) @@ -138,13 +182,17 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) (block $block3 (set_local $0 (i32.const 1) ) - (get_local $0) + (drop + (get_local $0) + ) ) ) ) @@ -160,8 +208,12 @@ (i32.const 1) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-else-through (type $2) (local $0 i32) @@ -174,11 +226,19 @@ ) (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + ) + (drop + (get_local $0) + ) + (drop + (get_local $1) ) - (get_local $0) - (get_local $1) ) (func $if-through (type $2) (local $0 i32) @@ -191,10 +251,16 @@ ) (if (i32.const 0) - (i32.const 1) + (drop + (i32.const 1) + ) + ) + (drop + (get_local $0) + ) + (drop + (get_local $1) ) - (get_local $0) - (get_local $1) ) (func $if-through2 (type $2) (local $0 i32) @@ -208,8 +274,12 @@ (i32.const 1) ) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $if-through2 (type $2) (local $0 i32) @@ -220,8 +290,12 @@ (if (i32.const 0) (block $block1 - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -229,12 +303,16 @@ (local $0 i32) (local $1 i32) (if - (set_local $0 + (tee_local $0 (i32.const 0) ) (block $block1 - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -247,10 +325,14 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) ) ) - (get_local $1) + (drop + (get_local $1) + ) ) (func $if4 (type $2) (local $0 i32) @@ -260,13 +342,17 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 1) ) ) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $if5 (type $2) (local $0 i32) @@ -274,23 +360,31 @@ (if (i32.const 0) (block $block1 - (get_local $0) + (drop + (get_local $0) + ) (set_local $1 (i32.const 1) ) ) ) - (get_local $1) + (drop + (get_local $1) + ) ) (func $loop (type $2) (local $0 i32) (local $1 i32) (loop $out $in - (get_local $0) + (drop + (get_local $0) + ) (set_local $0 (i32.const 0) ) - (get_local $1) + (drop + (get_local $1) + ) (br $in) ) ) @@ -298,33 +392,51 @@ (local $0 i32) (block $block (br $block) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $interfere-in-dead2 (type $2) (local $0 i32) (block $block (unreachable) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $interfere-in-dead3 (type $2) (local $0 i32) (block $block (return) - (get_local $0) - (get_local $0) + (drop + (get_local $0) + ) + (drop + (get_local $0) + ) ) ) (func $params (type $3) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) - (get_local $2) - (get_local $3) - (get_local $4) + (drop + (get_local $2) + ) + (drop + (get_local $3) + ) + (drop + (get_local $4) + ) ) (func $interfere-in-dead (type $2) (local $0 i32) @@ -333,8 +445,12 @@ (br_if $block (i32.const 0) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (func $switch (type $2) @@ -347,13 +463,21 @@ (br_table $switch-case$1 $switch-case$2 $switch-case$1 $switch-case$1 $switch$def (i32.const 100) ) + (drop + (get_local $0) + ) + ) + (drop (get_local $0) ) - (get_local $0) ) - (get_local $1) + (drop + (get_local $1) + ) + ) + (drop + (get_local $2) ) - (get_local $2) ) (func $greedy-can-be-happy (type $2) (local $0 i32) @@ -371,8 +495,12 @@ (set_local $1 (i32.const 101) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block5 (set_local $0 @@ -381,8 +509,12 @@ (set_local $1 (i32.const 103) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) (if @@ -394,8 +526,12 @@ (set_local $1 (i32.const 105) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block10 (set_local $0 @@ -404,8 +540,12 @@ (set_local $1 (i32.const 107) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -418,8 +558,12 @@ (set_local $1 (i32.const 109) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block15 (set_local $0 @@ -428,8 +572,12 @@ (set_local $1 (i32.const 111) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) ) @@ -451,8 +599,12 @@ (set_local $1 (i32.const 101) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (block $block5 (set_local $0 @@ -461,8 +613,12 @@ (set_local $2 (i32.const 103) ) - (get_local $0) - (get_local $2) + (drop + (get_local $0) + ) + (drop + (get_local $2) + ) ) ) (if @@ -474,8 +630,12 @@ (set_local $0 (i32.const 105) ) - (get_local $1) - (get_local $0) + (drop + (get_local $1) + ) + (drop + (get_local $0) + ) ) (block $block10 (set_local $1 @@ -484,8 +644,12 @@ (set_local $2 (i32.const 107) ) - (get_local $1) - (get_local $2) + (drop + (get_local $1) + ) + (drop + (get_local $2) + ) ) ) ) @@ -498,8 +662,12 @@ (set_local $0 (i32.const 109) ) - (get_local $2) - (get_local $0) + (drop + (get_local $2) + ) + (drop + (get_local $0) + ) ) (block $block15 (set_local $2 @@ -508,8 +676,12 @@ (set_local $1 (i32.const 111) ) - (get_local $2) - (get_local $1) + (drop + (get_local $2) + ) + (drop + (get_local $1) + ) ) ) ) @@ -521,7 +693,9 @@ (get_local $2) (i32.const 4096) ) - (get_local $0) + (drop + (get_local $0) + ) ) (set_local $3 (get_local $0) @@ -680,7 +854,9 @@ ) (nop) ) - (get_local $0) + (drop + (get_local $0) + ) ) (func $prefer-remove-copies1 (type $2) (local $0 i32) @@ -688,12 +864,16 @@ (set_local $0 (i32.const 0) ) - (get_local $0) + (nop) (set_local $1 (i32.const 1) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) (func $prefer-remove-copies1 (type $2) (local $0 i32) @@ -701,11 +881,15 @@ (set_local $1 (i32.const 0) ) - (get_local $1) + (nop) (set_local $0 (i32.const 1) ) - (get_local $0) - (get_local $1) + (drop + (get_local $0) + ) + (drop + (get_local $1) + ) ) ) diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast index a7cd6adc1..568b3741c 100644 --- a/test/passes/coalesce-locals.wast +++ b/test/passes/coalesce-locals.wast @@ -1,288 +1,472 @@ (module (memory 10) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $2 (func)) + (type $3 (func (param i32 f32))) + (type $4 (func (param i32))) (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32)) - (table) - (func $nothing-to-do + (func $nothing-to-do (type $2) (local $x i32) + (nop) ) - (func $merge + (func $merge (type $2) (local $x i32) (local $y i32) + (nop) ) - (func $leave-type + (func $leave-type (type $2) (local $x i32) (local $y f32) + (nop) ) - (func $leave-interfere + (func $leave-interfere (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 0)) - (get_local $x) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $almost-interfere + (func $almost-interfere (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (get_local $x) - (set_local $y (i32.const 0)) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) ) - (func $redundant-copy + (func $redundant-copy (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (get_local $x)) - (get_local $y) + (set_local $x + (i32.const 0) + ) + (set_local $y + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $ineffective-store + (func $ineffective-store (type $2) (local $x i32) - (set_local $x (i32.const 0)) - (set_local $x (i32.const 0)) - (get_local $x) + (set_local $x + (i32.const 0) + ) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) ) - (func $block + (func $block (type $2) (local $x i32) - (block - (set_local $x (i32.const 0)) + (block $block0 + (set_local $x + (i32.const 0) + ) + ) + (drop + (get_local $x) ) - (get_local $x) ) - (func $see-both-sides + (func $see-both-sides (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (block - (set_local $y (i32.const 0)) + (set_local $x + (i32.const 0) + ) + (block $block0 + (set_local $y + (i32.const 0) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $see-br-and-ignore-dead + (func $see-br-and-ignore-dead (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (block $block (br $block) - (set_local $y (i32.const 0)) - (get_local $y) - (set_local $x (i32.const -1)) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) + (set_local $x + (i32.const -1) + ) + ) + (drop + (get_local $x) ) - (get_local $x) ) - (func $see-block-body + (func $see-block-body (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (block $block - (set_local $y (i32.const 0)) - (get_local $y) + (set_local $y + (i32.const 0) + ) + (drop + (get_local $y) + ) (br $block) ) - (get_local $x) + (drop + (get_local $x) + ) ) - (func $zero-init + (func $zero-init (type $2) (local $x i32) (local $y i32) - (get_local $x) - (get_local $y) - ) - (func $multi - (local $x i32) ;; x is free, but y and z conflict - (local $y i32) - (local $z i32) - (get_local $y) - (get_local $z) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $if-else + (func $multi (type $2) (local $x i32) (local $y i32) - (if ;; x and y conflict when they are merged into their shared predecessor - (i32.const 0) - (get_local $x) + (local $z i32) + (drop (get_local $y) ) + (drop + (get_local $z) + ) ) - (func $if-else-parallel + (func $if-else (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) + (drop (get_local $x) ) - (block - (set_local $y (i32.const 1)) + (drop (get_local $y) ) ) ) - (func $if-else-after + (func $if-else-parallel (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + ) + (block $block3 + (set_local $y + (i32.const 1) + ) + (drop + (get_local $y) + ) + ) ) - (get_local $x) - (get_local $y) ) - (func $if-else-through + (func $if-else-after (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $if-through + (func $if-else-through (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) - (set_local $y (i32.const 1)) + (set_local $x + (i32.const 0) + ) + (set_local $y + (i32.const 1) + ) (if (i32.const 0) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) + ) + (func $if-through (type $2) + (local $x i32) + (local $y i32) + (set_local $x + (i32.const 0) + ) + (set_local $y (i32.const 1) ) - (get_local $x) - (get_local $y) + (if + (i32.const 0) + (drop + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) - (func $if-through2 + (func $if-through2 (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (if (i32.const 0) - (set_local $y (i32.const 1)) + (set_local $y + (i32.const 1) + ) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) ) - (get_local $x) - (get_local $y) ) - (func $if-through2 + (func $if-through2 (type $2) (local $x i32) (local $y i32) - (set_local $x (i32.const 0)) + (set_local $x + (i32.const 0) + ) (if (i32.const 0) - (block - (get_local $x) - (get_local $y) + (block $block1 + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) ) - (func $if2 + (func $if2 (type $2) (local $x i32) (local $y i32) (if - (set_local $x (i32.const 0)) - (block - (get_local $x) - (get_local $y) + (tee_local $x + (i32.const 0) + ) + (block $block1 + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) ) - (func $if3 + (func $if3 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) - (get_local $x) + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $if4 + (func $if4 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (set_local $x (i32.const 0)) - (get_local $x) - (set_local $y (i32.const 1)) ;; we might not go through here, but it's ok + (block $block1 + (set_local $x + (i32.const 0) + ) + (drop + (get_local $x) + ) + (set_local $y + (i32.const 1) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $if5 + (func $if5 (type $2) (local $x i32) (local $y i32) (if (i32.const 0) - (block - (get_local $x) ;; we might go through here, and it causes interference - (set_local $y (i32.const 1)) + (block $block1 + (drop + (get_local $x) + ) + (set_local $y + (i32.const 1) + ) ) ) - (get_local $y) + (drop + (get_local $y) + ) ) - (func $loop + (func $loop (type $2) (local $x i32) (local $y i32) (loop $out $in - (get_local $x) - (set_local $x (i32.const 0)) ;; effective, due to looping - (get_local $y) + (drop + (get_local $x) + ) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $y) + ) (br $in) ) ) - (func $interfere-in-dead + (func $interfere-in-dead (type $2) (local $x i32) (local $y i32) (block $block (br $block) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $interfere-in-dead2 + (func $interfere-in-dead2 (type $2) (local $x i32) (local $y i32) (block $block (unreachable) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $interfere-in-dead3 + (func $interfere-in-dead3 (type $2) (local $x i32) (local $y i32) (block $block (return) - (get_local $x) - (get_local $y) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $params (param $p i32) (param $q f32) - (local $x i32) ;; x is free, but others conflict + (func $params (type $3) (param $p i32) (param $q f32) + (local $x i32) (local $y i32) (local $z i32) (local $w i32) - (get_local $y) - (get_local $z) - (get_local $w) + (drop + (get_local $y) + ) + (drop + (get_local $z) + ) + (drop + (get_local $w) + ) ) - (func $interfere-in-dead + (func $interfere-in-dead (type $2) (local $x i32) (local $y i32) (block $block - (br_if $block (i32.const 0)) - (get_local $x) - (get_local $y) + (br_if $block + (i32.const 0) + ) + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) ) - (func $switch + (func $switch (type $2) (local $x i32) (local $y i32) (local $z i32) @@ -293,15 +477,23 @@ (br_table $switch-case$1 $switch-case$2 $switch-case$1 $switch-case$1 $switch$def (i32.const 100) ) - (get_local $x) ;; unreachable + (drop + (get_local $x) + ) + ) + (drop + (get_local $y) ) - (get_local $y) ) - (get_local $z) + (drop + (get_local $z) + ) + ) + (drop + (get_local $w) ) - (get_local $w) ) - (func $greedy-can-be-happy + (func $greedy-can-be-happy (type $2) (local $x1 i32) (local $x2 i32) (local $x3 i32) @@ -314,53 +506,101 @@ (i32.const 1) (if (i32.const 2) - (block - (set_local $x1 (i32.const 100)) - (set_local $y2 (i32.const 101)) - (get_local $x1) - (get_local $y2) + (block $block3 + (set_local $x1 + (i32.const 100) + ) + (set_local $y2 + (i32.const 101) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y2) + ) ) - (block - (set_local $x1 (i32.const 102)) - (set_local $y3 (i32.const 103)) - (get_local $x1) - (get_local $y3) + (block $block5 + (set_local $x1 + (i32.const 102) + ) + (set_local $y3 + (i32.const 103) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y3) + ) ) ) (if (i32.const 3) - (block - (set_local $x2 (i32.const 104)) - (set_local $y1 (i32.const 105)) - (get_local $x2) - (get_local $y1) + (block $block8 + (set_local $x2 + (i32.const 104) + ) + (set_local $y1 + (i32.const 105) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x2 (i32.const 106)) - (set_local $y3 (i32.const 107)) - (get_local $x2) - (get_local $y3) + (block $block10 + (set_local $x2 + (i32.const 106) + ) + (set_local $y3 + (i32.const 107) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y3) + ) ) ) ) (if (i32.const 4) - (block - (set_local $x3 (i32.const 108)) - (set_local $y1 (i32.const 109)) - (get_local $x3) - (get_local $y1) + (block $block13 + (set_local $x3 + (i32.const 108) + ) + (set_local $y1 + (i32.const 109) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x3 (i32.const 110)) - (set_local $y2 (i32.const 111)) - (get_local $x3) - (get_local $y2) + (block $block15 + (set_local $x3 + (i32.const 110) + ) + (set_local $y2 + (i32.const 111) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y2) + ) ) ) ) ) - (func $greedy-can-be-sad + (func $greedy-can-be-sad (type $2) (local $x1 i32) (local $y1 i32) (local $x2 i32) @@ -373,63 +613,110 @@ (i32.const 1) (if (i32.const 2) - (block - (set_local $x1 (i32.const 100)) - (set_local $y2 (i32.const 101)) - (get_local $x1) - (get_local $y2) + (block $block3 + (set_local $x1 + (i32.const 100) + ) + (set_local $y2 + (i32.const 101) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y2) + ) ) - (block - (set_local $x1 (i32.const 102)) - (set_local $y3 (i32.const 103)) - (get_local $x1) - (get_local $y3) + (block $block5 + (set_local $x1 + (i32.const 102) + ) + (set_local $y3 + (i32.const 103) + ) + (drop + (get_local $x1) + ) + (drop + (get_local $y3) + ) ) ) (if (i32.const 3) - (block - (set_local $x2 (i32.const 104)) - (set_local $y1 (i32.const 105)) - (get_local $x2) - (get_local $y1) + (block $block8 + (set_local $x2 + (i32.const 104) + ) + (set_local $y1 + (i32.const 105) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x2 (i32.const 106)) - (set_local $y3 (i32.const 107)) - (get_local $x2) - (get_local $y3) + (block $block10 + (set_local $x2 + (i32.const 106) + ) + (set_local $y3 + (i32.const 107) + ) + (drop + (get_local $x2) + ) + (drop + (get_local $y3) + ) ) ) ) (if (i32.const 4) - (block - (set_local $x3 (i32.const 108)) - (set_local $y1 (i32.const 109)) - (get_local $x3) - (get_local $y1) + (block $block13 + (set_local $x3 + (i32.const 108) + ) + (set_local $y1 + (i32.const 109) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y1) + ) ) - (block - (set_local $x3 (i32.const 110)) - (set_local $y2 (i32.const 111)) - (get_local $x3) - (get_local $y2) + (block $block15 + (set_local $x3 + (i32.const 110) + ) + (set_local $y2 + (i32.const 111) + ) + (drop + (get_local $x3) + ) + (drop + (get_local $y2) + ) ) ) ) ) - (func $_memcpy (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (func $_memcpy (type $FUNCSIG$iiii) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) (local $i4 i32) (if (i32.ge_s (get_local $i3) (i32.const 4096) ) - (get_local $i1) - (get_local $i2) - (get_local $i3) - (return) + (drop + (get_local $i1) + ) ) (set_local $i4 (get_local $i1) @@ -445,7 +732,7 @@ (i32.const 3) ) ) - (block + (block $block2 (loop $while-out$0 $while-in$1 (if (i32.eqz @@ -456,7 +743,7 @@ ) (br $while-out$0) ) - (block + (block $block4 (if (i32.eqz (get_local $i3) @@ -502,7 +789,7 @@ ) (br $while-out$2) ) - (block + (block $block7 (i32.store (get_local $i1) (i32.load @@ -542,7 +829,7 @@ ) (br $while-out$4) ) - (block + (block $block9 (i32.store8 (get_local $i1) (i32.load8_s @@ -574,41 +861,62 @@ (get_local $i4) ) ) - (func $this-is-effective-i-tell-you (param $x i32) + (func $this-is-effective-i-tell-you (type $4) (param $x i32) (if (i32.const -1) - (block - (if ;; this is important for the bug + (block $block1 + (if (i32.const 0) (nop) ) - (set_local $x ;; this set is effective! + (set_local $x (i32.const 1) ) ) - (nop) ;; this is enough for the bug + (nop) + ) + (drop + (get_local $x) ) - (get_local $x) ;; this ends up with the wrong value in the test ) - (func $prefer-remove-copies1 + (func $prefer-remove-copies1 (type $2) (local $y i32) (local $z i32) - (local $x i32) ;; y and z interfere, x can be with either, but has a copy which should be prefered - (set_local $x (i32.const 0)) - (set_local $y (get_local $x)) - (set_local $z (i32.const 1)) - (get_local $y) - (get_local $z) - ) - (func $prefer-remove-copies1 + (local $x i32) + (set_local $x + (i32.const 0) + ) + (set_local $y + (get_local $x) + ) + (set_local $z + (i32.const 1) + ) + (drop + (get_local $y) + ) + (drop + (get_local $z) + ) + ) + (func $prefer-remove-copies1 (type $2) (local $y i32) (local $z i32) - (local $x i32) ;; y and z interfere, x can be with either, but has a copy which should be prefered - (set_local $x (i32.const 0)) - (set_local $z (get_local $x)) - (set_local $y (i32.const 1)) - (get_local $y) - (get_local $z) + (local $x i32) + (set_local $x + (i32.const 0) + ) + (set_local $z + (get_local $x) + ) + (set_local $y + (i32.const 1) + ) + (drop + (get_local $y) + ) + (drop + (get_local $z) + ) ) ) - diff --git a/test/passes/dce.txt b/test/passes/dce.txt index 9ae5977b6..92fea5c28 100644 --- a/test/passes/dce.txt +++ b/test/passes/dce.txt @@ -31,7 +31,9 @@ (br_if $out (i32.const 3) ) - (i32.const 0) + (drop + (i32.const 0) + ) ) (if (i32.const 0) @@ -108,8 +110,12 @@ (if (i32.const 0) (block $block15 - (i32.const 10) - (i32.const 42) + (drop + (i32.const 10) + ) + (drop + (i32.const 42) + ) (unreachable) ) ) @@ -137,7 +143,9 @@ (if (i32.const 1) (block - (i32.const 123) + (drop + (i32.const 123) + ) (unreachable) ) ) @@ -152,22 +160,30 @@ (if (i32.const -1) (block - (i32.const 123) - (i32.const 456) + (drop + (i32.const 123) + ) + (drop + (i32.const 456) + ) (unreachable) ) ) (if (i32.const -2) (block - (i32.const 139) + (drop + (i32.const 139) + ) (unreachable) ) ) (if (i32.const -3) (block - (i32.const 246) + (drop + (i32.const 246) + ) (unreachable) ) ) @@ -181,12 +197,16 @@ ) (if (i32.const 22) - (unreachable) + (drop + (unreachable) + ) ) (if (i32.const 33) (block - (i32.const 0) + (drop + (i32.const 0) + ) (unreachable) ) ) @@ -200,17 +220,25 @@ ) (if (i32.const 66) - (unreachable) + (drop + (unreachable) + ) ) (if (i32.const 77) - (unreachable) + (drop + (unreachable) + ) ) (if (i32.const 88) - (block - (i32.const 0) - (unreachable) + (drop + (block + (drop + (i32.const 0) + ) + (unreachable) + ) ) ) (if @@ -219,29 +247,45 @@ ) (if (i32.const 100) - (block - (i32.const 123) - (i32.const 456) - (unreachable) + (drop + (block + (drop + (i32.const 123) + ) + (drop + (i32.const 456) + ) + (unreachable) + ) ) ) (if (i32.const 101) - (block - (i32.const 123) - (unreachable) + (drop + (block + (drop + (i32.const 123) + ) + (unreachable) + ) ) ) (if (i32.const 102) - (unreachable) + (drop + (unreachable) + ) + ) + (drop + (i32.const 1337) ) - (i32.const 1337) ) (func $killer (type $1) (unreachable) ) (func $target (type $1) - (i32.const 2000) + (drop + (i32.const 2000) + ) ) ) diff --git a/test/passes/dce.wast b/test/passes/dce.wast index dcec20cc1..c7eb1145e 100644 --- a/test/passes/dce.wast +++ b/test/passes/dce.wast @@ -1,204 +1,384 @@ (module (memory 10) - (type $ii (func (param i32) (param i32))) + (type $ii (func (param i32 i32))) + (type $1 (func)) (table $call-me) - (func $call-me (param i32) (param i32) + (func $call-me (type $ii) (param $0 i32) (param $1 i32) + (nop) ) - (func $code-to-kill + (func $code-to-kill (type $1) (local $x i32) (block $out - (br $out) ;; kill everything after this - (i32.const 0) - (if (i32.const 1) - (i32.const 2) + (br $out) + (drop + (i32.const 0) + ) + (if + (i32.const 1) + (drop + (i32.const 2) + ) + ) + (br_table $out $out $out $out + (i32.const 3) ) - (br_table $out $out $out $out (i32.const 3)) (call $code-to-kill) ) - (if (i32.const 0) + (if + (i32.const 0) (block $out (unreachable) - (i32.const 0) + (drop + (i32.const 0) + ) ) ) - (if (i32.const 0) + (if + (i32.const 0) (block $out (return) - (i32.const 0) + (drop + (i32.const 0) + ) ) ) (block $out - (br_table $out $out $out $out (i32.const 4)) - (i32.const 0) + (br_table $out $out $out $out + (i32.const 4) + ) + (drop + (i32.const 0) + ) ) (block $out - (br_if $out (i32.const 3)) ;; but not after this - (i32.const 0) + (br_if $out + (i32.const 3) + ) + (drop + (i32.const 0) + ) ) - (if (i32.const 0) - (block - (if (i32.const 0) ;; if that is unreachable both ways + (if + (i32.const 0) + (block $block4 + (if + (i32.const 0) (block $out (unreachable) - (i32.const 0) + (drop + (i32.const 0) + ) ) (block $out (unreachable) - (i32.const 0) + (drop + (i32.const 0) + ) ) ) - (i32.const 0) + (drop + (i32.const 0) + ) ) ) - (if (i32.const 0) + (if + (i32.const 0) (block $out - (br $out (unreachable)) - (i32.const 0) + (br $out + (unreachable) + ) + (drop + (i32.const 0) + ) ) ) - (if (i32.const 0) + (if + (i32.const 0) (block $out - (br_if $out (unreachable) (i32.const 0)) - (i32.const 0) + (br_if $out + (unreachable) + (i32.const 0) + ) + (drop + (i32.const 0) + ) ) ) - (if (i32.const 0) + (if + (i32.const 0) (block $out - (br_if $out (unreachable) (unreachable)) - (i32.const 0) + (br_if $out + (unreachable) + (unreachable) + ) + (drop + (i32.const 0) + ) ) ) (block $out (block $in - (br_if $out (i32.const 1)) + (br_if $out + (i32.const 1) + ) ) (unreachable) ) - (if (i32.const 0) - (block + (if + (i32.const 0) + (block $block11 (block $out (block $in - (br_if $in (i32.const 1)) + (br_if $in + (i32.const 1) + ) ) (unreachable) ) - (i32.const 10) + (drop + (i32.const 10) + ) ) ) (block $out (block $in - (br_table $out $in (i32.const 1)) + (br_table $out $in + (i32.const 1) + ) ) (unreachable) ) (block $out (block $in - (br_table $in $out (i32.const 1)) + (br_table $in $out + (i32.const 1) + ) ) (unreachable) ) - (if (i32.const 0) - (block + (if + (i32.const 0) + (block $block13 (block $out (block $in - (br_table $in $in (i32.const 1)) + (br_table $in $in + (i32.const 1) + ) ) (unreachable) ) - (i32.const 10) + (drop + (i32.const 10) + ) ) ) - (if (i32.const 0) - (block - (i32.const 10) - (i32.const 42) + (if + (i32.const 0) + (block $block15 + (drop + (i32.const 10) + ) + (drop + (i32.const 42) + ) (unreachable) - (return (unreachable)) + (return + (unreachable) + ) (unreachable) (return) ) ) - (if (i32.const 0) - (loop (unreachable)) + (if + (i32.const 0) + (loop $loop-out17 $loop-in18 + (unreachable) + ) ) (loop $out $in - (br_if $out (i32.const 1)) + (br_if $out + (i32.const 1) + ) (unreachable) ) - (if (i32.const 0) - (block + (if + (i32.const 0) + (block $block20 (loop $out $in - (br_if $in (i32.const 1)) + (br_if $in + (i32.const 1) + ) (unreachable) ) - (i32.const 10) + (drop + (i32.const 10) + ) ) ) - (if (i32.const 1) - (call $call-me (i32.const 123) (unreachable)) + (if + (i32.const 1) + (call $call-me + (i32.const 123) + (unreachable) + ) ) - (if (i32.const 2) - (call $call-me (unreachable) (i32.const 0)) + (if + (i32.const 2) + (call $call-me + (unreachable) + (i32.const 0) + ) ) - (if (i32.const 3) - (call $call-me (unreachable) (unreachable)) + (if + (i32.const 3) + (call $call-me + (unreachable) + (unreachable) + ) ) - (if (i32.const -1) - (call_indirect $ii (i32.const 123) (i32.const 456) (unreachable)) + (if + (i32.const -1) + (call_indirect $ii + (i32.const 123) + (i32.const 456) + (unreachable) + ) ) - (if (i32.const -2) - (call_indirect $ii (i32.const 139) (unreachable) (i32.const 0)) + (if + (i32.const -2) + (call_indirect $ii + (i32.const 139) + (unreachable) + (i32.const 0) + ) ) - (if (i32.const -3) - (call_indirect $ii (i32.const 246) (unreachable) (unreachable)) + (if + (i32.const -3) + (call_indirect $ii + (i32.const 246) + (unreachable) + (unreachable) + ) ) - (if (i32.const -4) - (call_indirect $ii (unreachable) (unreachable) (unreachable)) + (if + (i32.const -4) + (call_indirect $ii + (unreachable) + (unreachable) + (unreachable) + ) ) - (if (i32.const 11) - (set_local $x (unreachable)) + (if + (i32.const 11) + (set_local $x + (unreachable) + ) ) - (if (i32.const 22) - (i32.load (unreachable)) + (if + (i32.const 22) + (drop + (i32.load + (unreachable) + ) + ) ) - (if (i32.const 33) - (i32.store (i32.const 0) (unreachable)) + (if + (i32.const 33) + (i32.store + (i32.const 0) + (unreachable) + ) ) - (if (i32.const 44) - (i32.store (unreachable) (i32.const 0)) + (if + (i32.const 44) + (i32.store + (unreachable) + (i32.const 0) + ) ) - (if (i32.const 55) - (i32.store (unreachable) (unreachable)) + (if + (i32.const 55) + (i32.store + (unreachable) + (unreachable) + ) + ) + (if + (i32.const 66) + (drop + (i32.eqz + (unreachable) + ) + ) ) - (if (i32.const 66) - (i32.eqz (unreachable)) + (if + (i32.const 77) + (drop + (i32.add + (unreachable) + (i32.const 0) + ) + ) ) - (if (i32.const 77) - (i32.add (unreachable) (i32.const 0)) + (if + (i32.const 88) + (drop + (i32.add + (i32.const 0) + (unreachable) + ) + ) ) - (if (i32.const 88) - (i32.add (i32.const 0) (unreachable)) + (if + (i32.const 99) + (i32.add + (unreachable) + (unreachable) + ) ) - (if (i32.const 99) - (i32.add (unreachable) (unreachable)) + (if + (i32.const 100) + (drop + (select + (i32.const 123) + (i32.const 456) + (unreachable) + ) + ) ) - (if (i32.const 100) - (select (i32.const 123) (i32.const 456) (unreachable)) + (if + (i32.const 101) + (drop + (select + (i32.const 123) + (unreachable) + (i32.const 456) + ) + ) ) - (if (i32.const 101) - (select (i32.const 123) (unreachable) (i32.const 456)) + (if + (i32.const 102) + (drop + (select + (unreachable) + (i32.const 123) + (i32.const 456) + ) + ) ) - (if (i32.const 102) - (select (unreachable) (i32.const 123) (i32.const 456)) + (drop + (i32.const 1337) ) - (i32.const 1337) ) - (func $killer + (func $killer (type $1) (unreachable) - (i32.const 1000) + (drop + (i32.const 1000) + ) ) - (func $target - (i32.const 2000) + (func $target (type $1) + (drop + (i32.const 2000) + ) ) ) - diff --git a/test/passes/drop-return-values.txt b/test/passes/drop-return-values.txt deleted file mode 100644 index 81ca99327..000000000 --- a/test/passes/drop-return-values.txt +++ /dev/null @@ -1,32 +0,0 @@ -(module - (memory 10) - (type $0 (func)) - (func $0 (type $0) - (local $x i32) - (local $1 i32) - (i32.add - (block - (set_local $x - (i32.const 10) - ) - (get_local $x) - ) - (i32.const 20) - ) - (i32.add - (block - (block - (set_local $1 - (i32.const 40) - ) - (i32.store - (i32.const 30) - (get_local $1) - ) - ) - (get_local $1) - ) - (i32.const 50) - ) - ) -) diff --git a/test/passes/drop-return-values.wast b/test/passes/drop-return-values.wast deleted file mode 100644 index 76463cc8e..000000000 --- a/test/passes/drop-return-values.wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (memory 10) - (func - (local $x i32) - (i32.add (set_local $x (i32.const 10)) (i32.const 20)) - (i32.add (i32.store (i32.const 30) (i32.const 40)) (i32.const 50)) - ) -) - diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index a7511fc5c..022d45052 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -9,7 +9,9 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other (type $0) (nop) @@ -19,17 +21,23 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other (type $0) - (i32.const 1) + (drop + (i32.const 1) + ) ) ) (module @@ -81,10 +89,14 @@ (type $2 (func)) (type $3 (func (param i32))) (func $keep4-similar-but-func-sig-differs (type $2) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other1 (type $3) (param $i i32) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other2 (type $T) (result i32) (i32.const 0) @@ -98,7 +110,9 @@ (type $S (func (result i32))) (type $1 (func (param i32))) (func $keep2-similar-but-func-sig-differs (type $1) (param $i i32) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other2 (type $S) (result i32) (i32.const 0) @@ -199,15 +213,21 @@ (type $0 (func)) (func $keep2 (type $0) (block $foo - (br $foo - (i32.const 0) + (block $block0 + (drop + (i32.const 0) + ) + (br $foo) ) ) ) (func $other (type $0) (block $bar - (br $bar - (i32.const 1) + (block $block0 + (drop + (i32.const 1) + ) + (br $bar) ) ) ) @@ -272,18 +292,22 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (block $foo - (br_table $foo $foo - (i32.const 0) - (i32.const 0) + (drop + (block $foo + (br_table $foo $foo + (i32.const 0) + (i32.const 0) + ) ) ) ) (func $other (type $0) - (block $bar - (br_table $bar $bar - (i32.const 0) - (i32.const 1) + (drop + (block $bar + (br_table $bar $bar + (i32.const 0) + (i32.const 1) + ) ) ) ) @@ -410,7 +434,9 @@ (type $0 (func)) (func $erase-even-locals-with-different-names (type $0) (local $i i32) - (get_local $i) + (drop + (get_local $i) + ) ) ) (module @@ -418,11 +444,15 @@ (type $0 (func)) (func $keep2 (type $0) (local $i i32) - (get_local $i) + (drop + (get_local $i) + ) ) (func $other (type $0) (local $j i64) - (get_local $j) + (drop + (get_local $j) + ) ) ) (module @@ -471,11 +501,15 @@ (memory 10) (type $0 (func)) (func $erase (type $0) - (i32.load - (i32.const 0) + (drop + (i32.load + (i32.const 0) + ) ) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) ) @@ -483,13 +517,17 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.load16_s offset=3 - (i32.const 0) + (drop + (i32.load16_s offset=3 + (i32.const 0) + ) ) ) (func $other (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) ) @@ -497,13 +535,17 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.load8_s offset=3 - (i32.const 0) + (drop + (i32.load8_s offset=3 + (i32.const 0) + ) ) ) (func $other (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) ) @@ -511,13 +553,17 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.load8_s align=2 - (i32.const 0) + (drop + (i32.load8_s align=2 + (i32.const 0) + ) ) ) (func $other (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) ) @@ -525,13 +571,17 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) (func $other (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 1) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 1) + ) ) ) ) @@ -539,13 +589,17 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.load8_u offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_u offset=3 align=2 + (i32.const 0) + ) ) ) (func $other (type $0) - (i32.load8_s offset=3 align=2 - (i32.const 0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) ) ) ) @@ -647,68 +701,94 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other (type $0) - (i64.const 0) + (drop + (i64.const 0) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other (type $0) - (f32.const 0) + (drop + (f32.const 0) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i32.const 0) + (drop + (i32.const 0) + ) ) (func $other (type $0) - (f64.const 0) + (drop + (f64.const 0) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (i64.const 0) + (drop + (i64.const 0) + ) ) (func $other (type $0) - (i64.const 1) + (drop + (i64.const 1) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.const 0.10000000149011612) + (drop + (f32.const 0.10000000149011612) + ) ) (func $other (type $0) - (f32.const -0.10000000149011612) + (drop + (f32.const -0.10000000149011612) + ) ) ) (module (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f64.const 0.1) + (drop + (f64.const 0.1) + ) ) (func $other (type $0) - (f64.const 0.2) + (drop + (f64.const 0.2) + ) ) ) (module (memory 0) (type $0 (func)) (func $erase (type $0) - (f32.abs - (f32.const 0) + (drop + (f32.abs + (f32.const 0) + ) ) ) ) @@ -716,13 +796,17 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.abs - (f32.const 0) + (drop + (f32.abs + (f32.const 0) + ) ) ) (func $other (type $0) - (f32.abs - (f32.const 1) + (drop + (f32.abs + (f32.const 1) + ) ) ) ) @@ -730,13 +814,17 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.abs - (f32.const 0) + (drop + (f32.abs + (f32.const 0) + ) ) ) (func $other (type $0) - (f32.neg - (f32.const 0) + (drop + (f32.neg + (f32.const 0) + ) ) ) ) @@ -744,9 +832,11 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (f32.add - (f32.const 0) - (f32.const 0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) ) ) ) @@ -754,15 +844,19 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.add - (f32.const 0) - (f32.const 0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) ) ) (func $other (type $0) - (f32.add - (f32.const 0) - (f32.const 1) + (drop + (f32.add + (f32.const 0) + (f32.const 1) + ) ) ) ) @@ -770,15 +864,19 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.add - (f32.const 0) - (f32.const 0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) ) ) (func $other (type $0) - (f32.add - (f32.const 1) - (f32.const 0) + (drop + (f32.add + (f32.const 1) + (f32.const 0) + ) ) ) ) @@ -786,15 +884,19 @@ (memory 0) (type $0 (func)) (func $keep2 (type $0) - (f32.add - (f32.const 0) - (f32.const 0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) ) ) (func $other (type $0) - (f32.sub - (f32.const 0) - (f32.const 0) + (drop + (f32.sub + (f32.const 0) + (f32.const 0) + ) ) ) ) @@ -802,10 +904,12 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (select - (i32.const 0) - (i32.const 0) - (i32.const 0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) ) ) ) @@ -813,17 +917,21 @@ (memory 0) (type $0 (func)) (func $keep (type $0) - (select - (i32.const 0) - (i32.const 0) - (i32.const 0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) ) ) (func $other (type $0) - (select - (i32.const 1) - (i32.const 0) - (i32.const 0) + (drop + (select + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) ) ) ) @@ -831,17 +939,21 @@ (memory 0) (type $0 (func)) (func $keep (type $0) - (select - (i32.const 0) - (i32.const 0) - (i32.const 0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) ) ) (func $other (type $0) - (select - (i32.const 0) - (i32.const 2) - (i32.const 0) + (drop + (select + (i32.const 0) + (i32.const 2) + (i32.const 0) + ) ) ) ) @@ -849,17 +961,21 @@ (memory 0) (type $0 (func)) (func $keep (type $0) - (select - (i32.const 0) - (i32.const 0) - (i32.const 0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) ) ) (func $other (type $0) - (select - (i32.const 0) - (i32.const 0) - (i32.const 3) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 3) + ) ) ) ) @@ -897,15 +1013,19 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (current_memory) + (drop + (current_memory) + ) ) ) (module (memory 0) (type $0 (func)) (func $erase (type $0) - (grow_memory - (i32.const 10) + (drop + (grow_memory + (i32.const 10) + ) ) ) ) @@ -913,13 +1033,17 @@ (memory 0) (type $0 (func)) (func $keep (type $0) - (grow_memory - (i32.const 10) + (drop + (grow_memory + (i32.const 10) + ) ) ) (func $other (type $0) - (grow_memory - (i32.const 11) + (drop + (grow_memory + (i32.const 11) + ) ) ) ) @@ -927,11 +1051,15 @@ (memory 0) (type $0 (func)) (func $keep (type $0) - (current_memory) + (drop + (current_memory) + ) ) (func $other (type $0) - (grow_memory - (i32.const 10) + (drop + (grow_memory + (i32.const 10) + ) ) ) ) diff --git a/test/passes/duplicate-function-elimination.wast b/test/passes/duplicate-function-elimination.wast index 8d1a85cd5..1e0aaaf33 100644 --- a/test/passes/duplicate-function-elimination.wast +++ b/test/passes/duplicate-function-elimination.wast @@ -1,87 +1,118 @@ (module - (func $erase + (memory 0) + (type $0 (func)) + (func $erase (type $0) (nop) ) - (func $other + (func $other (type $0) (nop) ) ) (module - (func $keep2 - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.const 0) + ) ) - (func $other + (func $other (type $0) (nop) ) ) (module - (func $erase - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (i32.const 0) + ) ) - (func $other - (i32.const 0) + (func $other (type $0) + (drop + (i32.const 0) + ) ) ) (module - (func $keep2 - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.const 0) + ) ) - (func $other - (i32.const 1) + (func $other (type $0) + (drop + (i32.const 1) + ) ) ) (module + (memory 0) + (start $other) + (type $0 (func)) (export "keep2" $keep2) (export "other" $other) - (start $other) (table $keep2 $other $caller) - (func $keep2 + (func $keep2 (type $0) (nop) ) - (func $other + (func $other (type $0) (nop) ) - (func $caller + (func $caller (type $0) (call $keep2) (call $other) ) ) (module - (func $keep2-after-two-passes + (memory 0) + (type $0 (func)) + (func $keep2-after-two-passes (type $0) (nop) ) - (func $other + (func $other (type $0) (nop) ) - (func $keep-caller + (func $keep-caller (type $0) (call $keep2-after-two-passes) ) - (func $other-caller + (func $other-caller (type $0) (call $other) ) ) (module - (func $keep-4 + (memory 0) + (type $0 (func)) + (func $keep-4 (type $0) (nop) ) - (func $other + (func $other (type $0) (unreachable) ) - (func $keep-caller + (func $keep-caller (type $0) (call $keep-4) ) - (func $other-caller + (func $other-caller (type $0) (call $other) ) ) (module - (type T (func (result i32))) - (type S (func (result i32))) - (func $keep4-similar-but-func-sig-differs - (i32.const 0) + (memory 0) + (type $T (func (result i32))) + (type $S (func (result i32))) + (type $2 (func)) + (type $3 (func (param i32))) + (func $keep4-similar-but-func-sig-differs (type $2) + (drop + (i32.const 0) + ) ) - (func $other1 (param $i i32) - (i32.const 0) + (func $other1 (type $3) (param $i i32) + (drop + (i32.const 0) + ) ) (func $other2 (type $T) (result i32) (i32.const 0) @@ -91,12 +122,18 @@ ) ) (module - (type S (func (result i32))) - (func $keep2-similar-but-func-sig-differs (param $i i32) - (i32.const 0) + (memory 0) + (type $S (func (result i32))) + (type $1 (func (param i32))) + (func $keep2-similar-but-func-sig-differs (type $1) (param $i i32) + (drop + (i32.const 0) + ) ) - (func $other1 (param $i i32) - (i32.const 0) + (func $other1 (type $1) (param $i i32) + (drop + (i32.const 0) + ) ) (func $other2 (type $S) (result i32) (i32.const 0) @@ -105,598 +142,1076 @@ (i32.const 0) ) ) -;; hashing tests for expressions (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (nop) ) - (func $other + (func $other (type $0) (nop) (nop) ) ) (module - (func $erase - (block) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (block $block0 + ) ) - (func $other - (block) + (func $other (type $0) + (block $block0 + ) ) ) (module - (func $keep2 - (block) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (block $block0 + ) ) - (func $other - (block (nop)) + (func $other (type $0) + (block $block0 + (nop) + ) ) ) (module - (func $erase - (block (nop)) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (block $block0 + (nop) + ) ) - (func $other - (block (nop)) + (func $other (type $0) + (block $block0 + (nop) + ) ) ) (module - (func $keep2 - (block (nop)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (block $block0 + (nop) + ) ) - (func $other - (block (nop) (unreachable)) + (func $other (type $0) + (block $block0 + (nop) + (unreachable) + ) ) ) (module - (func $keep2 - (block (nop)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (block $block0 + (nop) + ) ) - (func $other - (block (unreachable)) + (func $other (type $0) + (block $block0 + (unreachable) + ) ) ) (module - (func $erase-since-block-names-do-not-matter - (block $foo) + (memory 0) + (type $0 (func)) + (func $erase-since-block-names-do-not-matter (type $0) + (block $foo + ) ) - (func $other - (block $bar) + (func $other (type $0) + (block $bar + ) ) ) (module - (func $erase-since-block-names-do-not-matter + (memory 0) + (type $0 (func)) + (func $erase-since-block-names-do-not-matter (type $0) (block $foo (br $foo) - (br_table $foo $foo (i32.const 0)) + (br_table $foo $foo + (i32.const 0) + ) ) ) - (func $other + (func $other (type $0) (block $bar (br $bar) - (br_table $bar $bar (i32.const 0)) + (br_table $bar $bar + (i32.const 0) + ) ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (block $foo - (br $foo (i32.const 0)) + (block + (drop + (i32.const 0) + ) + (br $foo) + ) ) ) - (func $other + (func $other (type $0) (block $bar - (br $bar (i32.const 1)) + (block + (drop + (i32.const 1) + ) + (br $bar) + ) ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (block $foo - (br_if $foo (i32.const 0)) + (br_if $foo + (i32.const 0) + ) ) ) - (func $other + (func $other (type $0) (block $bar - (br_if $bar (i32.const 1)) + (br_if $bar + (i32.const 1) + ) ) ) ) (module - (func $erase + (memory 0) + (type $0 (func)) + (func $erase (type $0) (block $foo - (br_if $foo (i32.const 0)) + (br_if $foo + (i32.const 0) + ) ) ) - (func $other + (func $other (type $0) (block $bar - (br_if $bar (i32.const 0)) + (br_if $bar + (i32.const 0) + ) ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (block $foo - (br_table $foo $foo (i32.const 0)) + (br_table $foo $foo + (i32.const 0) + ) ) ) - (func $other + (func $other (type $0) (block $bar - (br_table $bar $bar (i32.const 1)) + (br_table $bar $bar + (i32.const 1) + ) ) ) ) (module - (func $erase - (loop $foo $bar) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (loop $foo $bar + (nop) + ) ) - (func $other - (loop $sfo $sjc) + (func $other (type $0) + (loop $sfo $sjc + (nop) + ) ) ) (module - (func $keep2 - (block $foo - (br_table $foo $foo (i32.const 0) (i32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (block $foo + (br_table $foo $foo + (i32.const 0) + (i32.const 0) + ) + ) ) ) - (func $other - (block $bar - (br_table $bar $bar (i32.const 0) (i32.const 1)) + (func $other (type $0) + (drop + (block $bar + (br_table $bar $bar + (i32.const 0) + (i32.const 1) + ) + ) ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (block $foo (block $bar - (br_table $foo $bar (i32.const 0)) + (br_table $foo $bar + (i32.const 0) + ) ) ) ) - (func $other + (func $other (type $0) (block $bar (block $foo - (br_table $bar $foo (i32.const 0)) + (br_table $bar $foo + (i32.const 0) + ) ) ) ) ) (module - (func $erase + (memory 0) + (type $0 (func)) + (func $erase (type $0) (block $foo (block $bar - (br_table $foo $bar (i32.const 0)) + (br_table $foo $bar + (i32.const 0) + ) ) ) ) - (func $other + (func $other (type $0) (block $bar (block $foo - (br_table $foo $bar (i32.const 0)) + (br_table $foo $bar + (i32.const 0) + ) ) ) ) ) (module - (func $erase + (memory 0) + (type $0 (func)) + (func $erase (type $0) (call $erase) ) - (func $other + (func $other (type $0) (call $erase) ) ) (module - (func $keep2-but-in-theory-we-could-erase ;; TODO FIXME + (memory 0) + (type $0 (func)) + (func $keep2-but-in-theory-we-could-erase (type $0) (call $keep2-but-in-theory-we-could-erase) ) - (func $other + (func $other (type $0) (call $other) ) ) (module + (memory 0) + (type $FUNCSIG$v (func)) (import $i "env" "i") (import $i "env" "j") - (func $erase + (func $erase (type $FUNCSIG$v) (call_import $i) ) - (func $other + (func $other (type $FUNCSIG$v) (call_import $i) ) ) (module + (memory 0) + (type $FUNCSIG$v (func)) (import $i "env" "i") (import $j "env" "j") - (func $keep2 + (func $keep2 (type $FUNCSIG$v) (call_import $i) ) - (func $other + (func $other (type $FUNCSIG$v) (call_import $j) ) ) (module - (type T (func)) + (memory 0) + (type $T (func)) (table $erase $other) - (func $erase - (call_indirect $T (i32.const 0)) + (func $erase (type $T) + (call_indirect $T + (i32.const 0) + ) ) - (func $other - (call_indirect $T (i32.const 0)) + (func $other (type $T) + (call_indirect $T + (i32.const 0) + ) ) ) (module - (type T (func)) + (memory 0) + (type $T (func)) (table $keep2 $other) - (func $keep2 - (call_indirect $T (i32.const 0)) + (func $keep2 (type $T) + (call_indirect $T + (i32.const 0) + ) ) - (func $other - (call_indirect $T (i32.const 1)) + (func $other (type $T) + (call_indirect $T + (i32.const 1) + ) ) ) (module - (type T (func)) - (type S (func)) + (memory 0) + (type $T (func)) + (type $S (func)) (table $keep2 $other) - (func $keep2 - (call_indirect $T (i32.const 0)) + (func $keep2 (type $T) + (call_indirect $T + (i32.const 0) + ) ) - (func $other - (call_indirect $S (i32.const 0)) + (func $other (type $T) + (call_indirect $S + (i32.const 0) + ) ) ) (module - (func $erase-even-locals-with-different-names + (memory 0) + (type $0 (func)) + (func $erase-even-locals-with-different-names (type $0) (local $i i32) - (get_local $i) + (drop + (get_local $i) + ) ) - (func $other + (func $other (type $0) (local $j i32) - (get_local $j) + (drop + (get_local $j) + ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) - (get_local $i) + (drop + (get_local $i) + ) ) - (func $other + (func $other (type $0) (local $j i64) - (get_local $j) + (drop + (get_local $j) + ) ) ) (module - (func $erase-even-locals-with-different-names + (memory 0) + (type $0 (func)) + (func $erase-even-locals-with-different-names (type $0) (local $i i32) - (set_local $i (i32.const 0)) + (set_local $i + (i32.const 0) + ) ) - (func $other + (func $other (type $0) (local $j i32) - (set_local $j (i32.const 0)) + (set_local $j + (i32.const 0) + ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) - (set_local $i (i32.const 0)) + (set_local $i + (i32.const 0) + ) ) - (func $other + (func $other (type $0) (local $j i64) - (set_local $j (i64.const 0)) + (set_local $j + (i64.const 0) + ) ) ) (module - (func $keep2 + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) - (set_local $i (i32.const 0)) + (set_local $i + (i32.const 0) + ) ) - (func $other + (func $other (type $0) (local $j i32) - (set_local $j (i32.const 1)) + (set_local $j + (i32.const 1) + ) ) ) (module (memory 10) - (func $erase - (i32.load (i32.const 0)) - (i32.load8_s align=2 offset=3 (i32.const 0)) + (type $0 (func)) + (func $erase (type $0) + (drop + (i32.load + (i32.const 0) + ) + ) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) - (func $other - (i32.load (i32.const 0)) - (i32.load8_s align=2 offset=3 (i32.const 0)) + (func $other (type $0) + (drop + (i32.load + (i32.const 0) + ) + ) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) ) (module (memory 10) - (func $keep2 - (i32.load16_s align=2 offset=3 (i32.const 0)) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.load16_s offset=3 + (i32.const 0) + ) + ) ) - (func $other - (i32.load8_s align=2 offset=3 (i32.const 0)) + (func $other (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) ) (module (memory 10) - (func $keep2 - (i32.load8_s offset=3 (i32.const 0)) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.load8_s offset=3 + (i32.const 0) + ) + ) ) - (func $other - (i32.load8_s align=2 offset=3 (i32.const 0)) + (func $other (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) ) (module (memory 10) - (func $keep2 - (i32.load8_s align=2 (i32.const 0)) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.load8_s align=2 + (i32.const 0) + ) + ) ) - (func $other - (i32.load8_s align=2 offset=3 (i32.const 0)) + (func $other (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) ) (module (memory 10) - (func $keep2 - (i32.load8_s align=2 offset=3 (i32.const 0)) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) - (func $other - (i32.load8_s align=2 offset=3 (i32.const 1)) + (func $other (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 1) + ) + ) ) ) (module (memory 10) - (func $keep2 - (i32.load8_u align=2 offset=3 (i32.const 0)) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.load8_u offset=3 align=2 + (i32.const 0) + ) + ) ) - (func $other - (i32.load8_s align=2 offset=3 (i32.const 0)) + (func $other (type $0) + (drop + (i32.load8_s offset=3 align=2 + (i32.const 0) + ) + ) ) ) - (module (memory 10) - (func $erase - (i32.store (i32.const 0) (i32.const 100)) - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $erase (type $0) + (i32.store + (i32.const 0) + (i32.const 100) + ) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store (i32.const 0) (i32.const 100)) - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (func $other (type $0) + (i32.store + (i32.const 0) + (i32.const 100) + ) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) ) (module (memory 10) - (func $keep2 - (i32.store16 align=2 offset=3 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $keep2 (type $0) + (i32.store16 offset=3 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (func $other (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) ) (module (memory 10) - (func $keep2 - (i32.store8 offset=3 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $keep2 (type $0) + (i32.store8 offset=3 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (func $other (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) ) (module (memory 10) - (func $keep2 - (i32.store8 align=2 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $keep2 (type $0) + (i32.store8 align=2 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (func $other (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) ) (module (memory 10) - (func $keep2 - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $keep2 (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store8 align=2 offset=3 (i32.const 1) (i32.const 100)) + (func $other (type $0) + (i32.store8 offset=3 align=2 + (i32.const 1) + (i32.const 100) + ) ) ) (module (memory 10) - (func $keep2 - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 100)) + (type $0 (func)) + (func $keep2 (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 100) + ) ) - (func $other - (i32.store8 align=2 offset=3 (i32.const 0) (i32.const 101)) + (func $other (type $0) + (i32.store8 offset=3 align=2 + (i32.const 0) + (i32.const 101) + ) ) ) (module - (func $keep2 - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.const 0) + ) ) - (func $other - (i64.const 0) + (func $other (type $0) + (drop + (i64.const 0) + ) ) ) (module - (func $keep2 - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.const 0) + ) ) - (func $other - (f32.const 0) + (func $other (type $0) + (drop + (f32.const 0) + ) ) ) (module - (func $keep2 - (i32.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i32.const 0) + ) ) - (func $other - (f64.const 0) + (func $other (type $0) + (drop + (f64.const 0) + ) ) ) (module - (func $keep2 - (i64.const 0) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (i64.const 0) + ) ) - (func $other - (i64.const 1) + (func $other (type $0) + (drop + (i64.const 1) + ) ) ) (module - (func $keep2 - (f32.const 0.1) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.const 0.10000000149011612) + ) ) - (func $other - (f32.const -0.1) + (func $other (type $0) + (drop + (f32.const -0.10000000149011612) + ) ) ) (module - (func $keep2 - (f64.const 0.1) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f64.const 0.1) + ) ) - (func $other - (f64.const 0.2) + (func $other (type $0) + (drop + (f64.const 0.2) + ) ) ) (module - (func $erase - (f32.abs (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (f32.abs + (f32.const 0) + ) + ) ) - (func $other - (f32.abs (f32.const 0)) + (func $other (type $0) + (drop + (f32.abs + (f32.const 0) + ) + ) ) ) (module - (func $keep2 - (f32.abs (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.abs + (f32.const 0) + ) + ) ) - (func $other - (f32.abs (f32.const 1)) + (func $other (type $0) + (drop + (f32.abs + (f32.const 1) + ) + ) ) ) (module - (func $keep2 - (f32.abs (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.abs + (f32.const 0) + ) + ) ) - (func $other - (f32.neg (f32.const 0)) + (func $other (type $0) + (drop + (f32.neg + (f32.const 0) + ) + ) ) ) (module - (func $erase - (f32.add (f32.const 0) (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) + ) ) - (func $other - (f32.add (f32.const 0) (f32.const 0)) + (func $other (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) + ) ) ) (module - (func $keep2 - (f32.add (f32.const 0) (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) + ) ) - (func $other - (f32.add (f32.const 0) (f32.const 1)) + (func $other (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 1) + ) + ) ) ) (module - (func $keep2 - (f32.add (f32.const 0) (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) + ) ) - (func $other - (f32.add (f32.const 1) (f32.const 0)) + (func $other (type $0) + (drop + (f32.add + (f32.const 1) + (f32.const 0) + ) + ) ) ) (module - (func $keep2 - (f32.add (f32.const 0) (f32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep2 (type $0) + (drop + (f32.add + (f32.const 0) + (f32.const 0) + ) + ) ) - (func $other - (f32.sub (f32.const 0) (f32.const 0)) + (func $other (type $0) + (drop + (f32.sub + (f32.const 0) + (f32.const 0) + ) + ) ) ) (module - (func $erase - (select (i32.const 0) (i32.const 0) (i32.const 0)) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + ) ) - (func $other - (select (i32.const 0) (i32.const 0) (i32.const 0)) + (func $other (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + ) ) ) (module - (func $keep - (select (i32.const 0) (i32.const 0) (i32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + ) ) - (func $other - (select (i32.const 1) (i32.const 0) (i32.const 0)) + (func $other (type $0) + (drop + (select + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) + ) ) ) (module - (func $keep - (select (i32.const 0) (i32.const 0) (i32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + ) ) - (func $other - (select (i32.const 0) (i32.const 2) (i32.const 0)) + (func $other (type $0) + (drop + (select + (i32.const 0) + (i32.const 2) + (i32.const 0) + ) + ) ) ) (module - (func $keep - (select (i32.const 0) (i32.const 0) (i32.const 0)) + (memory 0) + (type $0 (func)) + (func $keep (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + ) ) - (func $other - (select (i32.const 0) (i32.const 0) (i32.const 3)) + (func $other (type $0) + (drop + (select + (i32.const 0) + (i32.const 0) + (i32.const 3) + ) + ) ) ) (module - (func $erase + (memory 0) + (type $0 (func)) + (func $erase (type $0) (return) ) - (func $other + (func $other (type $0) (return) ) ) (module - (func $erase (result i32) - (return (i32.const 0)) + (memory 0) + (type $0 (func (result i32))) + (func $erase (type $0) (result i32) + (return + (i32.const 0) + ) ) - (func $other (result i32) - (return (i32.const 0)) + (func $other (type $0) (result i32) + (return + (i32.const 0) + ) ) ) (module - (func $keep (result i32) - (return (i32.const 0)) + (memory 0) + (type $0 (func (result i32))) + (func $keep (type $0) (result i32) + (return + (i32.const 0) + ) ) - (func $other (result i32) - (return (i32.const 1)) + (func $other (type $0) (result i32) + (return + (i32.const 1) + ) ) ) (module - (func $erase - (current_memory) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (current_memory) + ) ) - (func $other - (current_memory) + (func $other (type $0) + (drop + (current_memory) + ) ) ) (module - (func $erase - (grow_memory (i32.const 10)) + (memory 0) + (type $0 (func)) + (func $erase (type $0) + (drop + (grow_memory + (i32.const 10) + ) + ) ) - (func $other - (grow_memory (i32.const 10)) + (func $other (type $0) + (drop + (grow_memory + (i32.const 10) + ) + ) ) ) (module - (func $keep - (grow_memory (i32.const 10)) + (memory 0) + (type $0 (func)) + (func $keep (type $0) + (drop + (grow_memory + (i32.const 10) + ) + ) ) - (func $other - (grow_memory (i32.const 11)) + (func $other (type $0) + (drop + (grow_memory + (i32.const 11) + ) + ) ) ) (module - (func $keep - (current_memory) + (memory 0) + (type $0 (func)) + (func $keep (type $0) + (drop + (current_memory) + ) ) - (func $other - (grow_memory (i32.const 10)) + (func $other (type $0) + (drop + (grow_memory + (i32.const 10) + ) + ) ) ) - diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt index 97a241c0b..e5024b1af 100644 --- a/test/passes/metrics.txt +++ b/test/passes/metrics.txt @@ -1,10 +1,11 @@ Counts [funcs] : 1 - [total] : 18 + [total] : 24 [vars] : 1 binary : 1 block : 1 const : 12 + drop : 6 if : 4 (module (memory 256 256) @@ -14,25 +15,37 @@ Counts (block $block0 (if (i32.const 0) - (i32.const 1) + (drop + (i32.const 1) + ) ) (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) ) (if (i32.const 4) - (i32.const 5) - (i32.const 6) - ) - (i32.eq - (if - (i32.const 4) + (drop (i32.const 5) + ) + (drop (i32.const 6) ) - (i32.const 177) + ) + (drop + (i32.eq + (if + (i32.const 4) + (i32.const 5) + (i32.const 6) + ) + (i32.const 177) + ) ) ) ) diff --git a/test/passes/metrics.wast b/test/passes/metrics.wast index 67ad1fc5b..c1f278daa 100644 --- a/test/passes/metrics.wast +++ b/test/passes/metrics.wast @@ -1,29 +1,42 @@ (module (memory 256 256) - (func $ifs (param $x i32) + (type $0 (func (param i32))) + (func $ifs (type $0) (param $x i32) (local $y f32) - (block + (block $block0 (if (i32.const 0) - (i32.const 1) + (drop + (i32.const 1) + ) ) - (if_else + (if (i32.const 0) - (i32.const 1) - (i32.const 2) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) ) - (if_else + (if (i32.const 4) - (i32.const 5) - (i32.const 6) - ) - (i32.eq - (if_else - (i32.const 4) + (drop (i32.const 5) + ) + (drop (i32.const 6) ) - (i32.const 177) + ) + (drop + (i32.eq + (if + (i32.const 4) + (i32.const 5) + (i32.const 6) + ) + (i32.const 177) + ) ) ) ) diff --git a/test/passes/nm.txt b/test/passes/nm.txt index 1129a16ad..8e3771ba2 100644 --- a/test/passes/nm.txt +++ b/test/passes/nm.txt @@ -1,6 +1,6 @@ $a : 1 - $b : 4 - $c : 11 + $b : 5 + $c : 13 (module (memory 0) (type $0 (func)) @@ -8,23 +8,29 @@ (nop) ) (func $b (type $0) - (loop $loop-out0 $loop-in1 - (nop) - (i32.const 1000) + (drop + (loop $loop-out0 $loop-in1 + (nop) + (i32.const 1000) + ) ) ) (func $c (type $0) (block $top (nop) - (i32.const 1000) - (i32.add - (i32.add - (i32.const 1001) - (i32.const 1002) - ) + (drop + (i32.const 1000) + ) + (drop (i32.add - (i32.const 1003) - (i32.const 1004) + (i32.add + (i32.const 1001) + (i32.const 1002) + ) + (i32.add + (i32.const 1003) + (i32.const 1004) + ) ) ) (br $top) diff --git a/test/passes/nm.wast b/test/passes/nm.wast index 72534e55d..d75a2b99e 100644 --- a/test/passes/nm.wast +++ b/test/passes/nm.wast @@ -1,29 +1,36 @@ (module - (func $a + (memory 0) + (type $0 (func)) + (func $a (type $0) (nop) ) - (func $b - (loop - (nop) - (i32.const 1000) + (func $b (type $0) + (drop + (loop $loop-out0 $loop-in1 + (nop) + (i32.const 1000) + ) ) ) - (func $c + (func $c (type $0) (block $top (nop) - (i32.const 1000) - (i32.add - (i32.add - (i32.const 1001) - (i32.const 1002) - ) + (drop + (i32.const 1000) + ) + (drop (i32.add - (i32.const 1003) - (i32.const 1004) + (i32.add + (i32.const 1001) + (i32.const 1002) + ) + (i32.add + (i32.const 1003) + (i32.const 1004) + ) ) ) (br $top) ) ) ) - diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index a25c36a5d..e7af4848e 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -6,115 +6,165 @@ (i32.eqz (get_local $i1) ) - (i32.const 10) + (drop + (i32.const 10) + ) ) (if (get_local $i1) - (i32.const 12) - (i32.const 11) + (drop + (i32.const 12) + ) + (drop + (i32.const 11) + ) ) (if (i64.eqz (get_local $i2) ) - (i32.const 11) - (i32.const 12) + (drop + (i32.const 11) + ) + (drop + (i32.const 12) + ) ) - (i32.le_s - (i32.const 1) - (i32.const 2) + (drop + (i32.le_s + (i32.const 1) + (i32.const 2) + ) ) - (i32.lt_s - (i32.const 1) - (i32.const 2) + (drop + (i32.lt_s + (i32.const 1) + (i32.const 2) + ) ) - (i32.ge_s - (i32.const 1) - (i32.const 2) + (drop + (i32.ge_s + (i32.const 1) + (i32.const 2) + ) ) - (i32.gt_s - (i32.const 1) - (i32.const 2) + (drop + (i32.gt_s + (i32.const 1) + (i32.const 2) + ) ) - (i32.le_u - (i32.const 1) - (i32.const 2) + (drop + (i32.le_u + (i32.const 1) + (i32.const 2) + ) ) - (i32.lt_u - (i32.const 1) - (i32.const 2) + (drop + (i32.lt_u + (i32.const 1) + (i32.const 2) + ) ) - (i32.ge_u - (i32.const 1) - (i32.const 2) + (drop + (i32.ge_u + (i32.const 1) + (i32.const 2) + ) ) - (i32.gt_u - (i32.const 1) - (i32.const 2) + (drop + (i32.gt_u + (i32.const 1) + (i32.const 2) + ) ) - (i32.eqz - (f32.gt - (f32.const 1) - (f32.const 2) + (drop + (i32.eqz + (f32.gt + (f32.const 1) + (f32.const 2) + ) ) ) - (i32.eqz - (f32.ge - (f32.const 1) - (f32.const 2) + (drop + (i32.eqz + (f32.ge + (f32.const 1) + (f32.const 2) + ) ) ) - (i32.eqz - (f32.lt - (f32.const 1) - (f32.const 2) + (drop + (i32.eqz + (f32.lt + (f32.const 1) + (f32.const 2) + ) ) ) - (i32.eqz - (f32.le - (f32.const 1) - (f32.const 2) + (drop + (i32.eqz + (f32.le + (f32.const 1) + (f32.const 2) + ) ) ) - (i32.eqz - (f64.gt - (f64.const 1) - (f64.const 2) + (drop + (i32.eqz + (f64.gt + (f64.const 1) + (f64.const 2) + ) ) ) - (i32.eqz - (f64.ge - (f64.const 1) - (f64.const 2) + (drop + (i32.eqz + (f64.ge + (f64.const 1) + (f64.const 2) + ) ) ) - (i32.eqz - (f64.lt - (f64.const 1) - (f64.const 2) + (drop + (i32.eqz + (f64.lt + (f64.const 1) + (f64.const 2) + ) ) ) - (i32.eqz - (f64.le - (f64.const 1) - (f64.const 2) + (drop + (i32.eqz + (f64.le + (f64.const 1) + (f64.const 2) + ) ) ) - (f32.ne - (f32.const 1) - (f32.const 2) + (drop + (f32.ne + (f32.const 1) + (f32.const 2) + ) ) - (f32.eq - (f32.const 1) - (f32.const 2) + (drop + (f32.eq + (f32.const 1) + (f32.const 2) + ) ) - (f64.ne - (f64.const 1) - (f64.const 2) + (drop + (f64.ne + (f64.const 1) + (f64.const 2) + ) ) - (f64.eq - (f64.const 1) - (f64.const 2) + (drop + (f64.eq + (f64.const 1) + (f64.const 2) + ) ) ) ) diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast index bea01bd1c..f06d99fd9 100644 --- a/test/passes/optimize-instructions.wast +++ b/test/passes/optimize-instructions.wast @@ -1,48 +1,196 @@ (module (memory 0) - (func $f (param $i1 i32) (param $i2 i64) + (type $0 (func (param i32 i64))) + (func $f (type $0) (param $i1 i32) (param $i2 i64) (if (i32.eqz (get_local $i1) ) - (i32.const 10) + (drop + (i32.const 10) + ) ) (if (i32.eqz (get_local $i1) ) - (i32.const 11) - (i32.const 12) + (drop + (i32.const 11) + ) + (drop + (i32.const 12) + ) ) (if (i64.eqz (get_local $i2) ) - (i32.const 11) - (i32.const 12) - ) - (i32.eqz (i32.gt_s (i32.const 1) (i32.const 2))) - (i32.eqz (i32.ge_s (i32.const 1) (i32.const 2))) - (i32.eqz (i32.lt_s (i32.const 1) (i32.const 2))) - (i32.eqz (i32.le_s (i32.const 1) (i32.const 2))) - (i32.eqz (i32.gt_u (i32.const 1) (i32.const 2))) - (i32.eqz (i32.ge_u (i32.const 1) (i32.const 2))) - (i32.eqz (i32.lt_u (i32.const 1) (i32.const 2))) - (i32.eqz (i32.le_u (i32.const 1) (i32.const 2))) - - (i32.eqz (f32.gt (f32.const 1) (f32.const 2))) - (i32.eqz (f32.ge (f32.const 1) (f32.const 2))) - (i32.eqz (f32.lt (f32.const 1) (f32.const 2))) - (i32.eqz (f32.le (f32.const 1) (f32.const 2))) - (i32.eqz (f64.gt (f64.const 1) (f64.const 2))) - (i32.eqz (f64.ge (f64.const 1) (f64.const 2))) - (i32.eqz (f64.lt (f64.const 1) (f64.const 2))) - (i32.eqz (f64.le (f64.const 1) (f64.const 2))) - - (i32.eqz (f32.eq (f32.const 1) (f32.const 2))) - (i32.eqz (f32.ne (f32.const 1) (f32.const 2))) - (i32.eqz (f64.eq (f64.const 1) (f64.const 2))) - (i32.eqz (f64.ne (f64.const 1) (f64.const 2))) + (drop + (i32.const 11) + ) + (drop + (i32.const 12) + ) + ) + (drop + (i32.eqz + (i32.gt_s + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.ge_s + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.lt_s + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.le_s + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.gt_u + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.ge_u + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.lt_u + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (i32.le_u + (i32.const 1) + (i32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.gt + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.ge + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.lt + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.le + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.gt + (f64.const 1) + (f64.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.ge + (f64.const 1) + (f64.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.lt + (f64.const 1) + (f64.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.le + (f64.const 1) + (f64.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.eq + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f32.ne + (f32.const 1) + (f32.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.eq + (f64.const 1) + (f64.const 2) + ) + ) + ) + (drop + (i32.eqz + (f64.ne + (f64.const 1) + (f64.const 2) + ) + ) + ) ) ) - diff --git a/test/passes/post-emscripten.txt b/test/passes/post-emscripten.txt index c122b77d5..fd2ada3c1 100644 --- a/test/passes/post-emscripten.txt +++ b/test/passes/post-emscripten.txt @@ -2,29 +2,41 @@ (memory 256 256) (type $0 (func (param i32))) (func $b0 (type $0) (param $x i32) - (i32.load offset=1 - (get_local $x) - ) - (i32.load offset=8 - (get_local $x) - ) - (i32.load offset=1023 - (get_local $x) + (drop + (i32.load offset=1 + (get_local $x) + ) ) - (i32.load - (i32.add + (drop + (i32.load offset=8 (get_local $x) - (i32.const 1024) ) ) - (i32.load - (i32.add + (drop + (i32.load offset=1023 (get_local $x) - (i32.const 2048) ) ) - (i32.load offset=4 - (get_local $x) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 1024) + ) + ) + ) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 2048) + ) + ) + ) + (drop + (i32.load offset=4 + (get_local $x) + ) ) ) ) diff --git a/test/passes/post-emscripten.wast b/test/passes/post-emscripten.wast index 1da5afd61..b554fea53 100644 --- a/test/passes/post-emscripten.wast +++ b/test/passes/post-emscripten.wast @@ -1,42 +1,54 @@ (module (memory 256 256) - (func $b0 (param $x i32) - (i32.load - (i32.add - (get_local $x) - (i32.const 1) + (type $0 (func (param i32))) + (func $b0 (type $0) (param $x i32) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 1) + ) ) ) - (i32.load - (i32.add - (get_local $x) - (i32.const 8) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 8) + ) ) ) - (i32.load - (i32.add - (get_local $x) - (i32.const 1023) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 1023) + ) ) ) - (i32.load - (i32.add - (get_local $x) - (i32.const 1024) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 1024) + ) ) ) - (i32.load - (i32.add - (get_local $x) - (i32.const 2048) + (drop + (i32.load + (i32.add + (get_local $x) + (i32.const 2048) + ) ) ) - (i32.load - (i32.add - (i32.const 4) - (get_local $x) + (drop + (i32.load + (i32.add + (i32.const 4) + (get_local $x) + ) ) ) ) ) - diff --git a/test/passes/precompute.txt b/test/passes/precompute.txt index a3e8623f5..9c40148b6 100644 --- a/test/passes/precompute.txt +++ b/test/passes/precompute.txt @@ -2,14 +2,24 @@ (memory 0) (type $0 (func (param i32))) (func $x (type $0) (param $x i32) - (i32.const 3) - (i32.add - (i32.const 1) - (get_local $x) + (drop + (i32.const 3) + ) + (drop + (i32.add + (i32.const 1) + (get_local $x) + ) + ) + (drop + (i32.const 6) + ) + (drop + (i32.const -1) + ) + (drop + (i32.const 3) ) - (i32.const 6) - (i32.const -1) - (i32.const 3) (loop $loop-out0 $in (br $in) ) diff --git a/test/passes/precompute.wast b/test/passes/precompute.wast index 0282ac61b..c702f2e8b 100644 --- a/test/passes/precompute.wast +++ b/test/passes/precompute.wast @@ -1,19 +1,45 @@ (module - (func $x (param $x i32) - (i32.add (i32.const 1) (i32.const 2)) ;; precomputable - (i32.add (i32.const 1) (get_local $x)) - (i32.add (i32.const 1) (i32.add (i32.const 2) (i32.const 3))) ;; cascade - (i32.sub (i32.const 1) (i32.const 2)) - (i32.sub + (memory 0) + (type $0 (func (param i32))) + (func $x (type $0) (param $x i32) + (drop (i32.add - (i32.const 0) - (i32.const 4) + (i32.const 1) + (i32.const 2) ) - (i32.const 1) ) - (loop $in ;; infinite loop + (drop + (i32.add + (i32.const 1) + (get_local $x) + ) + ) + (drop + (i32.add + (i32.const 1) + (i32.add + (i32.const 2) + (i32.const 3) + ) + ) + ) + (drop + (i32.sub + (i32.const 1) + (i32.const 2) + ) + ) + (drop + (i32.sub + (i32.add + (i32.const 0) + (i32.const 4) + ) + (i32.const 1) + ) + ) + (loop $loop-out0 $in (br $in) ) ) ) - diff --git a/test/passes/remove-imports.txt b/test/passes/remove-imports.txt index a285ef0eb..b8d45e8eb 100644 --- a/test/passes/remove-imports.txt +++ b/test/passes/remove-imports.txt @@ -5,7 +5,11 @@ (type $FUNCSIG$d (func (result f64))) (func $nada (type $FUNCSIG$v) (nop) - (i32.const 0) - (f64.const 0) + (drop + (i32.const 0) + ) + (drop + (f64.const 0) + ) ) ) diff --git a/test/passes/remove-imports.wast b/test/passes/remove-imports.wast index 00190a32d..babd60fdc 100644 --- a/test/passes/remove-imports.wast +++ b/test/passes/remove-imports.wast @@ -1,11 +1,18 @@ (module (memory 1024 1024) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$d (func (result f64))) (import $waka "somewhere" "waka") (import $waka-ret "somewhere" "waka-ret" (result i32)) (import $waka-ret-d "somewhere" "waka-ret-d" (result f64)) - (func $nada + (func $nada (type $FUNCSIG$v) (call_import $waka) - (call_import $waka-ret) - (call_import $waka-ret-d) + (drop + (call_import $waka-ret) + ) + (drop + (call_import $waka-ret-d) + ) ) ) diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index 4290d9e05..de6dc4779 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -9,7 +9,11 @@ ) (func $b1 (type $0) (param $i1 i32) (block $topmost - (i32.const 0) + (block $block0 + (drop + (i32.const 0) + ) + ) ) ) (func $b2 (type $0) (param $i1 i32) @@ -27,14 +31,22 @@ (func $b4 (type $0) (param $i1 i32) (block $topmost (block $inner - (i32.const 0) + (block $block0 + (drop + (i32.const 0) + ) + ) ) ) ) (func $b5 (type $0) (param $i1 i32) (block $topmost (block $inner - (i32.const 0) + (block $block0 + (drop + (i32.const 0) + ) + ) ) ) ) @@ -47,9 +59,13 @@ ) (func $b7 (type $0) (param $i1 i32) (block $topmost - (br_if $topmost - (i32.const 0) - (i32.const 1) + (block $block0 + (drop + (i32.const 0) + ) + (br_if $topmost + (i32.const 1) + ) ) ) ) @@ -74,9 +90,13 @@ (func $b10 (type $0) (param $i1 i32) (block $topmost (block $inner - (br_if $topmost - (i32.const 0) - (i32.const 1) + (block $block0 + (drop + (i32.const 0) + ) + (br_if $topmost + (i32.const 1) + ) ) ) ) @@ -84,9 +104,13 @@ (func $b11 (type $0) (param $i1 i32) (block $topmost (block $inner - (br_if $inner - (i32.const 0) - (i32.const 1) + (block $block0 + (drop + (i32.const 0) + ) + (br_if $inner + (i32.const 1) + ) ) ) ) @@ -95,12 +119,24 @@ (block $topmost (select (block $block1 - (i32.const 12) - (i32.const 1) + (drop + (i32.const 12) + ) + (block $block2 + (drop + (i32.const 1) + ) + ) ) (block $block3 - (i32.const 27) - (i32.const 2) + (drop + (i32.const 27) + ) + (block $block4 + (drop + (i32.const 2) + ) + ) ) (i32.const 1) ) @@ -111,14 +147,18 @@ (if (i32.const 1) (block $block1 - (i32.const 12) + (drop + (i32.const 12) + ) (br_if $topmost (i32.const 1) (i32.const 1) ) ) (block $block3 - (i32.const 27) + (drop + (i32.const 27) + ) (br $topmost (i32.const 2) ) @@ -149,9 +189,13 @@ ) (func $b15 (type $1) (block $topmost - (br_if $topmost - (i32.const 0) + (if (i32.const 18) + (block $block1 + (drop + (i32.const 0) + ) + ) ) ) ) @@ -187,7 +231,9 @@ ) (block $a (select - (i32.const 1) + (drop + (i32.const 1) + ) (block $block6 ) (i32.const 0) @@ -197,7 +243,9 @@ (select (block $block8 ) - (i32.const 1) + (drop + (i32.const 1) + ) (i32.const 0) ) ) @@ -243,40 +291,69 @@ (block $a (if (i32.const 0) - (i32.const 1) + (drop + (i32.const 1) + ) (block $block2 - (br $a - (i32.const 2) + (block $block3 + (drop + (i32.const 2) + ) + (br $a) + ) + (drop + (i32.const 3) ) - (i32.const 3) ) ) (if (i32.const 0) (block $block4 - (br $a - (i32.const 2) + (block $block5 + (drop + (i32.const 2) + ) + (br $a) + ) + (drop + (i32.const 3) ) - (i32.const 3) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (if (block $block6 - (br $a - (i32.const 2) + (block $block7 + (drop + (i32.const 2) + ) + (br $a) ) (i32.const 3) ) - (i32.const 0) - (i32.const 1) + (drop + (i32.const 0) + ) + (drop + (i32.const 1) + ) ) (select (block $a - (i32.const 1) + (block $block11 + (drop + (i32.const 1) + ) + ) ) (block $a - (i32.const 2) + (block $block13 + (drop + (i32.const 2) + ) + ) ) (block $a (i32.const 0) @@ -287,37 +364,54 @@ (func $side-effects-and-order (type $2) (result i32) (local $x i32) (block $do-once$0 - (br_if $do-once$0 - (i32.const 0) + (if (call $b13) + (block $block1 + (drop + (i32.const 0) + ) + (br $do-once$0) + ) + ) + (drop + (i32.const 1) ) - (i32.const 1) ) (block $do-once$0 (if (call $b13) - (br $do-once$0 - (call $b14) + (block $block3 + (drop + (call $b14) + ) + (br $do-once$0) ) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (block $do-once$0 (if (i32.const 0) - (br $do-once$0 - (call $b14) + (block $block5 + (drop + (call $b14) + ) + (br $do-once$0) ) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (block $do-once$0 (if - (set_local $x + (tee_local $x (i32.const 1) ) (br $do-once$0 - (set_local $x + (tee_local $x (i32.const 2) ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index b7dc1cc25..f3d20f5e0 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -1,126 +1,172 @@ (module (memory 256 256) - (func $b0-yes (param $i1 i32) + (type $0 (func (param i32))) + (type $1 (func)) + (type $2 (func (result i32))) + (func $b0-yes (type $0) (param $i1 i32) (block $topmost (br $topmost) ) ) - (func $b1 (param $i1 i32) + (func $b1 (type $0) (param $i1 i32) (block $topmost - (br $topmost - (i32.const 0) + (block + (drop + (i32.const 0) + ) + (br $topmost) ) ) ) - (func $b2 (param $i1 i32) + (func $b2 (type $0) (param $i1 i32) (block $topmost (block $inner (br $topmost) ) ) ) - (func $b3-yes (param $i1 i32) + (func $b3-yes (type $0) (param $i1 i32) (block $topmost (block $inner (br $inner) ) ) ) - (func $b4 (param $i1 i32) + (func $b4 (type $0) (param $i1 i32) (block $topmost (block $inner - (br $topmost - (i32.const 0) + (block + (drop + (i32.const 0) + ) + (br $topmost) ) ) ) ) - (func $b5 (param $i1 i32) + (func $b5 (type $0) (param $i1 i32) (block $topmost (block $inner - (br $inner - (i32.const 0) + (block + (drop + (i32.const 0) + ) + (br $inner) ) ) ) ) - (func $b6 (param $i1 i32) - (block $topmost - (br_if $topmost (i32.const 1)) - ) - ) - (func $b7 (param $i1 i32) + (func $b6 (type $0) (param $i1 i32) (block $topmost (br_if $topmost - (i32.const 0) (i32.const 1) ) ) ) - (func $b8 (param $i1 i32) + (func $b7 (type $0) (param $i1 i32) (block $topmost - (block $inner - (br_if $topmost (i32.const 1)) + (block + (drop + (i32.const 0) + ) + (br_if $topmost + (i32.const 1) + ) ) ) ) - (func $b9 (param $i1 i32) + (func $b8 (type $0) (param $i1 i32) (block $topmost (block $inner - (br_if $topmost (i32.const 1)) + (br_if $topmost + (i32.const 1) + ) ) ) ) - (func $b10 (param $i1 i32) + (func $b9 (type $0) (param $i1 i32) (block $topmost (block $inner (br_if $topmost - (i32.const 0) (i32.const 1) ) ) ) ) - (func $b11 (param $i1 i32) + (func $b10 (type $0) (param $i1 i32) (block $topmost (block $inner - (br_if $inner - (i32.const 0) - (i32.const 1) + (block + (drop + (i32.const 0) + ) + (br_if $topmost + (i32.const 1) + ) ) ) ) ) - (func $b12-yes + (func $b11 (type $0) (param $i1 i32) (block $topmost - (if_else (i32.const 1) + (block $inner (block - (i32.const 12) - (br $topmost + (drop + (i32.const 0) + ) + (br_if $inner (i32.const 1) ) ) - (block - (i32.const 27) - (br $topmost - (i32.const 2) + ) + ) + ) + (func $b12-yes (type $1) + (block $topmost + (if + (i32.const 1) + (block $block1 + (drop + (i32.const 12) + ) + (block + (drop + (i32.const 1) + ) + (br $topmost) + ) + ) + (block $block3 + (drop + (i32.const 27) + ) + (block + (drop + (i32.const 2) + ) + (br $topmost) ) ) ) ) ) - (func $b13 (result i32) + (func $b13 (type $2) (result i32) (block $topmost - (if_else (i32.const 1) - (block - (i32.const 12) + (if + (i32.const 1) + (block $block1 + (drop + (i32.const 12) + ) (br_if $topmost (i32.const 1) (i32.const 1) ) ) - (block - (i32.const 27) + (block $block3 + (drop + (i32.const 27) + ) (br $topmost (i32.const 2) ) @@ -129,19 +175,20 @@ (i32.const 3) ) ) - (func $b14 (result i32) + (func $b14 (type $2) (result i32) (block $topmost - (if_else (i32.const 1) - (block + (if + (i32.const 1) + (block $block1 (i32.const 12) ) - (block + (block $block3 (i32.const 27) ) ) ) ) - (func $b15 + (func $b15 (type $1) (block $topmost (if (i32.const 17) @@ -149,15 +196,20 @@ ) ) ) - (func $b15 + (func $b15 (type $1) (block $topmost (if (i32.const 18) - (br $topmost (i32.const 0)) + (block + (drop + (i32.const 0) + ) + (br $topmost) + ) ) ) ) - (func $b16 + (func $b16 (type $1) (block $a (block $b (block $c @@ -186,14 +238,14 @@ (br $a) ) ) - (func $b17 + (func $b17 (type $1) (block $a (if (i32.const 0) - (block + (block $block1 (br $a) ) - (block + (block $block3 (br $a) ) ) @@ -201,8 +253,10 @@ (block $a (if (i32.const 0) - (i32.const 1) - (block + (drop + (i32.const 1) + ) + (block $block6 (br $a) ) ) @@ -210,131 +264,192 @@ (block $a (if (i32.const 0) - (block + (block $block8 (br $a) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) ) (block $c (block $b (if (i32.const 0) - (block + (block $block11 (br $b) ) - (block + (block $block13 (br $c) ) ) ) ) ) - (func $ret-1 + (func $ret-1 (type $1) (return) ) - (func $ret-2 - (block - (block + (func $ret-2 (type $1) + (block $block0 + (block $block1 (return) ) ) ) - (func $ret-3 - (block + (func $ret-3 (type $1) + (block $block0 (if (i32.const 0) (return) - (block + (block $block3 (return) ) ) ) ) - (func $ret-value (result i32) - (block - (block - (return (i32.const 1)) + (func $ret-value (type $2) (result i32) + (block $block0 + (block $block1 + (return + (i32.const 1) + ) ) ) ) - (func $no-select-but-the-last + (func $no-select-but-the-last (type $1) (block $a (if (i32.const 0) - (i32.const 1) - (block - (br $a (i32.const 2)) - (i32.const 3) + (drop + (i32.const 1) + ) + (block $block2 + (block + (drop + (i32.const 2) + ) + (br $a) + ) + (drop + (i32.const 3) + ) ) ) (if (i32.const 0) - (block - (br $a (i32.const 2)) - (i32.const 3) + (block $block4 + (block + (drop + (i32.const 2) + ) + (br $a) + ) + (drop + (i32.const 3) + ) + ) + (drop + (i32.const 1) ) - (i32.const 1) ) (if - (block - (br $a (i32.const 2)) + (block $block6 + (block + (drop + (i32.const 2) + ) + (br $a) + ) (i32.const 3) ) - (i32.const 0) - (i32.const 1) + (drop + (i32.const 0) + ) + (drop + (i32.const 1) + ) ) - (if ;; brs to the inner $a's get removed, the it is selectifiable + (if (block $a - (br $a (i32.const 0)) + (br $a + (i32.const 0) + ) ) (block $a - (br $a (i32.const 1)) + (block + (drop + (i32.const 1) + ) + (br $a) + ) ) (block $a - (br $a (i32.const 2)) + (block + (drop + (i32.const 2) + ) + (br $a) + ) ) ) ) ) - (func $side-effects-and-order (result i32) + (func $side-effects-and-order (type $2) (result i32) (local $x i32) (block $do-once$0 (if (call $b13) - (br $do-once$0 - (i32.const 0) + (block + (drop + (i32.const 0) + ) + (br $do-once$0) ) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (block $do-once$0 (if (call $b13) - (br $do-once$0 - (call $b14) + (block + (drop + (call $b14) + ) + (br $do-once$0) ) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (block $do-once$0 (if (i32.const 0) - (br $do-once$0 - (call $b14) + (block + (drop + (call $b14) + ) + (br $do-once$0) ) ) - (i32.const 1) + (drop + (i32.const 1) + ) ) (block $do-once$0 (if - (set_local $x (i32.const 1)) + (tee_local $x + (i32.const 1) + ) (br $do-once$0 - (set_local $x (i32.const 2)) + (tee_local $x + (i32.const 2) + ) ) ) (i32.const 1) ) ) ) - diff --git a/test/passes/remove-unused-functions.wast b/test/passes/remove-unused-functions.wast index 4c89804bf..9449a25cb 100644 --- a/test/passes/remove-unused-functions.wast +++ b/test/passes/remove-unused-functions.wast @@ -1,46 +1,47 @@ (module + (memory 0) (start $start) + (type $0 (func)) (export "exported" $exported) (table $called_indirect) - (func $start + (func $start (type $0) (call $called0) ) - (func $called0 + (func $called0 (type $0) (call $called1) ) - (func $called1 + (func $called1 (type $0) (nop) ) - (func $called_indirect + (func $called_indirect (type $0) (nop) ) - (func $exported + (func $exported (type $0) (call $called2) ) - (func $called2 + (func $called2 (type $0) (call $called2) (call $called3) ) - (func $called3 + (func $called3 (type $0) (call $called4) ) - (func $called4 + (func $called4 (type $0) (call $called3) ) - (func $remove0 + (func $remove0 (type $0) (call $remove1) ) - (func $remove1 + (func $remove1 (type $0) (nop) ) - (func $remove2 + (func $remove2 (type $0) (call $remove2) ) - (func $remove3 + (func $remove3 (type $0) (call $remove4) ) - (func $remove4 + (func $remove4 (type $0) (call $remove3) ) ) - diff --git a/test/passes/remove-unused-names.wast b/test/passes/remove-unused-names.wast index 9423b2675..4b3365bf8 100644 --- a/test/passes/remove-unused-names.wast +++ b/test/passes/remove-unused-names.wast @@ -1,11 +1,13 @@ (module (memory 256 256) - (func $b0 (param $i1 i32) (result i32) + (type $0 (func (param i32) (result i32))) + (type $1 (func)) + (func $b0 (type $0) (param $i1 i32) (result i32) (block $topmost (i32.const 0) ) ) - (func $loops + (func $loops (type $1) (loop $out $in (br $out) (br $in) @@ -37,20 +39,20 @@ (br $in) ) ) - (loop $in + (loop $loop-out0 $in (block $out (br $out) (br $in) ) ) (block $out - (loop $in + (loop $loop-out1 $in (br $out) (br $in) ) ) ) - (func $merges + (func $merges (type $1) (block $a (block $b (br $a) @@ -59,14 +61,17 @@ ) (block $a (block $b - (br_table $a $b (i32.const 3)) + (br_table $a $b + (i32.const 3) + ) ) ) (block $a (block $b - (br_table $b $a (i32.const 3)) + (br_table $b $a + (i32.const 3) + ) ) ) ) ) - diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index 88d284a5a..a82bf489f 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -16,7 +16,9 @@ (nop) ) (func $b0-yes (type $i) (param $i1 i32) - (i32.const 10) + (drop + (i32.const 10) + ) ) (func $b0-no (type $i) (param $i1 i32) (block $topmost @@ -32,313 +34,577 @@ ) ) (func $b1-yes (type $i) (param $i1 i32) - (i32.const 10) + (drop + (i32.const 10) + ) ) (func $b2-yes (type $i) (param $i1 i32) - (i32.const 5) - (i32.const 10) - (i32.const 15) + (drop + (i32.const 5) + ) + (drop + (i32.const 10) + ) + (drop + (i32.const 15) + ) ) (func $b3-yes (type $i) (param $i1 i32) - (i32.const 3) - (i32.const 6) - (i32.const 10) - (i32.const 15) - (i32.const 20) + (drop + (i32.const 3) + ) + (drop + (i32.const 6) + ) + (drop + (i32.const 10) + ) + (drop + (i32.const 15) + ) + (drop + (i32.const 20) + ) ) (func $b4 (type $i) (param $i1 i32) (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) ) (func $b5 (type $i) (param $i1 i32) (block $middle (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) (br $middle) ) ) (func $b6 (type $i) (param $i1 i32) - (i32.const 5) + (drop + (i32.const 5) + ) (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) - (i32.const 15) + (drop + (i32.const 15) + ) ) (func $b7 (type $i) (param $i1 i32) - (i32.const 3) + (drop + (i32.const 3) + ) (block $middle - (i32.const 6) + (drop + (i32.const 6) + ) (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) - (i32.const 15) + (drop + (i32.const 15) + ) (br $middle) ) - (i32.const 20) + (drop + (i32.const 20) + ) ) (func $unary (type $3) (local $x i32) - (i32.eqz + (drop + (i32.eqz + (block + (i32.const 10) + ) + ) + ) + (drop (block - (i32.const 10) + (drop + (i32.const 10) + ) + (i32.eqz + (i32.const 20) + ) ) ) - (i32.const 10) - (i32.eqz - (i32.const 20) + (drop + (block + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (i32.eqz + (i32.const 30) + ) + ) ) - (i32.const 10) - (i32.const 20) - (i32.eqz - (i32.const 30) + (drop + (i32.const 10) ) - (i32.const 10) (set_local $x (i32.const 20) ) - (i32.const 10) - (i32.load - (i32.const 20) + (drop + (block + (drop + (i32.const 10) + ) + (i32.load + (i32.const 20) + ) + ) + ) + (drop + (i32.const 10) ) - (i32.const 10) (return (unreachable) ) ) (func $binary (type $3) - (i32.add + (drop + (i32.add + (block + (i32.const 10) + ) + (i32.const 20) + ) + ) + (drop (block - (i32.const 10) + (drop + (i32.const 10) + ) + (i32.add + (i32.const 20) + (i32.const 30) + ) ) - (i32.const 20) ) - (i32.const 10) - (i32.add - (i32.const 20) - (i32.const 30) + (drop + (block + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (i32.add + (i32.const 30) + (i32.const 40) + ) + ) ) - (i32.const 10) - (i32.const 20) - (i32.add - (i32.const 30) - (i32.const 40) + (drop + (i32.add + (i32.const 10) + (block + (i32.const 20) + ) + ) ) - (i32.add - (i32.const 10) + (drop (block - (i32.const 20) + (drop + (i32.const 20) + ) + (i32.add + (i32.const 10) + (i32.const 30) + ) ) ) - (i32.const 20) - (i32.add - (i32.const 10) - (i32.const 30) + (drop + (block + (drop + (i32.const 20) + ) + (drop + (i32.const 30) + ) + (i32.add + (i32.const 10) + (i32.const 40) + ) + ) ) - (i32.const 20) - (i32.const 30) - (i32.add - (i32.const 10) - (i32.const 40) + (drop + (i32.add + (block + (i32.const 10) + ) + (block + (i32.const 20) + ) + ) ) - (i32.add + (drop (block - (i32.const 10) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (i32.add + (i32.const 20) + (i32.const 40) + ) ) + ) + (drop (block - (i32.const 20) + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (drop + (i32.const 40) + ) + (drop + (i32.const 50) + ) + (i32.add + (i32.const 30) + (i32.const 60) + ) ) ) - (i32.const 10) - (i32.const 30) - (i32.add + (drop (i32.const 20) - (i32.const 40) - ) - (i32.const 10) - (i32.const 20) - (i32.const 40) - (i32.const 50) - (i32.add - (i32.const 30) - (i32.const 60) ) - (i32.const 20) (i32.store (i32.const 10) (i32.const 30) ) - (i32.const 10) + (drop + (i32.const 10) + ) (i32.store (i32.const 20) (i32.const 30) ) - (i32.add - (unreachable) - (block - (i32.const 10) - (i32.const 20) + (drop + (i32.add + (unreachable) + (block + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) ) - (unreachable) - (i32.const 20) - (i32.add - (i32.const 10) - (i32.const 30) + (drop + (block + (unreachable) + (drop + (i32.const 20) + ) + (i32.add + (i32.const 10) + (i32.const 30) + ) + ) ) ) (func $trinary (type $3) - (i32.const 10) - (i32.const 30) - (i32.const 50) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) - (i32.const 20) - (i32.const 40) - (select + (drop (block - (i32.const 10) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) + ) ) - (i32.const 30) - (i32.const 50) ) - (i32.const 10) - (i32.const 40) - (select - (i32.const 20) + (drop (block - (i32.const 30) + (drop + (i32.const 20) + ) + (drop + (i32.const 40) + ) + (select + (block + (i32.const 10) + ) + (i32.const 30) + (i32.const 50) + ) ) - (i32.const 50) ) - (i32.const 10) - (i32.const 30) - (select - (i32.const 20) - (i32.const 40) + (drop (block - (i32.const 50) + (drop + (i32.const 10) + ) + (drop + (i32.const 40) + ) + (select + (i32.const 20) + (block + (i32.const 30) + ) + (i32.const 50) + ) ) ) - (i32.const 30) - (select + (drop (block - (i32.const 10) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (select + (i32.const 20) + (i32.const 40) + (block + (i32.const 50) + ) + ) ) + ) + (drop (block - (i32.const 20) + (drop + (i32.const 30) + ) + (select + (block + (i32.const 10) + ) + (block + (i32.const 20) + ) + (i32.const 40) + ) ) - (i32.const 40) ) - (i32.const 20) - (select + (drop (block - (i32.const 10) + (drop + (i32.const 20) + ) + (select + (block + (i32.const 10) + ) + (i32.const 30) + (block + (i32.const 40) + ) + ) ) - (i32.const 30) + ) + (drop (block - (i32.const 40) + (drop + (i32.const 10) + ) + (select + (i32.const 20) + (block + (i32.const 30) + ) + (block + (i32.const 40) + ) + ) ) ) - (i32.const 10) - (select - (i32.const 20) + (drop (block - (i32.const 30) + (unreachable) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) + ) ) + ) + (drop (block - (i32.const 40) + (drop + (i32.const 10) + ) + (select + (unreachable) + (block + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block + (drop + (i32.const 50) + ) + (i32.const 60) + ) + ) ) ) - (unreachable) - (i32.const 30) - (i32.const 50) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) - (i32.const 10) - (select - (unreachable) + (drop (block - (i32.const 30) - (i32.const 40) + (drop + (i32.const 10) + ) + (unreachable) + (drop + (i32.const 50) + ) + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) + ) ) + ) + (drop (block - (i32.const 50) - (i32.const 60) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (select + (i32.const 20) + (unreachable) + (block + (drop + (i32.const 50) + ) + (i32.const 60) + ) + ) ) ) - (i32.const 10) - (unreachable) - (i32.const 50) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) - (i32.const 10) - (i32.const 30) - (select - (i32.const 20) - (unreachable) + (drop (block - (i32.const 50) - (i32.const 60) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (unreachable) + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) + ) ) ) - (i32.const 10) - (i32.const 30) - (unreachable) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) - (i32.const 10) - (i32.const 30) - (i32.const 50) - (select - (i32.const 20) - (i32.const 40) - (unreachable) + (drop + (block + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) + (select + (i32.const 20) + (i32.const 40) + (unreachable) + ) + ) ) ) (func $breaks (type $3) (block $out - (i32.const 10) - (br $out - (i32.const 20) + (drop + (block + (drop + (i32.const 10) + ) + (i32.const 20) + ) + ) + (br $out) + (drop + (i32.const 10) ) - (i32.const 10) (br_if $out (i32.const 20) ) - (i32.const 10) - (i32.const 30) + (drop + (block + (drop + (i32.const 10) + ) + (i32.const 20) + ) + ) + (drop + (i32.const 30) + ) (br_if $out - (i32.const 20) (i32.const 40) ) - (i32.const 10) - (br_table $out $out - (i32.const 20) + (drop + (i32.const 10) ) - (i32.const 10) - (i32.const 30) (br_table $out $out (i32.const 20) - (i32.const 40) ) + (drop + (block $out2 + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (br_table $out2 $out2 + (i32.const 20) + (i32.const 40) + ) + ) + ) + (unreachable) ) ) (func $calls (type $3) @@ -347,65 +613,103 @@ (i32.const 10) ) ) - (i32.const 10) + (drop + (i32.const 10) + ) (call $call-i (i32.const 20) ) - (i32.const 10) - (i32.const 20) + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) (call $call-i (i32.const 30) ) - (i32.const 10) - (i32.const 30) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) (call $call-ii (i32.const 20) (i32.const 40) ) (unreachable) - (i32.const 20) + (drop + (i32.const 20) + ) (call $call-ii (i32.const 10) (i32.const 30) ) - (i32.const 10) + (drop + (i32.const 10) + ) (call $call-ii (unreachable) (block - (i32.const 20) + (drop + (i32.const 20) + ) (i32.const 30) ) ) - (i32.const 10) + (drop + (i32.const 10) + ) (unreachable) (call $call-ii (i32.const 20) (i32.const 30) ) - (i32.const 10) - (i32.const 30) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) (call $call-ii (i32.const 20) (unreachable) ) - (i32.const 10) - (i32.const 30) - (i32.const 50) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) (call $call-iii (i32.const 20) (i32.const 40) (i32.const 60) ) - (i32.const 10) - (i32.const 40) + (drop + (i32.const 10) + ) + (drop + (i32.const 40) + ) (call $call-iii (i32.const 20) (i32.const 30) (i32.const 50) ) - (i32.const 10) - (i32.const 30) - (i32.const 50) + (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) (call_indirect $ii (i32.const 20) (i32.const 40) @@ -414,11 +718,15 @@ (call_indirect $ii (unreachable) (block - (i32.const 30) + (drop + (i32.const 30) + ) (i32.const 40) ) (block - (i32.const 50) + (drop + (i32.const 50) + ) (i32.const 60) ) ) diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast index 85bb11da6..562c5bbba 100644 --- a/test/passes/remove-unused-names_merge-blocks.wast +++ b/test/passes/remove-unused-names_merge-blocks.wast @@ -1,23 +1,29 @@ (module (memory 256 256) (type $i (func (param i32))) - (type $ii (func (param i32) (param i32))) - (type $iii (func (param i32) (param i32) (param i32))) + (type $ii (func (param i32 i32))) + (type $iii (func (param i32 i32 i32))) + (type $3 (func)) (table $call-i) - (func $call-i (param i32) + (func $call-i (type $i) (param $0 i32) + (nop) ) - (func $call-ii (param i32) (param i32) + (func $call-ii (type $ii) (param $0 i32) (param $1 i32) + (nop) ) - (func $call-iii (param i32) (param i32) (param i32) + (func $call-iii (type $iii) (param $0 i32) (param $1 i32) (param $2 i32) + (nop) ) - (func $b0-yes (param $i1 i32) + (func $b0-yes (type $i) (param $i1 i32) (block $topmost - (block - (i32.const 10) + (block $block0 + (drop + (i32.const 10) + ) ) ) ) - (func $b0-no (param $i1 i32) + (func $b0-no (type $i) (param $i1 i32) (block $topmost (block $block0 (br $block0) @@ -25,577 +31,836 @@ (br $topmost) ) ) - (func $b0-br-but-ok (param $i1 i32) + (func $b0-br-but-ok (type $i) (param $i1 i32) (block $topmost (block $block0 (br $topmost) ) ) ) - (func $b1-yes (param $i1 i32) + (func $b1-yes (type $i) (param $i1 i32) (block $topmost - (block - (block - (i32.const 10) + (block $block0 + (block $block1 + (drop + (i32.const 10) + ) ) ) ) ) - (func $b2-yes (param $i1 i32) + (func $b2-yes (type $i) (param $i1 i32) (block $topmost - (i32.const 5) - (block - (i32.const 10) + (drop + (i32.const 5) + ) + (block $block0 + (drop + (i32.const 10) + ) + ) + (drop + (i32.const 15) ) - (i32.const 15) ) ) - (func $b3-yes (param $i1 i32) + (func $b3-yes (type $i) (param $i1 i32) (block $topmost - (i32.const 3) - (block - (i32.const 6) - (block - (i32.const 10) + (drop + (i32.const 3) + ) + (block $block0 + (drop + (i32.const 6) ) - (i32.const 15) + (block $block1 + (drop + (i32.const 10) + ) + ) + (drop + (i32.const 15) + ) + ) + (drop + (i32.const 20) ) - (i32.const 20) ) ) - (func $b4 (param $i1 i32) + (func $b4 (type $i) (param $i1 i32) (block $topmost (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) ) ) - (func $b5 (param $i1 i32) + (func $b5 (type $i) (param $i1 i32) (block $topmost (block $middle (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) (br $middle) ) ) ) - (func $b6 (param $i1 i32) + (func $b6 (type $i) (param $i1 i32) (block $topmost - (i32.const 5) + (drop + (i32.const 5) + ) (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) - (i32.const 15) + (drop + (i32.const 15) + ) ) ) - (func $b7 (param $i1 i32) + (func $b7 (type $i) (param $i1 i32) (block $topmost - (i32.const 3) + (drop + (i32.const 3) + ) (block $middle - (i32.const 6) + (drop + (i32.const 6) + ) (block $inner - (i32.const 10) + (drop + (i32.const 10) + ) (br $inner) ) - (i32.const 15) + (drop + (i32.const 15) + ) (br $middle) ) - (i32.const 20) + (drop + (i32.const 20) + ) ) ) - (func $unary + (func $unary (type $3) (local $x i32) - (i32.eqz - (block - (i32.const 10) + (drop + (i32.eqz + (block $block0 + (i32.const 10) + ) ) ) - (i32.eqz - (block - (i32.const 10) - (i32.const 20) + (drop + (i32.eqz + (block $block1 + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) ) - (i32.eqz - (block - (i32.const 10) - (i32.const 20) - (i32.const 30) + (drop + (i32.eqz + (block $block2 + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (i32.const 30) + ) ) ) (set_local $x - (block - (i32.const 10) + (block $block3 + (drop + (i32.const 10) + ) (i32.const 20) ) ) - (i32.load - (block - (i32.const 10) - (i32.const 20) + (drop + (i32.load + (block $block4 + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) ) (return - (block - (i32.const 10) + (block $block5 + (drop + (i32.const 10) + ) (unreachable) ) ) ) - (func $binary - (i32.add - (block - (i32.const 10) - ) - (i32.const 20) - ) - (i32.add - (block - (i32.const 10) - (i32.const 20) - ) - (i32.const 30) - ) - (i32.add - (block - (i32.const 10) - (i32.const 20) - (i32.const 30) - ) - (i32.const 40) - ) - (i32.add - (i32.const 10) - (block + (func $binary (type $3) + (drop + (i32.add + (block $block0 + (i32.const 10) + ) (i32.const 20) ) ) - (i32.add - (i32.const 10) - (block - (i32.const 20) + (drop + (i32.add + (block $block1 + (drop + (i32.const 10) + ) + (i32.const 20) + ) (i32.const 30) ) ) - (i32.add - (i32.const 10) - (block - (i32.const 20) - (i32.const 30) + (drop + (i32.add + (block $block2 + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (i32.const 30) + ) (i32.const 40) ) ) - (i32.add - (block + (drop + (i32.add (i32.const 10) + (block $block3 + (i32.const 20) + ) ) - (block - (i32.const 20) + ) + (drop + (i32.add + (i32.const 10) + (block $block4 + (drop + (i32.const 20) + ) + (i32.const 30) + ) ) ) - (i32.add - (block + (drop + (i32.add (i32.const 10) - (i32.const 20) + (block $block5 + (drop + (i32.const 20) + ) + (drop + (i32.const 30) + ) + (i32.const 40) + ) ) - (block - (i32.const 30) - (i32.const 40) + ) + (drop + (i32.add + (block $block6 + (i32.const 10) + ) + (block $block7 + (i32.const 20) + ) ) ) - (i32.add - (block - (i32.const 10) - (i32.const 20) - (i32.const 30) + (drop + (i32.add + (block $block8 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block9 + (drop + (i32.const 30) + ) + (i32.const 40) + ) ) - (block - (i32.const 40) - (i32.const 50) - (i32.const 60) + ) + (drop + (i32.add + (block $block10 + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (i32.const 30) + ) + (block $block11 + (drop + (i32.const 40) + ) + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) (i32.store (i32.const 10) - (block - (i32.const 20) + (block $block12 + (drop + (i32.const 20) + ) (i32.const 30) ) ) (i32.store - (block - (i32.const 10) + (block $block13 + (drop + (i32.const 10) + ) (i32.const 20) ) (i32.const 30) ) - (i32.add - (unreachable) ;; do not move across this TODO: move non-side-effecting - (block - (i32.const 10) - (i32.const 20) + (drop + (i32.add + (unreachable) + (block $block14 + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) ) - (i32.add - (block - (unreachable) ;; moves out, so does not block the rest - (i32.const 10) - ) - (block - (i32.const 20) - (i32.const 30) + (drop + (i32.add + (block $block15 + (unreachable) + (i32.const 10) + ) + (block $block16 + (drop + (i32.const 20) + ) + (i32.const 30) + ) ) ) ) - (func $trinary - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (i32.const 50) - (i32.const 60) + (func $trinary (type $3) + (drop + (select + (block $block0 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block1 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block2 + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - ) - (block - (i32.const 20) - (i32.const 30) - ) - (block - (i32.const 40) - (i32.const 50) + (drop + (select + (block $block3 + (i32.const 10) + ) + (block $block4 + (drop + (i32.const 20) + ) + (i32.const 30) + ) + (block $block5 + (drop + (i32.const 40) + ) + (i32.const 50) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - ) - (block - (i32.const 40) - (i32.const 50) + (drop + (select + (block $block6 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block7 + (i32.const 30) + ) + (block $block8 + (drop + (i32.const 40) + ) + (i32.const 50) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (i32.const 50) + (drop + (select + (block $block9 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block10 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block11 + (i32.const 50) + ) ) ) - (select - (block - (i32.const 10) - ) - (block - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) + (drop + (select + (block $block12 + (i32.const 10) + ) + (block $block13 + (i32.const 20) + ) + (block $block14 + (drop + (i32.const 30) + ) + (i32.const 40) + ) ) ) - (select - (block - (i32.const 10) - ) - (block - (i32.const 20) - (i32.const 30) - ) - (block - (i32.const 40) + (drop + (select + (block $block15 + (i32.const 10) + ) + (block $block16 + (drop + (i32.const 20) + ) + (i32.const 30) + ) + (block $block17 + (i32.const 40) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - ) - (block - (i32.const 40) + (drop + (select + (block $block18 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block19 + (i32.const 30) + ) + (block $block20 + (i32.const 40) + ) ) ) - ;; now for bad stuff - (select - (block - (unreachable) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (i32.const 50) - (i32.const 60) + (drop + (select + (block $block21 + (unreachable) + (i32.const 20) + ) + (block $block22 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block23 + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - (unreachable) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (i32.const 50) - (i32.const 60) + (drop + (select + (block $block24 + (drop + (i32.const 10) + ) + (unreachable) + ) + (block $block25 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block26 + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (unreachable) - (i32.const 40) - ) - (block - (i32.const 50) - (i32.const 60) + (drop + (select + (block $block27 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block28 + (unreachable) + (i32.const 40) + ) + (block $block29 + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (unreachable) - ) - (block - (i32.const 50) - (i32.const 60) + (drop + (select + (block $block30 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block31 + (drop + (i32.const 30) + ) + (unreachable) + ) + (block $block32 + (drop + (i32.const 50) + ) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (unreachable) - (i32.const 60) + (drop + (select + (block $block33 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block34 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block35 + (unreachable) + (i32.const 60) + ) ) ) - (select - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) - ) - (block - (i32.const 50) - (unreachable) + (drop + (select + (block $block36 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block37 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + (block $block38 + (drop + (i32.const 50) + ) + (unreachable) + ) ) ) ) - (func $breaks + (func $breaks (type $3) (block $out - (br $out - (block - (i32.const 10) - (i32.const 20) + (block + (drop + (block $block0 + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) + (br $out) ) (br_if $out - (block - (i32.const 10) + (block $block1 + (drop + (i32.const 10) + ) (i32.const 20) ) ) - (br_if $out - (block - (i32.const 10) - (i32.const 20) + (block + (drop + (block $block2 + (drop + (i32.const 10) + ) + (i32.const 20) + ) ) - (block - (i32.const 30) - (i32.const 40) + (br_if $out + (block $block3 + (drop + (i32.const 30) + ) + (i32.const 40) + ) ) ) (br_table $out $out - (block - (i32.const 10) + (block $block4 + (drop + (i32.const 10) + ) (i32.const 20) ) ) - (br_table $out $out - (block - (i32.const 10) - (i32.const 20) - ) - (block - (i32.const 30) - (i32.const 40) + (drop + (block $out2 + (br_table $out2 $out2 + (block $block5 + (drop + (i32.const 10) + ) + (i32.const 20) + ) + (block $block6 + (drop + (i32.const 30) + ) + (i32.const 40) + ) + ) ) ) + (unreachable) ) ) - (func $calls + (func $calls (type $3) (call $call-i - (block + (block $block0 (i32.const 10) ) ) (call $call-i - (block - (i32.const 10) + (block $block1 + (drop + (i32.const 10) + ) (i32.const 20) ) ) (call $call-i - (block - (i32.const 10) - (i32.const 20) + (block $block2 + (drop + (i32.const 10) + ) + (drop + (i32.const 20) + ) (i32.const 30) ) ) (call $call-ii - (block - (i32.const 10) + (block $block3 + (drop + (i32.const 10) + ) (i32.const 20) ) - (block - (i32.const 30) + (block $block4 + (drop + (i32.const 30) + ) (i32.const 40) ) ) (call $call-ii - (block + (block $block5 (unreachable) (i32.const 10) ) - (block - (i32.const 20) + (block $block6 + (drop + (i32.const 20) + ) (i32.const 30) ) ) (call $call-ii - (block - (i32.const 10) + (block $block7 + (drop + (i32.const 10) + ) (unreachable) ) - (block - (i32.const 20) + (block $block8 + (drop + (i32.const 20) + ) (i32.const 30) ) ) (call $call-ii - (block - (i32.const 10) + (block $block9 + (drop + (i32.const 10) + ) (i32.const 20) ) - (block + (block $block10 (unreachable) (i32.const 30) ) ) (call $call-ii - (block - (i32.const 10) + (block $block11 + (drop + (i32.const 10) + ) (i32.const 20) ) - (block - (i32.const 30) + (block $block12 + (drop + (i32.const 30) + ) (unreachable) ) ) (call $call-iii - (block - (i32.const 10) + (block $block13 + (drop + (i32.const 10) + ) (i32.const 20) ) - (block - (i32.const 30) + (block $block14 + (drop + (i32.const 30) + ) (i32.const 40) ) - (block - (i32.const 50) + (block $block15 + (drop + (i32.const 50) + ) (i32.const 60) ) ) (call $call-iii - (block - (i32.const 10) + (block $block16 + (drop + (i32.const 10) + ) (i32.const 20) ) (i32.const 30) - (block - (i32.const 40) + (block $block17 + (drop + (i32.const 40) + ) (i32.const 50) ) ) (call_indirect $ii - (block - (i32.const 10) + (block $block18 + (drop + (i32.const 10) + ) (i32.const 20) ) - (block - (i32.const 30) + (block $block19 + (drop + (i32.const 30) + ) (i32.const 40) ) - (block - (i32.const 50) + (block $block20 + (drop + (i32.const 50) + ) (i32.const 60) ) ) (call_indirect $ii (unreachable) - (block - (i32.const 30) + (block $block21 + (drop + (i32.const 30) + ) (i32.const 40) ) - (block - (i32.const 50) + (block $block22 + (drop + (i32.const 50) + ) (i32.const 60) ) ) ) - (func $block-type-change + (func $block-type-change (type $3) (local $0 f64) (local $1 f64) (if (f64.gt (get_local $0) - (block + (block $block0 (nop) (get_local $1) ) @@ -604,4 +869,3 @@ ) ) ) - diff --git a/test/passes/reorder-functions.wast b/test/passes/reorder-functions.wast index 99a8363d4..a69afa3b9 100644 --- a/test/passes/reorder-functions.wast +++ b/test/passes/reorder-functions.wast @@ -1,6 +1,16 @@ (module (memory 256 256) - (func $a (call $a)) - (func $b (call $b) (call $b)) - (func $c (call $c) (call $c) (call $c)) + (type $0 (func)) + (func $a (type $0) + (call $a) + ) + (func $b (type $0) + (call $b) + (call $b) + ) + (func $c (type $0) + (call $c) + (call $c) + (call $c) + ) ) diff --git a/test/passes/reorder-locals.txt b/test/passes/reorder-locals.txt index 7ecb7c4a4..c2b481cab 100644 --- a/test/passes/reorder-locals.txt +++ b/test/passes/reorder-locals.txt @@ -45,7 +45,9 @@ ) (func $zero (type $1) (local $b i32) - (get_local $b) + (drop + (get_local $b) + ) ) (func $null (type $1) (nop) diff --git a/test/passes/reorder-locals.wast b/test/passes/reorder-locals.wast index 832889a78..872d352ee 100644 --- a/test/passes/reorder-locals.wast +++ b/test/passes/reorder-locals.wast @@ -1,29 +1,59 @@ (module (memory 256 256) - (func $b0-yes (param $a i32) (param $b i32) + (type $0 (func (param i32 i32))) + (type $1 (func)) + (func $b0-yes (type $0) (param $a i32) (param $b i32) (local $x i32) (local $y i32) (local $z i32) - - ;; Should reverse the order of the locals. - (set_local $x (get_local $x)) - (set_local $y (get_local $y)) (set_local $y (get_local $y)) - (set_local $z (get_local $z)) (set_local $z (get_local $z)) (set_local $z (get_local $z)) - - ;; Should not touch the args. - (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) - (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) + (set_local $x + (get_local $x) + ) + (set_local $y + (get_local $y) + ) + (set_local $y + (get_local $y) + ) + (set_local $z + (get_local $z) + ) + (set_local $z + (get_local $z) + ) + (set_local $z + (get_local $z) + ) + (set_local $b + (get_local $b) + ) + (set_local $b + (get_local $b) + ) + (set_local $b + (get_local $b) + ) + (set_local $b + (get_local $b) + ) + (set_local $b + (get_local $b) + ) + (set_local $b + (get_local $b) + ) ) - (func $zero + (func $zero (type $1) (local $a i32) (local $b i32) (local $c i32) - (get_local $b) ;; a and c are untouched + (drop + (get_local $b) + ) ) - (func $null + (func $null (type $1) (local $a i32) (local $c i32) - (nop) ;; a and c are untouched + (nop) ) ) - diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index 0ca96893f..f2425b364 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -16,66 +16,128 @@ (local $y i32) (local $a i32) (local $b i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) (nop) - (i32.const 5) + (drop + (i32.const 5) + ) (block $block0 (nop) - (i32.const 7) + (drop + (i32.const 7) + ) ) (nop) - (i32.const 11) - (i32.const 9) - (get_local $y) + (drop + (i32.const 11) + ) + (drop + (i32.const 9) + ) + (drop + (get_local $y) + ) (block $block1 - (i32.const 8) + (drop + (i32.const 8) + ) + (drop + (get_local $y) + ) + ) + (drop + (i32.const 11) + ) + (drop (get_local $y) ) - (i32.const 11) - (get_local $y) (nop) (nop) (nop) (nop) (nop) (nop) - (i32.const 17) + (drop + (i32.const 17) + ) (block $block2 (nop) (nop) - (i32.const 1) - (i32.const 2) - (i32.const 3) - (i32.const 4) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + (drop + (i32.const 3) + ) + (drop + (i32.const 4) + ) (nop) (nop) - (i32.const 6) - (i32.const 5) - (i32.const 7) - (i32.const 8) + (drop + (i32.const 6) + ) + (drop + (i32.const 5) + ) + (drop + (i32.const 7) + ) + (drop + (i32.const 8) + ) (nop) (nop) (call_import $waka) - (i32.const 9) - (i32.const 10) - (i32.const 11) - (i32.const 12) + (drop + (i32.const 9) + ) + (drop + (i32.const 10) + ) + (drop + (i32.const 11) + ) + (drop + (i32.const 12) + ) (nop) (nop) - (i32.load - (i32.const 24) + (drop + (i32.load + (i32.const 24) + ) + ) + (drop + (i32.const 13) + ) + (drop + (i32.const 14) + ) + (drop + (i32.const 15) + ) + (drop + (i32.const 16) ) - (i32.const 13) - (i32.const 14) - (i32.const 15) - (i32.const 16) (nop) (nop) (i32.store (i32.const 48) (i32.const 96) ) - (i32.const 17) - (i32.const 18) + (drop + (i32.const 17) + ) + (drop + (i32.const 18) + ) ) (block $block3 (nop) @@ -87,15 +149,21 @@ (call_import $waka_int) ) (call_import $waka) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) (set_local $a (call_import $waka_int) ) - (i32.load - (i32.const 1) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (get_local $a) ) - (get_local $a) (call_import $waka) (set_local $a (call_import $waka_int) @@ -104,7 +172,9 @@ (i32.const 1) (i32.const 2) ) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) (nop) (set_local $a @@ -114,8 +184,10 @@ ) (call_import $waka) (nop) - (i32.load - (i32.const 1) + (drop + (i32.load + (i32.const 1) + ) ) (set_local $a (i32.load @@ -129,7 +201,9 @@ ) ) (call_import $waka) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) (set_local $a (i32.load @@ -140,73 +214,123 @@ (i32.const 1) (i32.const 2) ) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) (nop) (set_local $a - (i32.store - (i32.const 104) - (i32.const 105) + (block $block0 + (block $block1 + (nop) + (i32.store + (i32.const 104) + (tee_local $5 + (i32.const 105) + ) + ) + ) + (get_local $5) ) ) (call_import $waka) (set_local $a - (i32.store - (i32.const 106) - (i32.const 107) + (block $block2 + (block $block4 + (nop) + (i32.store + (i32.const 106) + (tee_local $6 + (i32.const 107) + ) + ) + ) + (get_local $6) ) ) (call_import $waka) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) (set_local $a - (i32.store - (i32.const 108) - (i32.const 109) + (block $block5 + (block $block6 + (nop) + (i32.store + (i32.const 108) + (tee_local $7 + (i32.const 109) + ) + ) + ) + (get_local $7) ) ) - (i32.load - (i32.const 1) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (get_local $a) ) - (get_local $a) (call_import $waka) (set_local $a - (i32.store - (i32.const 110) - (i32.const 111) + (block $block7 + (block $block8 + (nop) + (i32.store + (i32.const 110) + (tee_local $8 + (i32.const 111) + ) + ) + ) + (get_local $8) ) ) (i32.store (i32.const 1) (i32.const 2) ) - (get_local $a) + (drop + (get_local $a) + ) (call_import $waka) ) (block $out-of-block (nop) (nop) - (block $b - (block $c - (br $b - (i32.const 1337) + (drop + (block $b + (block $c + (br $b + (i32.const 1337) + ) ) + (nop) + (i32.const 9876) ) - (nop) - (i32.const 9876) ) ) (block $loopey (set_local $a (i32.const 1337) ) - (loop $loop-out4 $loop-in5 - (get_local $a) - (set_local $a - (i32.const 9876) + (drop + (loop $loop-out4 $loop-in5 + (drop + (get_local $a) + ) + (tee_local $a + (i32.const 9876) + ) ) ) - (get_local $a) + (drop + (get_local $a) + ) ) ) (func $Ia (type $5) (param $a i32) (result i32) @@ -229,7 +353,7 @@ ) (nop) (i32.store8 - (set_local $bi3 + (tee_local $bi3 (i32.const 1) ) (get_local $bi3) @@ -240,7 +364,7 @@ (get_local $bi3) ) (set_local $di3 - (set_local $bi3 + (tee_local $bi3 (i32.const 123) ) ) @@ -248,7 +372,9 @@ (get_local $bi3) (get_local $di3) ) - (i32.const 456) + (drop + (i32.const 456) + ) ) (func $___remdi3 (type $FUNCSIG$iiiii) (param $$a$0 i32) (param $$a$1 i32) (param $$b$0 i32) (param $$b$1 i32) (result i32) (local $$1$1 i32) @@ -285,124 +411,126 @@ (nop) (nop) (nop) - (call_import $___udivmoddi4 - (call_import $_i64Subtract - (i32.xor - (set_local $$1$0 - (i32.or - (i32.shr_s - (get_local $$a$1) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$a$1) + (drop + (call_import $___udivmoddi4 + (call_import $_i64Subtract + (i32.xor + (tee_local $$1$0 + (i32.or + (i32.shr_s + (get_local $$a$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $$a$0) ) - (get_local $$a$0) - ) - (i32.xor - (set_local $$1$1 - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$a$1) + (i32.xor + (tee_local $$1$1 + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$a$1) + (i32.shl + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $$a$1) ) - (get_local $$a$1) + (get_local $$1$0) + (get_local $$1$1) ) - (get_local $$1$0) - (get_local $$1$1) - ) - (i32.load - (i32.const 168) - ) - (call_import $_i64Subtract - (i32.xor - (set_local $$2$0 - (i32.or - (i32.shr_s - (get_local $$b$1) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$b$1) + (i32.load + (i32.const 168) + ) + (call_import $_i64Subtract + (i32.xor + (tee_local $$2$0 + (i32.or + (i32.shr_s + (get_local $$b$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $$b$0) ) - (get_local $$b$0) - ) - (i32.xor - (set_local $$2$1 - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$b$1) + (i32.xor + (tee_local $$2$1 + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$b$1) + (i32.shl + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) + (get_local $$b$1) ) - (get_local $$b$1) + (get_local $$2$0) + (get_local $$2$1) ) - (get_local $$2$0) - (get_local $$2$1) - ) - (i32.load - (i32.const 168) + (i32.load + (i32.const 168) + ) + (get_local $$rem) ) - (get_local $$rem) ) (set_local $$10$0 (call_import $_i64Subtract @@ -458,7 +586,9 @@ ) (i32.const 1) ) - (get_local $x) + (drop + (get_local $x) + ) (block $waka2 (set_local $x (if @@ -517,8 +647,12 @@ (get_local $r) (get_local $t) ) - (get_local $m) - (get_local $t) + (drop + (get_local $m) + ) + (drop + (get_local $t) + ) ) (func $switch-def (type $5) (param $i3 i32) (result i32) (local $i1 i32) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 521e8bac4..07d7ccd03 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -1,153 +1,386 @@ (module (memory 256 256) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $4 (func (param i32))) + (type $5 (func (param i32) (result i32))) + (type $6 (func (param i32 i32 i32 i32 i32 i32))) (import $waka "env" "waka") (import $waka_int "env" "waka_int" (result i32)) (import $_i64Subtract "env" "i64sub" (param i32 i32 i32 i32) (result i32)) (import $___udivmoddi4 "env" "moddi" (param i32 i32 i32 i32 i32) (result i32)) - (func $b0-yes (param $i1 i32) + (func $b0-yes (type $4) (param $i1 i32) (local $x i32) (local $y i32) (local $a i32) (local $b i32) - (set_local $x (i32.const 5)) - (get_local $x) - (block - (set_local $x (i32.const 7)) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (set_local $x + (i32.const 5) + ) + (drop (get_local $x) ) - (set_local $x (i32.const 11)) - (get_local $x) - (set_local $x (i32.const 9)) - (get_local $y) - (block - (set_local $x (i32.const 8)) + (block $block0 + (set_local $x + (i32.const 7) + ) + (drop + (get_local $x) + ) + ) + (set_local $x + (i32.const 11) + ) + (drop + (get_local $x) + ) + (set_local $x + (i32.const 9) + ) + (drop (get_local $y) ) - (set_local $x (i32.const 11)) - (get_local $y) - (set_local $x (i32.const 17)) - (get_local $x) - (get_local $x) - (get_local $x) - (get_local $x) - (get_local $x) - (get_local $x) - (block - (set_local $a (i32.const 1)) - (set_local $b (i32.const 2)) - (get_local $a) - (get_local $b) - (set_local $a (i32.const 3)) - (set_local $b (i32.const 4)) - (set_local $a (i32.const 5)) - (set_local $b (i32.const 6)) - (get_local $b) - (get_local $a) - (set_local $a (i32.const 7)) - (set_local $b (i32.const 8)) - (set_local $a (i32.const 9)) - (set_local $b (i32.const 10)) + (block $block1 + (set_local $x + (i32.const 8) + ) + (drop + (get_local $y) + ) + ) + (set_local $x + (i32.const 11) + ) + (drop + (get_local $y) + ) + (set_local $x + (i32.const 17) + ) + (drop + (get_local $x) + ) + (drop + (get_local $x) + ) + (drop + (get_local $x) + ) + (drop + (get_local $x) + ) + (drop + (get_local $x) + ) + (drop + (get_local $x) + ) + (block $block2 + (set_local $a + (i32.const 1) + ) + (set_local $b + (i32.const 2) + ) + (drop + (get_local $a) + ) + (drop + (get_local $b) + ) + (set_local $a + (i32.const 3) + ) + (set_local $b + (i32.const 4) + ) + (set_local $a + (i32.const 5) + ) + (set_local $b + (i32.const 6) + ) + (drop + (get_local $b) + ) + (drop + (get_local $a) + ) + (set_local $a + (i32.const 7) + ) + (set_local $b + (i32.const 8) + ) + (set_local $a + (i32.const 9) + ) + (set_local $b + (i32.const 10) + ) (call_import $waka) - (get_local $a) - (get_local $b) - (set_local $a (i32.const 11)) - (set_local $b (i32.const 12)) - (set_local $a (i32.const 13)) - (set_local $b (i32.const 14)) - (i32.load - (i32.const 24) + (drop + (get_local $a) + ) + (drop + (get_local $b) + ) + (set_local $a + (i32.const 11) + ) + (set_local $b + (i32.const 12) + ) + (set_local $a + (i32.const 13) + ) + (set_local $b + (i32.const 14) + ) + (drop + (i32.load + (i32.const 24) + ) + ) + (drop + (get_local $a) + ) + (drop + (get_local $b) + ) + (set_local $a + (i32.const 15) + ) + (set_local $b + (i32.const 16) + ) + (set_local $a + (i32.const 17) + ) + (set_local $b + (i32.const 18) ) - (get_local $a) - (get_local $b) - (set_local $a (i32.const 15)) - (set_local $b (i32.const 16)) - (set_local $a (i32.const 17)) - (set_local $b (i32.const 18)) (i32.store (i32.const 48) (i32.const 96) ) - (get_local $a) - (get_local $b) + (drop + (get_local $a) + ) + (drop + (get_local $b) + ) ) - (block - (set_local $a (call_import $waka_int)) - (get_local $a) ;; yes + (block $block3 + (set_local $a + (call_import $waka_int) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (call_import $waka_int)) + (set_local $a + (call_import $waka_int) + ) (call_import $waka) - (get_local $a) ;; no + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (call_import $waka_int)) - (i32.load (i32.const 1)) - (get_local $a) ;; no + (set_local $a + (call_import $waka_int) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (call_import $waka_int)) - (i32.store (i32.const 1) (i32.const 2)) - (get_local $a) ;; no + (set_local $a + (call_import $waka_int) + ) + (i32.store + (i32.const 1) + (i32.const 2) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.load (i32.const 100))) - (get_local $a) ;; yes + (set_local $a + (i32.load + (i32.const 100) + ) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.load (i32.const 101))) - (i32.load (i32.const 1)) - (get_local $a) ;; yes + (set_local $a + (i32.load + (i32.const 101) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.load (i32.const 102))) + (set_local $a + (i32.load + (i32.const 102) + ) + ) (call_import $waka) - (get_local $a) ;; no + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.load (i32.const 103))) - (i32.store (i32.const 1) (i32.const 2)) - (get_local $a) ;; no + (set_local $a + (i32.load + (i32.const 103) + ) + ) + (i32.store + (i32.const 1) + (i32.const 2) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.store (i32.const 104) (i32.const 105))) - (get_local $a) ;; yes + (set_local $a + (block + (block + (set_local $5 + (i32.const 105) + ) + (i32.store + (i32.const 104) + (get_local $5) + ) + ) + (get_local $5) + ) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.store (i32.const 106) (i32.const 107))) + (set_local $a + (block + (block + (set_local $6 + (i32.const 107) + ) + (i32.store + (i32.const 106) + (get_local $6) + ) + ) + (get_local $6) + ) + ) (call_import $waka) - (get_local $a) ;; no + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.store (i32.const 108) (i32.const 109))) - (i32.load (i32.const 1)) - (get_local $a) ;; no + (set_local $a + (block + (block + (set_local $7 + (i32.const 109) + ) + (i32.store + (i32.const 108) + (get_local $7) + ) + ) + (get_local $7) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (get_local $a) + ) (call_import $waka) - - (set_local $a (i32.store (i32.const 110) (i32.const 111))) - (i32.store (i32.const 1) (i32.const 2)) - (get_local $a) ;; no + (set_local $a + (block + (block + (set_local $8 + (i32.const 111) + ) + (i32.store + (i32.const 110) + (get_local $8) + ) + ) + (get_local $8) + ) + ) + (i32.store + (i32.const 1) + (i32.const 2) + ) + (drop + (get_local $a) + ) (call_import $waka) ) (block $out-of-block - (set_local $a (i32.const 1337)) + (set_local $a + (i32.const 1337) + ) (block $b (block $c (br $b) ) - (set_local $a (i32.const 9876)) + (set_local $a + (i32.const 9876) + ) + ) + (drop + (get_local $a) ) - (get_local $a) ) (block $loopey - (set_local $a (i32.const 1337)) - (loop + (set_local $a + (i32.const 1337) + ) + (drop + (loop $loop-out4 $loop-in5 + (drop + (get_local $a) + ) + (tee_local $a + (i32.const 9876) + ) + ) + ) + (drop (get_local $a) - (set_local $a (i32.const 9876)) ) - (get_local $a) ) ) - (func $Ia (param $a i32) (result i32) + (func $Ia (type $5) (param $a i32) (result i32) (local $b i32) (block $switch$0 (block $switch-default$6 @@ -160,7 +393,7 @@ (get_local $b) ) ) - (func $memories (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) + (func $memories (type $6) (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) (local $set_with_no_get i32) (set_local $i3 (i32.const 1) @@ -184,15 +417,19 @@ (get_local $ci3) ) (set_local $di3 - (set_local $bi3 (i32.const 123)) + (tee_local $bi3 + (i32.const 123) + ) ) (i32.store8 (get_local $bi3) (get_local $di3) ) - (set_local $set_with_no_get (i32.const 456)) + (set_local $set_with_no_get + (i32.const 456) + ) ) - (func $___remdi3 (param $$a$0 i32) (param $$a$1 i32) (param $$b$0 i32) (param $$b$1 i32) (result i32) + (func $___remdi3 (type $FUNCSIG$iiiii) (param $$a$0 i32) (param $$a$1 i32) (param $$b$0 i32) (param $$b$1 i32) (result i32) (local $$1$1 i32) (local $$1$0 i32) (local $$rem i32) @@ -325,30 +562,32 @@ (get_local $$1$1) ) ) - (set_local $$4$1 ;; first this moves, then $$4$0 should be able to move + (set_local $$4$1 (i32.load (i32.const 168) ) ) - (call_import $___udivmoddi4 - (get_local $$4$0) - (get_local $$4$1) - (call_import $_i64Subtract - (i32.xor + (drop + (call_import $___udivmoddi4 + (get_local $$4$0) + (get_local $$4$1) + (call_import $_i64Subtract + (i32.xor + (get_local $$2$0) + (get_local $$b$0) + ) + (i32.xor + (get_local $$2$1) + (get_local $$b$1) + ) (get_local $$2$0) - (get_local $$b$0) - ) - (i32.xor (get_local $$2$1) - (get_local $$b$1) ) - (get_local $$2$0) - (get_local $$2$1) - ) - (i32.load - (i32.const 168) + (i32.load + (i32.const 168) + ) + (get_local $$rem) ) - (get_local $$rem) ) (set_local $$10$0 (call_import $_i64Subtract @@ -378,7 +617,7 @@ (get_local $__stackBase__) ) (return - (block + (block $block12 (i32.store (i32.const 168) (get_local $$10$1) @@ -387,46 +626,64 @@ ) ) ) - (func $block-returns + (func $block-returns (type $FUNCSIG$v) (local $x i32) (block $out (block $waka - (set_local $x (i32.const 12)) + (set_local $x + (i32.const 12) + ) (br_if $waka (i32.const 1) ) - (set_local $x (i32.const 34)) + (set_local $x + (i32.const 34) + ) ) - (br_if $out ;; barrier + (br_if $out (i32.const 1) ) - (get_local $x) ;; a use, so setlocals are not all killed + (drop + (get_local $x) + ) (block $waka2 (if (i32.const 1) - (set_local $x (i32.const 13)) - (set_local $x (i32.const 24)) + (set_local $x + (i32.const 13) + ) + (set_local $x + (i32.const 24) + ) ) (if (i32.const 1) - (block - (set_local $x (i32.const 14)) + (block $block3 + (set_local $x + (i32.const 14) + ) ) - (block - (set_local $x (i32.const 25)) + (block $block5 + (set_local $x + (i32.const 25) + ) ) ) ) - (br_if $out ;; barrier + (br_if $out (i32.const 1) ) (block $sink-out-of-me-i-have-but-one-exit - (set_local $x (i32.const 99)) + (set_local $x + (i32.const 99) + ) + ) + (drop + (get_local $x) ) - (get_local $x) ) ) - (func $multiple (param $s i32) (param $r i32) (param $f i32) (param $p i32) (param $t i32) (param $m i32) + (func $multiple (type $6) (param $s i32) (param $r i32) (param $f i32) (param $p i32) (param $t i32) (param $m i32) (set_local $s (get_local $m) ) @@ -436,22 +693,26 @@ (get_local $p) ) ) - (set_local $t ;; t is equal to p's original value; p must not be set to before t gets that value + (set_local $t (get_local $p) ) (set_local $p (i32.load - (i32.const r) + (i32.const 0) ) ) (i32.store (get_local $r) (get_local $t) ) - (get_local $s) - (get_local $t) + (drop + (get_local $s) + ) + (drop + (get_local $t) + ) ) - (func $switch-def (param $i3 i32) (result i32) + (func $switch-def (type $5) (param $i3 i32) (result i32) (local $i1 i32) (set_local $i1 (i32.const 10) @@ -471,4 +732,3 @@ ) ) ) - diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index 7fa247bdd..c4004dd28 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -39,8 +39,18 @@ ) ) (func $binary (type $2) (result f32) - (unreachable) - (unreachable) + (drop + (f32.add + (unreachable) + (f32.const 3) + ) + ) + (drop + (f32.add + (f32.const 4) + (unreachable) + ) + ) (f32.add (unreachable) (unreachable) @@ -51,23 +61,45 @@ ) ) (func $select (type $3) (result i32) - (unreachable) - (unreachable) - (unreachable) + (drop + (select + (unreachable) + (i32.const 4) + (i32.const 5) + ) + ) + (drop + (select + (i32.const 6) + (unreachable) + (i32.const 7) + ) + ) + (drop + (select + (i32.const 8) + (i32.const 9) + (unreachable) + ) + ) (select (unreachable) (unreachable) (i32.const 10) ) - (select - (unreachable) - (i32.const 11) - (unreachable) + (drop + (select + (unreachable) + (i32.const 11) + (unreachable) + ) ) - (select - (i32.const 12) - (unreachable) - (unreachable) + (drop + (select + (i32.const 12) + (unreachable) + (unreachable) + ) ) (select (unreachable) @@ -110,7 +142,7 @@ (f64.ne (f64.promote/f32 (f32.load - (set_local $l + (tee_local $l (i32.add (get_local $b) (i32.const 60) diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast index a6f713123..7dc77eac6 100644 --- a/test/passes/vacuum.wast +++ b/test/passes/vacuum.wast @@ -1,36 +1,59 @@ (module (memory 256 256) - (func $b - (i32.const 50) + (type $0 (func)) + (type $1 (func (param i32))) + (type $2 (func (result f32))) + (type $3 (func (result i32))) + (type $4 (func (param i32 f64 i32 i32))) + (func $b (type $0) + (drop + (i32.const 50) + ) (nop) - (i32.const 51) + (drop + (i32.const 51) + ) (nop) (nop) - (i32.const 52) + (drop + (i32.const 52) + ) (block $waka1 - (i32.const 53) + (drop + (i32.const 53) + ) (br $waka1) - (i32.const 54) + (drop + (i32.const 54) + ) ) (block $waka2 (nop) (br $waka2) - (i32.const 56) + (drop + (i32.const 56) + ) ) (block $waka3 (br_table $waka3 $waka3 $waka3 (i32.const 57) ) - (i32.const 58) + (drop + (i32.const 58) + ) ) (if (i32.const 100) (nop) - (i32.const 101) + (drop + (i32.const 101) + ) ) (if (i32.const 102) - (i32.const 103) + (drop + (i32.const 103) + ) (nop) ) (if @@ -39,17 +62,27 @@ (nop) ) ) - (func $l + (func $l (type $0) (local $x i32) (local $y i32) - (get_local $x) - (set_local $x (get_local $x)) - (block $in-a-block + (drop (get_local $x) ) - (block $two-in-a-block + (set_local $x (get_local $x) - (get_local $y) + ) + (block $in-a-block + (drop + (get_local $x) + ) + ) + (block $two-in-a-block + (drop + (get_local $x) + ) + (drop + (get_local $y) + ) ) (set_local $x (block $result-used @@ -58,82 +91,197 @@ ) (set_local $x (block $two-and-result-used - (get_local $x) + (drop + (get_local $x) + ) (get_local $y) ) ) ) - (func $loopy (param $0 i32) - (loop (nop)) - (loop + (func $loopy (type $1) (param $0 i32) + (loop $loop-out0 $loop-in1 + (nop) + ) + (loop $loop-out2 $loop-in3 (nop) (nop) ) - (loop - (get_local $0) - (i32.const 20) + (drop + (loop $loop-out4 $loop-in5 + (drop + (get_local $0) + ) + (i32.const 20) + ) ) ) - (func $unary (result f32) - (f32.abs (f32.const 1.0)) ;; unneeded position - (f32.abs (unreachable)) ;; side effects - - (f32.abs (f32.const 2.0)) ;; return position + (func $unary (type $2) (result f32) + (drop + (f32.abs + (f32.const 1) + ) + ) + (f32.abs + (unreachable) + ) + (f32.abs + (f32.const 2) + ) ) - (func $binary (result f32) - (f32.add (f32.const 1.0) (f32.const 2.0)) - (f32.add (unreachable) (f32.const 3.0)) - (f32.add (f32.const 4.0) (unreachable)) - (f32.add (unreachable) (unreachable)) - - (f32.add (f32.const 5.0) (f32.const 6.0)) + (func $binary (type $2) (result f32) + (drop + (f32.add + (f32.const 1) + (f32.const 2) + ) + ) + (drop + (f32.add + (unreachable) + (f32.const 3) + ) + ) + (drop + (f32.add + (f32.const 4) + (unreachable) + ) + ) + (f32.add + (unreachable) + (unreachable) + ) + (f32.add + (f32.const 5) + (f32.const 6) + ) ) - (func $select (result i32) - (select (i32.const 1) (i32.const 2) (i32.const 3)) - (select (unreachable) (i32.const 4) (i32.const 5)) - (select (i32.const 6) (unreachable) (i32.const 7)) - (select (i32.const 8) (i32.const 9) (unreachable)) - (select (unreachable) (unreachable) (i32.const 10)) - (select (unreachable) (i32.const 11) (unreachable)) - (select (i32.const 12) (unreachable) (unreachable)) - (select (unreachable) (unreachable) (unreachable)) - - (select (i32.const 13) (i32.const 14) (i32.const 15)) + (func $select (type $3) (result i32) + (drop + (select + (i32.const 1) + (i32.const 2) + (i32.const 3) + ) + ) + (drop + (select + (unreachable) + (i32.const 4) + (i32.const 5) + ) + ) + (drop + (select + (i32.const 6) + (unreachable) + (i32.const 7) + ) + ) + (drop + (select + (i32.const 8) + (i32.const 9) + (unreachable) + ) + ) + (select + (unreachable) + (unreachable) + (i32.const 10) + ) + (drop + (select + (unreachable) + (i32.const 11) + (unreachable) + ) + ) + (drop + (select + (i32.const 12) + (unreachable) + (unreachable) + ) + ) + (select + (unreachable) + (unreachable) + (unreachable) + ) + (select + (i32.const 13) + (i32.const 14) + (i32.const 15) + ) ) - (func $block-to-one - (block - (nop) (nop) + (func $block-to-one (type $0) + (block $block0 + (nop) + (nop) ) - (block - (nop) (unreachable) + (block $block1 + (nop) + (unreachable) ) - (block - (nop) (unreachable) (nop) + (block $block2 + (nop) + (unreachable) + (nop) ) - (block - (unreachable) (nop) + (block $block3 + (unreachable) + (nop) ) - (block + (block $block4 (unreachable) ) ) - (func $recurse + (func $recurse (type $0) (nop) - (f32.abs (f32.abs (f32.abs (f32.abs (f32.abs (f32.abs (f32.const 1.0) ) ) ) ) ) ) + (drop + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.const 1) + ) + ) + ) + ) + ) + ) + ) ) - (func $func-block - (f32.abs (f32.abs (f32.abs (f32.abs (f32.abs (f32.abs (f32.const 1.0) ) ) ) ) ) ) + (func $func-block (type $0) + (drop + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.abs + (f32.const 1) + ) + ) + ) + ) + ) + ) + ) ) - (func $Gu (param $b i32) (param $e f64) (param $l i32) (param $d i32) - (if ;; if condition must remain valid + (func $Gu (type $4) (param $b i32) (param $e f64) (param $l i32) (param $d i32) + (if (if (get_local $d) - (block + (block $block1 (nop) (f64.ne (f64.promote/f32 (f32.load - (set_local $l + (tee_local $l (i32.add (get_local $b) (i32.const 60) @@ -150,4 +298,3 @@ ) ) ) - diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 98ca149e1..0b1ed182d 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -14,7 +14,7 @@ (f64.convert_s/i32 (get_local $2) ) - (set_local $5 + (tee_local $5 (f64.convert_s/i32 (i32.mul (get_local $1) @@ -37,7 +37,7 @@ (f64.convert_s/i32 (get_local $2) ) - (set_local $5 + (tee_local $5 (f64.convert_s/i32 (i32.mul (get_local $3) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index ad7e9e61a..77ea9a202 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -12,7 +12,7 @@ (f64.convert_s/i32 (get_local $2) ) - (set_local $5 + (tee_local $5 (f64.convert_s/i32 (i32.mul (get_local $1) @@ -35,7 +35,7 @@ (f64.convert_s/i32 (get_local $2) ) - (set_local $5 + (tee_local $5 (f64.convert_s/i32 (i32.mul (get_local $3) diff --git a/test/unit.asm.js b/test/unit.asm.js index 380c97b41..5eb48f776 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -261,6 +261,16 @@ function asm(global, env, buffer) { return x | 0; } + function smallIf() { + do { + if (2) { + lb(3) | 0; + } else { + break; + } + } while (0); + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 49189df43..5a790c92f 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -96,13 +96,19 @@ (local $0 f64) (local $1 f32) (local $2 i32) - (call_import $f64-to-int - (get_local $0) - ) - (set_local $2 + (drop (call_import $f64-to-int - (f64.promote/f32 - (get_local $1) + (get_local $0) + ) + ) + (drop + (f64.convert_s/i32 + (tee_local $2 + (call_import $f64-to-int + (f64.promote/f32 + (get_local $1) + ) + ) ) ) ) @@ -350,23 +356,29 @@ (nop) ) (func $recursiveBlockMerging (param $0 i32) (result i32) - (call $lb - (i32.add + (drop + (call $lb (i32.add (i32.add - (get_local $0) - (i32.const 3) + (i32.add + (get_local $0) + (i32.const 3) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 12) ) - (i32.const 12) ) ) - (call $lb - (i32.const 1) + (drop + (call $lb + (i32.const 1) + ) ) - (call $lb - (i32.const 2) + (drop + (call $lb + (i32.const 2) + ) ) (i32.add (i32.add @@ -377,14 +389,20 @@ ) ) (block - (call $lb - (i32.const 4) + (drop + (call $lb + (i32.const 4) + ) ) - (call $lb - (i32.const 5) + (drop + (call $lb + (i32.const 5) + ) ) - (call $lb - (i32.const 6) + (drop + (call $lb + (i32.const 6) + ) ) (call $lb (i32.const 7) @@ -392,17 +410,25 @@ ) ) (block - (call $lb - (i32.const 8) + (drop + (call $lb + (i32.const 8) + ) ) - (call $lb - (i32.const 9) + (drop + (call $lb + (i32.const 9) + ) ) - (call $lb - (i32.const 10) + (drop + (call $lb + (i32.const 10) + ) ) - (call $lb - (i32.const 11) + (drop + (call $lb + (i32.const 11) + ) ) (call $lb (i32.const 12) @@ -464,4 +490,12 @@ (i32.const 1) ) ) + (func $smallIf + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index d2c10b549..f81663fa1 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -91,9 +91,13 @@ (func $conversions (local $0 f32) (local $1 i32) - (set_local $1 - (i32.trunc_s/f32 - (get_local $0) + (drop + (f64.convert_s/i32 + (tee_local $1 + (i32.trunc_s/f32 + (get_local $0) + ) + ) ) ) ) @@ -334,23 +338,29 @@ (nop) ) (func $recursiveBlockMerging (param $0 i32) (result i32) - (call $lb - (i32.add + (drop + (call $lb (i32.add (i32.add - (get_local $0) - (i32.const 3) + (i32.add + (get_local $0) + (i32.const 3) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 12) ) - (i32.const 12) ) ) - (call $lb - (i32.const 1) + (drop + (call $lb + (i32.const 1) + ) ) - (call $lb - (i32.const 2) + (drop + (call $lb + (i32.const 2) + ) ) (i32.add (i32.add @@ -361,14 +371,20 @@ ) ) (block - (call $lb - (i32.const 4) + (drop + (call $lb + (i32.const 4) + ) ) - (call $lb - (i32.const 5) + (drop + (call $lb + (i32.const 5) + ) ) - (call $lb - (i32.const 6) + (drop + (call $lb + (i32.const 6) + ) ) (call $lb (i32.const 7) @@ -376,17 +392,25 @@ ) ) (block - (call $lb - (i32.const 8) + (drop + (call $lb + (i32.const 8) + ) ) - (call $lb - (i32.const 9) + (drop + (call $lb + (i32.const 9) + ) ) - (call $lb - (i32.const 10) + (drop + (call $lb + (i32.const 10) + ) ) - (call $lb - (i32.const 11) + (drop + (call $lb + (i32.const 11) + ) ) (call $lb (i32.const 12) @@ -448,4 +472,12 @@ (i32.const 1) ) ) + (func $smallIf + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 7037a6c1c..083e6f888 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -177,11 +177,15 @@ (set_local $J (f64.sub (block - (f64.const 0.1) + (drop + (f64.const 0.1) + ) (f64.const 5.1) ) (block - (f64.const 3.2) + (drop + (f64.const 3.2) + ) (f64.const 4.2) ) ) @@ -340,14 +344,28 @@ (func $fr (param $x f32) (local $y f32) (local $z f64) - (f32.demote/f64 - (get_local $z) + (drop + (block + (drop + (f32.demote/f64 + (get_local $z) + ) + ) + (drop + (get_local $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (f32.const 0) + ) ) - (get_local $y) - (f32.const 5) - (f32.const 0) - (f32.const 5) - (f32.const 0) ) (func $negZero (result f64) (return @@ -420,9 +438,11 @@ ) (func $___syscall_ret (local $$0 i32) - (i32.gt_u - (get_local $$0) - (i32.const -4096) + (drop + (i32.gt_u + (get_local $$0) + (i32.const -4096) + ) ) ) (func $smallCompare (result i32) @@ -558,57 +578,87 @@ ) (func $bitcasts (param $i i32) (param $f f32) (local $d f64) - (f32.reinterpret/i32 - (get_local $i) - ) - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (i32.reinterpret/f32 - (get_local $f) - ) - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) + (drop + (block + (drop + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) + ) + ) + ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) + ) ) ) ) (func $recursiveBlockMerging (param $x i32) (result i32) - (call $lb - (i32.add + (drop + (call $lb (i32.add (i32.add - (block - (i32.const 1) - (get_local $x) - ) - (block - (i32.const 2) - (i32.const 3) + (i32.add + (block + (drop + (i32.const 1) + ) + (get_local $x) + ) + (block + (drop + (i32.const 2) + ) + (i32.const 3) + ) ) - ) - (block (block - (block - (i32.const 4) - (i32.const 5) + (drop + (block + (drop + (block + (drop + (i32.const 4) + ) + (i32.const 5) + ) + ) + (i32.const 6) + ) ) - (i32.const 6) + (i32.const 7) ) - (i32.const 7) ) - ) - (block - (i32.const 8) (block - (i32.const 9) + (drop + (i32.const 8) + ) (block - (i32.const 10) + (drop + (i32.const 9) + ) (block - (i32.const 11) - (i32.const 12) + (drop + (i32.const 10) + ) + (block + (drop + (i32.const 11) + ) + (i32.const 12) + ) ) ) ) @@ -620,14 +670,18 @@ (i32.add (i32.add (block - (call $lb - (i32.const 1) + (drop + (call $lb + (i32.const 1) + ) ) (get_local $x) ) (block - (call $lb - (i32.const 2) + (drop + (call $lb + (i32.const 2) + ) ) (call $lb (i32.const 3) @@ -635,18 +689,24 @@ ) ) (block - (block + (drop (block - (call $lb - (i32.const 4) + (drop + (block + (drop + (call $lb + (i32.const 4) + ) + ) + (call $lb + (i32.const 5) + ) + ) ) (call $lb - (i32.const 5) + (i32.const 6) ) ) - (call $lb - (i32.const 6) - ) ) (call $lb (i32.const 7) @@ -654,20 +714,28 @@ ) ) (block - (call $lb - (i32.const 8) + (drop + (call $lb + (i32.const 8) + ) ) (block - (call $lb - (i32.const 9) + (drop + (call $lb + (i32.const 9) + ) ) (block - (call $lb - (i32.const 10) + (drop + (call $lb + (i32.const 10) + ) ) (block - (call $lb - (i32.const 11) + (drop + (call $lb + (i32.const 11) + ) ) (call $lb (i32.const 12) @@ -700,10 +768,14 @@ ) ) (func $forgetMe - (f64.const 123.456) + (drop + (f64.const 123.456) + ) ) (func $exportMe - (f64.const -3.14159) + (drop + (f64.const -3.14159) + ) ) (func $zeroInit (param $x i32) (local $y i32) @@ -757,6 +829,20 @@ (get_local $x) ) ) + (func $smallIf + (block $do-once$0 + (drop + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + (br $do-once$0) + ) + ) + (nop) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 51ae345b9..3f561465a 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -183,11 +183,15 @@ (set_local $J (f64.sub (block - (f64.const 0.1) + (drop + (f64.const 0.1) + ) (f64.const 5.1) ) (block - (f64.const 3.2) + (drop + (f64.const 3.2) + ) (f64.const 4.2) ) ) @@ -346,14 +350,28 @@ (func $fr (param $x f32) (local $y f32) (local $z f64) - (f32.demote/f64 - (get_local $z) + (drop + (block + (drop + (f32.demote/f64 + (get_local $z) + ) + ) + (drop + (get_local $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (f32.const 0) + ) ) - (get_local $y) - (f32.const 5) - (f32.const 0) - (f32.const 5) - (f32.const 0) ) (func $negZero (result f64) (return @@ -426,9 +444,11 @@ ) (func $___syscall_ret (local $$0 i32) - (i32.gt_u - (get_local $$0) - (i32.const -4096) + (drop + (i32.gt_u + (get_local $$0) + (i32.const -4096) + ) ) ) (func $smallCompare (result i32) @@ -564,57 +584,87 @@ ) (func $bitcasts (param $i i32) (param $f f32) (local $d f64) - (f32.reinterpret/i32 - (get_local $i) - ) - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (i32.reinterpret/f32 - (get_local $f) - ) - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) + (drop + (block + (drop + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) + ) + ) + ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) + ) ) ) ) (func $recursiveBlockMerging (param $x i32) (result i32) - (call $lb - (i32.add + (drop + (call $lb (i32.add (i32.add - (block - (i32.const 1) - (get_local $x) - ) - (block - (i32.const 2) - (i32.const 3) + (i32.add + (block + (drop + (i32.const 1) + ) + (get_local $x) + ) + (block + (drop + (i32.const 2) + ) + (i32.const 3) + ) ) - ) - (block (block - (block - (i32.const 4) - (i32.const 5) + (drop + (block + (drop + (block + (drop + (i32.const 4) + ) + (i32.const 5) + ) + ) + (i32.const 6) + ) ) - (i32.const 6) + (i32.const 7) ) - (i32.const 7) ) - ) - (block - (i32.const 8) (block - (i32.const 9) + (drop + (i32.const 8) + ) (block - (i32.const 10) + (drop + (i32.const 9) + ) (block - (i32.const 11) - (i32.const 12) + (drop + (i32.const 10) + ) + (block + (drop + (i32.const 11) + ) + (i32.const 12) + ) ) ) ) @@ -626,14 +676,18 @@ (i32.add (i32.add (block - (call $lb - (i32.const 1) + (drop + (call $lb + (i32.const 1) + ) ) (get_local $x) ) (block - (call $lb - (i32.const 2) + (drop + (call $lb + (i32.const 2) + ) ) (call $lb (i32.const 3) @@ -641,18 +695,24 @@ ) ) (block - (block + (drop (block - (call $lb - (i32.const 4) + (drop + (block + (drop + (call $lb + (i32.const 4) + ) + ) + (call $lb + (i32.const 5) + ) + ) ) (call $lb - (i32.const 5) + (i32.const 6) ) ) - (call $lb - (i32.const 6) - ) ) (call $lb (i32.const 7) @@ -660,20 +720,28 @@ ) ) (block - (call $lb - (i32.const 8) + (drop + (call $lb + (i32.const 8) + ) ) (block - (call $lb - (i32.const 9) + (drop + (call $lb + (i32.const 9) + ) ) (block - (call $lb - (i32.const 10) + (drop + (call $lb + (i32.const 10) + ) ) (block - (call $lb - (i32.const 11) + (drop + (call $lb + (i32.const 11) + ) ) (call $lb (i32.const 12) @@ -706,10 +774,14 @@ ) ) (func $forgetMe - (f64.const 123.456) + (drop + (f64.const 123.456) + ) ) (func $exportMe - (f64.const -3.14159) + (drop + (f64.const -3.14159) + ) ) (func $zeroInit (param $x i32) (local $y i32) @@ -763,6 +835,20 @@ (get_local $x) ) ) + (func $smallIf + (block $do-once$0 + (drop + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + (br $do-once$0) + ) + ) + (nop) + ) + ) (func $z (nop) ) diff --git a/test/unit.wast b/test/unit.wast index 2e21d44dd..aece78930 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -139,12 +139,14 @@ ) ) (func $hexLiterals (type $FUNCSIG$v) - (i32.add + (drop (i32.add - (i32.const 0) - (i32.const 313249263) + (i32.add + (i32.const 0) + (i32.const 313249263) + ) + (i32.const -19088752) ) - (i32.const -19088752) ) ) (func $conversions (type $FUNCSIG$v) @@ -176,11 +178,15 @@ (set_local $J (f64.sub (block $block0 - (f64.const 0.1) + (drop + (f64.const 0.1) + ) (f64.const 5.1) ) (block $block1 - (f64.const 3.2) + (drop + (f64.const 3.2) + ) (f64.const 4.2) ) ) @@ -302,14 +308,26 @@ (local $y f32) (local $z f64) (block $block0 - (f32.demote/f64 - (get_local $z) + (drop + (f32.demote/f64 + (get_local $z) + ) + ) + (drop + (get_local $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) ) - (get_local $y) - (f32.const 5) - (f32.const 0) - (f32.const 5) - (f32.const 0) ) ) (func $negZero (type $4) (result f64) @@ -385,12 +403,14 @@ ) (func $___syscall_ret (type $FUNCSIG$v) (local $$0 i32) - (i32.gt_u - (i32.shr_u - (get_local $$0) - (i32.const 0) + (drop + (i32.gt_u + (i32.shr_u + (get_local $$0) + (i32.const 0) + ) + (i32.const -4096) ) - (i32.const -4096) ) ) (func $z (type $FUNCSIG$v) @@ -401,14 +421,18 @@ ) (func $block_and_after (type $5) (result i32) (block $waka - (i32.const 1) + (drop + (i32.const 1) + ) (br $waka) ) (i32.const 0) ) (func $loop-roundtrip (type $7) (param $0 f64) (result f64) (loop $loop-out0 $loop-in1 - (get_local $0) + (drop + (get_local $0) + ) (get_local $0) ) ) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 29d53598a..621f9aeb6 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -151,12 +151,14 @@ ) ) (func $hexLiterals (type $1) - (i32.add + (drop (i32.add - (i32.const 0) - (i32.const 313249263) + (i32.add + (i32.const 0) + (i32.const 313249263) + ) + (i32.const -19088752) ) - (i32.const -19088752) ) ) (func $conversions (type $1) @@ -188,11 +190,15 @@ (set_local $var$0 (f64.sub (block $label$0 - (f64.const 0.1) + (drop + (f64.const 0.1) + ) (f64.const 5.1) ) (block $label$1 - (f64.const 3.2) + (drop + (f64.const 3.2) + ) (f64.const 4.2) ) ) @@ -310,14 +316,26 @@ (local $var$1 f32) (local $var$2 f64) (block $label$0 - (f32.demote/f64 - (get_local $var$2) + (drop + (f32.demote/f64 + (get_local $var$2) + ) + ) + (drop + (get_local $var$1) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) ) - (get_local $var$1) - (f32.const 5) - (f32.const 0) - (f32.const 5) - (f32.const 0) ) ) (func $negZero (type $4) (result f64) @@ -393,12 +411,14 @@ ) (func $___syscall_ret (type $1) (local $var$0 i32) - (i32.gt_u - (i32.shr_u - (get_local $var$0) - (i32.const 0) + (drop + (i32.gt_u + (i32.shr_u + (get_local $var$0) + (i32.const 0) + ) + (i32.const -4096) ) - (i32.const -4096) ) ) (func $z (type $1) @@ -410,7 +430,9 @@ (func $block_and_after (type $5) (result i32) (block $label$0 (block $label$1 - (i32.const 1) + (drop + (i32.const 1) + ) (br $label$1) ) (i32.const 0) @@ -418,7 +440,9 @@ ) (func $loop-roundtrip (type $7) (param $var$0 f64) (result f64) (loop $label$0 $label$1 - (get_local $var$0) + (drop + (get_local $var$0) + ) (get_local $var$0) ) ) -- cgit v1.2.3 From 1cc33903a0b1b9dddd40674d792a59ee0d1bccf7 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 2 Aug 2016 21:21:44 -0700 Subject: it is not cool to return a nop --- src/passes/Print.cpp | 2 +- src/wasm-validator.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index ac349abc7..4f6baa9da 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -481,7 +481,7 @@ struct PrintSExpression : public Visitor { } void visitReturn(Return *curr) { printOpening(o, "return"); - if (!curr->value || curr->value->is()) { + if (!curr->value) { // avoid a new line just for the parens o << ')'; return; diff --git a/src/wasm-validator.h b/src/wasm-validator.h index b4818e253..ca89270e9 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -283,6 +283,7 @@ public: void visitReturn(Return* curr) { if (curr->value) { + shouldBeFalse(curr->value->is(), curr, "cannot return a nop"); if (returnType == unreachable) { returnType = curr->value->type; } else if (curr->value->type != unreachable && returnType != curr->value->type) { -- cgit v1.2.3 From 72616971b2a35cbc37ea974e47c870556ef8ef4d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 2 Aug 2016 20:53:48 -0700 Subject: call_indirect now has the target at the end --- src/passes/DeadCodeElimination.cpp | 33 ++++++++-------- src/passes/Print.cpp | 2 +- src/wasm-interpreter.h | 4 +- src/wasm-s-parser.h | 14 +++---- src/wasm-traversal.h | 6 +-- test/emcc_O2_hello_world.fromasm | 46 +++++++++++----------- test/emcc_O2_hello_world.fromasm.imprecise | 46 +++++++++++----------- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 46 +++++++++++----------- test/emcc_O2_hello_world.fromasm.no-opts | 46 +++++++++++----------- test/emcc_hello_world.fromasm | 46 +++++++++++----------- test/emcc_hello_world.fromasm.imprecise | 46 +++++++++++----------- test/emcc_hello_world.fromasm.imprecise.no-opts | 40 +++++++++---------- test/emcc_hello_world.fromasm.no-opts | 40 +++++++++---------- test/example/c-api-kitchen-sink.txt | 4 +- test/example/c-api-kitchen-sink.txt.txt | 2 +- test/memorygrowth.fromasm | 46 +++++++++++----------- test/memorygrowth.fromasm.imprecise | 46 +++++++++++----------- test/memorygrowth.fromasm.imprecise.no-opts | 46 +++++++++++----------- test/memorygrowth.fromasm.no-opts | 46 +++++++++++----------- test/passes/dce.wast | 3 ++ test/passes/remove-unused-names_merge-blocks.txt | 16 ++++---- test/unit.fromasm | 10 ++--- test/unit.fromasm.imprecise | 10 ++--- test/unit.fromasm.imprecise.no-opts | 6 +-- test/unit.fromasm.no-opts | 6 +-- test/unit.wast | 4 +- test/unit.wast.fromBinary | 4 +- 27 files changed, 333 insertions(+), 331 deletions(-) (limited to 'src') diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index aba442e71..866b3cb73 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -234,45 +234,46 @@ struct DeadCodeElimination : public WalkerPass - void handleCall(T* curr, Expression* initial) { + Expression* handleCall(T* curr) { for (Index i = 0; i < curr->operands.size(); i++) { if (isDead(curr->operands[i])) { - if (i > 0 || initial != nullptr) { + if (i > 0) { auto* block = getModule()->allocator.alloc(); - Index newSize = i + 1 + (initial ? 1 : 0); + Index newSize = i + 1; block->list.resize(newSize); Index j = 0; - if (initial) { - block->list[j] = drop(initial); - j++; - } for (; j < newSize; j++) { - block->list[j] = drop(curr->operands[j - (initial ? 1 : 0)]); + block->list[j] = drop(curr->operands[j]); } block->finalize(); - replaceCurrent(block); + return replaceCurrent(block); } else { - replaceCurrent(curr->operands[i]); + return replaceCurrent(curr->operands[i]); } - return; } } + return curr; } void visitCall(Call* curr) { - handleCall(curr, nullptr); + handleCall(curr); } void visitCallImport(CallImport* curr) { - handleCall(curr, nullptr); + handleCall(curr); } void visitCallIndirect(CallIndirect* curr) { + if (handleCall(curr) != curr) return; if (isDead(curr->target)) { - replaceCurrent(curr->target); - return; + auto* block = getModule()->allocator.alloc(); + for (auto* operand : curr->operands) { + block->list.push_back(drop(operand)); + } + block->list.push_back(curr->target); + block->finalize(); + replaceCurrent(block); } - handleCall(curr, curr->target); } void visitSetLocal(SetLocal* curr) { diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 4f6baa9da..e54468c41 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -230,10 +230,10 @@ struct PrintSExpression : public Visitor { void visitCallIndirect(CallIndirect *curr) { printOpening(o, "call_indirect ") << curr->fullType; incIndent(); - printFullLine(curr->target); for (auto operand : curr->operands) { printFullLine(operand); } + printFullLine(curr->target); decIndent(); } void visitGetLocal(GetLocal *curr) { diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 9d1b5e522..77cbd8aab 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -676,11 +676,11 @@ public: } Flow visitCallIndirect(CallIndirect *curr) { NOTE_ENTER("CallIndirect"); - Flow target = visit(curr->target); - if (target.breaking()) return target; LiteralList arguments; Flow flow = generateArguments(curr->operands, arguments); if (flow.breaking()) return flow; + Flow target = visit(curr->target); + if (target.breaking()) return target; Index index = target.value.geti32(); return instance.externalInterface->callTable(index, curr->fullType, arguments, instance); } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 685f26d82..49fd52ef0 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -895,7 +895,7 @@ private: if (op == HostOp::HasFeature) { ret->nameOperand = s[1]->str(); } else { - parseCallOperands(s, 1, ret); + parseCallOperands(s, 1, s.size(), ret); } ret->finalize(); return ret; @@ -1196,7 +1196,7 @@ private: auto ret = allocator.alloc(); ret->target = s[1]->str(); ret->type = functionTypes[ret->target]; - parseCallOperands(s, 2, ret); + parseCallOperands(s, 2, s.size(), ret); return ret; } @@ -1205,7 +1205,7 @@ private: ret->target = s[1]->str(); Import* import = wasm.getImport(ret->target); ret->type = import->type->result; - parseCallOperands(s, 2, ret); + parseCallOperands(s, 2, s.size(), ret); return ret; } @@ -1216,14 +1216,14 @@ private: if (!fullType) throw ParseException("invalid call_indirect type", s.line, s.col); ret->fullType = fullType->name; ret->type = fullType->result; - ret->target = parseExpression(s[2]); - parseCallOperands(s, 3, ret); + parseCallOperands(s, 2, s.size() - 1, ret); + ret->target = parseExpression(s[s.size() - 1]); return ret; } template - void parseCallOperands(Element& s, size_t i, T* call) { - while (i < s.size()) { + void parseCallOperands(Element& s, Index i, Index j, T* call) { + while (i < j) { call->operands.push_back(parseExpression(s[i])); i++; } diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index d6484abdb..f9d3d8413 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -156,8 +156,8 @@ struct Walker : public VisitorType { // Note that the visit*() for the result node is not called for you (i.e., // just one visit*() method is called by the traversal; if you replace a node, // and you want to process the output, you must do that explicitly). - void replaceCurrent(Expression *expression) { - replace = expression; + Expression* replaceCurrent(Expression *expression) { + return replace = expression; } // Get the current module @@ -358,10 +358,10 @@ struct PostWalker : public Walker { case Expression::Id::CallIndirectId: { self->pushTask(SubType::doVisitCallIndirect, currp); auto& list = curr->cast()->operands; + self->pushTask(SubType::scan, &curr->cast()->target); for (int i = int(list.size()) - 1; i >= 0; i--) { self->pushTask(SubType::scan, &list[i]); } - self->pushTask(SubType::scan, &curr->cast()->target); break; } case Expression::Id::GetLocalId: { diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 04e0d76c6..5f36a6209 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -8257,6 +8257,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -8266,9 +8269,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$L5) @@ -8334,6 +8334,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $4) (i32.add (i32.and (i32.load offset=36 @@ -8343,9 +8346,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $4) ) (get_local $4) ) @@ -8831,6 +8831,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $0) + (get_local $6) + (i32.const 1) (i32.add (i32.and (i32.load offset=36 @@ -8840,9 +8843,6 @@ ) (i32.const 2) ) - (get_local $0) - (get_local $6) - (i32.const 1) ) (i32.const 1) ) @@ -8891,6 +8891,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -8900,9 +8903,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (i32.eq @@ -8940,6 +8940,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $4) + (get_local $6) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -8949,12 +8955,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $4) - (get_local $6) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -9815,6 +9815,9 @@ ) (func $dynCall_iiii (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -9822,9 +9825,6 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $stackAlloc (param $0 i32) (result i32) @@ -9902,6 +9902,7 @@ ) (func $dynCall_ii (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -9909,7 +9910,6 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $_cleanup_418 (param $0 i32) @@ -9936,6 +9936,7 @@ ) (func $dynCall_vi (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -9943,7 +9944,6 @@ ) (i32.const 10) ) - (get_local $1) ) ) (func $b1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index a87591d78..a79d63e05 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -8256,6 +8256,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -8265,9 +8268,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$L5) @@ -8333,6 +8333,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $4) (i32.add (i32.and (i32.load offset=36 @@ -8342,9 +8345,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $4) ) (get_local $4) ) @@ -8830,6 +8830,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $0) + (get_local $6) + (i32.const 1) (i32.add (i32.and (i32.load offset=36 @@ -8839,9 +8842,6 @@ ) (i32.const 2) ) - (get_local $0) - (get_local $6) - (i32.const 1) ) (i32.const 1) ) @@ -8890,6 +8890,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -8899,9 +8902,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (i32.eq @@ -8939,6 +8939,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $4) + (get_local $6) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -8948,12 +8954,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $4) - (get_local $6) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -9814,6 +9814,9 @@ ) (func $dynCall_iiii (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -9821,9 +9824,6 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $stackAlloc (param $0 i32) (result i32) @@ -9901,6 +9901,7 @@ ) (func $dynCall_ii (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -9908,7 +9909,6 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $_cleanup_418 (param $0 i32) @@ -9935,6 +9935,7 @@ ) (func $dynCall_vi (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -9942,7 +9943,6 @@ ) (i32.const 10) ) - (get_local $1) ) ) (func $b1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index df7888820..5c70bf1c4 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -9726,6 +9726,9 @@ (block (set_local $i8 (call_indirect $FUNCSIG$iiii + (get_local $i3) + (get_local $i1) + (get_local $i2) (i32.add (i32.and (i32.load @@ -9738,9 +9741,6 @@ ) (i32.const 2) ) - (get_local $i3) - (get_local $i1) - (get_local $i2) ) ) (br $label$break$L5) @@ -9813,6 +9813,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $i3) + (get_local $i1) + (get_local $i15) (i32.add (i32.and (i32.load @@ -9825,9 +9828,6 @@ ) (i32.const 2) ) - (get_local $i3) - (get_local $i1) - (get_local $i15) ) (get_local $i15) ) @@ -10433,6 +10433,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $i1) + (get_local $i4) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10445,9 +10448,6 @@ ) (i32.const 2) ) - (get_local $i1) - (get_local $i4) - (i32.const 1) ) (i32.const 1) ) @@ -10504,6 +10504,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $i1) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load @@ -10516,9 +10519,6 @@ ) (i32.const 2) ) - (get_local $i1) - (i32.const 0) - (i32.const 0) ) ) (i32.eq @@ -10562,6 +10562,12 @@ (get_local $i8) ) (call_indirect $FUNCSIG$iiii + (get_local $i1) + (i32.sub + (get_local $i6) + (get_local $i8) + ) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10574,12 +10580,6 @@ ) (i32.const 2) ) - (get_local $i1) - (i32.sub - (get_local $i6) - (get_local $i8) - ) - (i32.const 1) ) ) (i32.store @@ -11680,6 +11680,9 @@ (func $dynCall_iiii (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $i2) + (get_local $i3) + (get_local $i4) (i32.add (i32.and (get_local $i1) @@ -11687,9 +11690,6 @@ ) (i32.const 2) ) - (get_local $i2) - (get_local $i3) - (get_local $i4) ) ) ) @@ -11786,6 +11786,7 @@ (func $dynCall_ii (param $i1 i32) (param $i2 i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $i2) (i32.add (i32.and (get_local $i1) @@ -11793,7 +11794,6 @@ ) (i32.const 0) ) - (get_local $i2) ) ) ) @@ -11825,6 +11825,7 @@ ) (func $dynCall_vi (param $i1 i32) (param $i2 i32) (call_indirect $FUNCSIG$vi + (get_local $i2) (i32.add (i32.and (get_local $i1) @@ -11832,7 +11833,6 @@ ) (i32.const 10) ) - (get_local $i2) ) ) (func $b1 (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 2c1f718ff..69db3001b 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -9727,6 +9727,9 @@ (block (set_local $i8 (call_indirect $FUNCSIG$iiii + (get_local $i3) + (get_local $i1) + (get_local $i2) (i32.add (i32.and (i32.load @@ -9739,9 +9742,6 @@ ) (i32.const 2) ) - (get_local $i3) - (get_local $i1) - (get_local $i2) ) ) (br $label$break$L5) @@ -9814,6 +9814,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $i3) + (get_local $i1) + (get_local $i15) (i32.add (i32.and (i32.load @@ -9826,9 +9829,6 @@ ) (i32.const 2) ) - (get_local $i3) - (get_local $i1) - (get_local $i15) ) (get_local $i15) ) @@ -10434,6 +10434,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $i1) + (get_local $i4) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10446,9 +10449,6 @@ ) (i32.const 2) ) - (get_local $i1) - (get_local $i4) - (i32.const 1) ) (i32.const 1) ) @@ -10505,6 +10505,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $i1) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load @@ -10517,9 +10520,6 @@ ) (i32.const 2) ) - (get_local $i1) - (i32.const 0) - (i32.const 0) ) ) (i32.eq @@ -10563,6 +10563,12 @@ (get_local $i8) ) (call_indirect $FUNCSIG$iiii + (get_local $i1) + (i32.sub + (get_local $i6) + (get_local $i8) + ) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10575,12 +10581,6 @@ ) (i32.const 2) ) - (get_local $i1) - (i32.sub - (get_local $i6) - (get_local $i8) - ) - (i32.const 1) ) ) (i32.store @@ -11681,6 +11681,9 @@ (func $dynCall_iiii (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $i2) + (get_local $i3) + (get_local $i4) (i32.add (i32.and (get_local $i1) @@ -11688,9 +11691,6 @@ ) (i32.const 2) ) - (get_local $i2) - (get_local $i3) - (get_local $i4) ) ) ) @@ -11787,6 +11787,7 @@ (func $dynCall_ii (param $i1 i32) (param $i2 i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $i2) (i32.add (i32.and (get_local $i1) @@ -11794,7 +11795,6 @@ ) (i32.const 0) ) - (get_local $i2) ) ) ) @@ -11826,6 +11826,7 @@ ) (func $dynCall_vi (param $i1 i32) (param $i2 i32) (call_indirect $FUNCSIG$vi + (get_local $i2) (i32.add (i32.and (get_local $i1) @@ -11833,7 +11834,6 @@ ) (i32.const 10) ) - (get_local $i2) ) ) (func $b1 (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index edcebd3ed..3187c00a7 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -1635,6 +1635,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -1644,9 +1647,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (set_local $1 @@ -1813,6 +1813,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -1822,9 +1825,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$L5) @@ -1896,6 +1896,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $3) (i32.add (i32.and (i32.load offset=36 @@ -1905,9 +1908,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $3) ) (get_local $3) ) @@ -2748,6 +2748,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -2757,9 +2760,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (if @@ -2811,6 +2811,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $1) + (get_local $2) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -2820,12 +2826,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $1) - (get_local $2) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -19397,6 +19397,7 @@ ) (func $dynCall_ii (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -19404,11 +19405,13 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $dynCall_iiii (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -19416,13 +19419,11 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $dynCall_vi (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -19430,7 +19431,6 @@ ) (i32.const 10) ) - (get_local $1) ) ) (func $b0 (param $0 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index f0e3e992d..22f7c4018 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -1629,6 +1629,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -1638,9 +1641,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (set_local $1 @@ -1807,6 +1807,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -1816,9 +1819,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$L5) @@ -1890,6 +1890,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $3) (i32.add (i32.and (i32.load offset=36 @@ -1899,9 +1902,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $3) ) (get_local $3) ) @@ -2742,6 +2742,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -2751,9 +2754,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (if @@ -2805,6 +2805,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $1) + (get_local $2) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -2814,12 +2820,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $1) - (get_local $2) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -19382,6 +19382,7 @@ ) (func $dynCall_ii (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -19389,11 +19390,13 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $dynCall_iiii (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -19401,13 +19404,11 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $dynCall_vi (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -19415,7 +19416,6 @@ ) (i32.const 10) ) - (get_local $1) ) ) (func $b0 (param $0 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index dcb3c1f15..70da0bd37 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -2646,6 +2646,9 @@ ) (drop (call_indirect $FUNCSIG$iiii + (get_local $$f) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (get_local $$5) @@ -2653,9 +2656,6 @@ ) (i32.const 2) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) ) (set_local $$6 @@ -2939,6 +2939,9 @@ ) (set_local $$call4 (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$s) + (get_local $$l) (i32.add (i32.and (get_local $$5) @@ -2946,9 +2949,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$s) - (get_local $$l) ) ) (set_local $$retval$0 @@ -3068,6 +3068,9 @@ ) (set_local $$call16 (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$s) + (get_local $$i$0$lcssa36) (i32.add (i32.and (get_local $$8) @@ -3075,9 +3078,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$s) - (get_local $$i$0$lcssa36) ) ) (set_local $$cmp17 @@ -4553,6 +4553,9 @@ ) (drop (call_indirect $FUNCSIG$iiii + (get_local $$f) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (get_local $$2) @@ -4560,9 +4563,6 @@ ) (i32.const 2) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) ) (set_local $$3 @@ -4651,6 +4651,9 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$sub$ptr$sub) + (i32.const 1) (i32.add (i32.and (get_local $$6) @@ -4658,9 +4661,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$sub$ptr$sub) - (i32.const 1) ) ) ) @@ -32718,6 +32718,7 @@ (func $dynCall_ii (param $index i32) (param $a1 i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $a1) (i32.add (i32.and (get_local $index) @@ -32725,13 +32726,15 @@ ) (i32.const 0) ) - (get_local $a1) ) ) ) (func $dynCall_iiii (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $a1) + (get_local $a2) + (get_local $a3) (i32.add (i32.and (get_local $index) @@ -32739,14 +32742,12 @@ ) (i32.const 2) ) - (get_local $a1) - (get_local $a2) - (get_local $a3) ) ) ) (func $dynCall_vi (param $index i32) (param $a1 i32) (call_indirect $FUNCSIG$vi + (get_local $a1) (i32.add (i32.and (get_local $index) @@ -32754,7 +32755,6 @@ ) (i32.const 10) ) - (get_local $a1) ) ) (func $b0 (param $p0 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index fcf34e3ec..414971404 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -2652,6 +2652,9 @@ ) (drop (call_indirect $FUNCSIG$iiii + (get_local $$f) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (get_local $$5) @@ -2659,9 +2662,6 @@ ) (i32.const 2) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) ) (set_local $$6 @@ -2945,6 +2945,9 @@ ) (set_local $$call4 (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$s) + (get_local $$l) (i32.add (i32.and (get_local $$5) @@ -2952,9 +2955,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$s) - (get_local $$l) ) ) (set_local $$retval$0 @@ -3074,6 +3074,9 @@ ) (set_local $$call16 (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$s) + (get_local $$i$0$lcssa36) (i32.add (i32.and (get_local $$8) @@ -3081,9 +3084,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$s) - (get_local $$i$0$lcssa36) ) ) (set_local $$cmp17 @@ -4559,6 +4559,9 @@ ) (drop (call_indirect $FUNCSIG$iiii + (get_local $$f) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (get_local $$2) @@ -4566,9 +4569,6 @@ ) (i32.const 2) ) - (get_local $$f) - (i32.const 0) - (i32.const 0) ) ) (set_local $$3 @@ -4657,6 +4657,9 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$sub$ptr$sub) + (i32.const 1) (i32.add (i32.and (get_local $$6) @@ -4664,9 +4667,6 @@ ) (i32.const 2) ) - (get_local $$f) - (get_local $$sub$ptr$sub) - (i32.const 1) ) ) ) @@ -32724,6 +32724,7 @@ (func $dynCall_ii (param $index i32) (param $a1 i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $a1) (i32.add (i32.and (get_local $index) @@ -32731,13 +32732,15 @@ ) (i32.const 0) ) - (get_local $a1) ) ) ) (func $dynCall_iiii (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $a1) + (get_local $a2) + (get_local $a3) (i32.add (i32.and (get_local $index) @@ -32745,14 +32748,12 @@ ) (i32.const 2) ) - (get_local $a1) - (get_local $a2) - (get_local $a3) ) ) ) (func $dynCall_vi (param $index i32) (param $a1 i32) (call_indirect $FUNCSIG$vi + (get_local $a1) (i32.add (i32.and (get_local $index) @@ -32760,7 +32761,6 @@ ) (i32.const 10) ) - (get_local $a1) ) ) (func $b0 (param $p0 i32) (result i32) diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index c848f0f7c..37e7b6040 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -466,11 +466,11 @@ BinaryenFloat64: 4 (drop (i32.eqz (call_indirect $iiIfF - (i32.const 2449) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) (f64.const 3.7) + (i32.const 2449) ) ) ) @@ -2060,11 +2060,11 @@ int main() { (drop (i32.eqz (call_indirect $iiIfF - (i32.const 2449) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) (f64.const 3.7) + (i32.const 2449) ) ) ) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 52da01f9d..29b242c2f 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -461,11 +461,11 @@ (drop (i32.eqz (call_indirect $iiIfF - (i32.const 2449) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) (f64.const 3.7) + (i32.const 2449) ) ) ) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index d39786018..4b5409dcb 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -8342,6 +8342,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -8351,9 +8354,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$a) @@ -8419,6 +8419,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $4) (i32.add (i32.and (i32.load offset=36 @@ -8428,9 +8431,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $4) ) (get_local $4) ) @@ -8911,6 +8911,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $0) + (get_local $6) + (i32.const 1) (i32.add (i32.and (i32.load offset=36 @@ -8920,9 +8923,6 @@ ) (i32.const 2) ) - (get_local $0) - (get_local $6) - (i32.const 1) ) (i32.const 1) ) @@ -8970,6 +8970,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -8979,9 +8982,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (if @@ -9030,6 +9030,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $2) + (get_local $6) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -9039,12 +9045,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $2) - (get_local $6) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -9912,6 +9912,9 @@ ) (func $lb (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -9919,9 +9922,6 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $Ea (param $0 i32) (result i32) @@ -9994,6 +9994,7 @@ ) (func $kb (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -10001,7 +10002,6 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $Sa (param $0 i32) @@ -10018,6 +10018,7 @@ ) (func $mb (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -10025,7 +10026,6 @@ ) (i32.const 6) ) - (get_local $1) ) ) (func $Ha (param $0 i32) (param $1 i32) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index b876bc869..65be97cf1 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -8341,6 +8341,9 @@ (block (set_local $4 (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $1) (i32.add (i32.and (i32.load offset=36 @@ -8350,9 +8353,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $1) ) ) (br $label$break$a) @@ -8418,6 +8418,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $2) + (get_local $0) + (get_local $4) (i32.add (i32.and (i32.load offset=36 @@ -8427,9 +8430,6 @@ ) (i32.const 2) ) - (get_local $2) - (get_local $0) - (get_local $4) ) (get_local $4) ) @@ -8910,6 +8910,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $0) + (get_local $6) + (i32.const 1) (i32.add (i32.and (i32.load offset=36 @@ -8919,9 +8922,6 @@ ) (i32.const 2) ) - (get_local $0) - (get_local $6) - (i32.const 1) ) (i32.const 1) ) @@ -8969,6 +8969,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load offset=36 @@ -8978,9 +8981,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.const 0) - (i32.const 0) ) ) (if @@ -9029,6 +9029,12 @@ ) ) (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $2) + (get_local $6) + ) + (i32.const 1) (i32.add (i32.and (i32.load offset=40 @@ -9038,12 +9044,6 @@ ) (i32.const 2) ) - (get_local $0) - (i32.sub - (get_local $2) - (get_local $6) - ) - (i32.const 1) ) ) (i32.store offset=16 @@ -9911,6 +9911,9 @@ ) (func $lb (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call_indirect $FUNCSIG$iiii + (get_local $1) + (get_local $2) + (get_local $3) (i32.add (i32.and (get_local $0) @@ -9918,9 +9921,6 @@ ) (i32.const 2) ) - (get_local $1) - (get_local $2) - (get_local $3) ) ) (func $Ea (param $0 i32) (result i32) @@ -9993,6 +9993,7 @@ ) (func $kb (param $0 i32) (param $1 i32) (result i32) (call_indirect $FUNCSIG$ii + (get_local $1) (i32.add (i32.and (get_local $0) @@ -10000,7 +10001,6 @@ ) (i32.const 0) ) - (get_local $1) ) ) (func $Sa (param $0 i32) @@ -10017,6 +10017,7 @@ ) (func $mb (param $0 i32) (param $1 i32) (call_indirect $FUNCSIG$vi + (get_local $1) (i32.add (i32.and (get_local $0) @@ -10024,7 +10025,6 @@ ) (i32.const 6) ) - (get_local $1) ) ) (func $Ha (param $0 i32) (param $1 i32) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 3dcf5fc53..be0a35505 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -9785,6 +9785,9 @@ (block (set_local $h (call_indirect $FUNCSIG$iiii + (get_local $c) + (get_local $a) + (get_local $b) (i32.add (i32.and (i32.load @@ -9797,9 +9800,6 @@ ) (i32.const 2) ) - (get_local $c) - (get_local $a) - (get_local $b) ) ) (br $label$break$a) @@ -9872,6 +9872,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $c) + (get_local $a) + (get_local $q) (i32.add (i32.and (i32.load @@ -9884,9 +9887,6 @@ ) (i32.const 2) ) - (get_local $c) - (get_local $a) - (get_local $q) ) (get_local $q) ) @@ -10493,6 +10493,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $a) + (get_local $d) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10505,9 +10508,6 @@ ) (i32.const 2) ) - (get_local $a) - (get_local $d) - (i32.const 1) ) (i32.const 1) ) @@ -10563,6 +10563,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $a) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load @@ -10575,9 +10578,6 @@ ) (i32.const 2) ) - (get_local $a) - (i32.const 0) - (i32.const 0) ) ) (if @@ -10632,6 +10632,12 @@ (get_local $h) ) (call_indirect $FUNCSIG$iiii + (get_local $a) + (i32.sub + (get_local $f) + (get_local $h) + ) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10644,12 +10650,6 @@ ) (i32.const 2) ) - (get_local $a) - (i32.sub - (get_local $f) - (get_local $h) - ) - (i32.const 1) ) ) (i32.store @@ -11772,6 +11772,9 @@ (func $lb (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $b) + (get_local $c) + (get_local $d) (i32.add (i32.and (get_local $a) @@ -11779,9 +11782,6 @@ ) (i32.const 2) ) - (get_local $b) - (get_local $c) - (get_local $d) ) ) ) @@ -11862,6 +11862,7 @@ (func $kb (param $a i32) (param $b i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $b) (i32.add (i32.and (get_local $a) @@ -11869,7 +11870,6 @@ ) (i32.const 0) ) - (get_local $b) ) ) ) @@ -11891,6 +11891,7 @@ ) (func $mb (param $a i32) (param $b i32) (call_indirect $FUNCSIG$vi + (get_local $b) (i32.add (i32.and (get_local $a) @@ -11898,7 +11899,6 @@ ) (i32.const 6) ) - (get_local $b) ) ) (func $Ha (param $a i32) (param $b i32) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 0f4b278c2..166cd316c 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -9786,6 +9786,9 @@ (block (set_local $h (call_indirect $FUNCSIG$iiii + (get_local $c) + (get_local $a) + (get_local $b) (i32.add (i32.and (i32.load @@ -9798,9 +9801,6 @@ ) (i32.const 2) ) - (get_local $c) - (get_local $a) - (get_local $b) ) ) (br $label$break$a) @@ -9873,6 +9873,9 @@ (if (i32.lt_u (call_indirect $FUNCSIG$iiii + (get_local $c) + (get_local $a) + (get_local $q) (i32.add (i32.and (i32.load @@ -9885,9 +9888,6 @@ ) (i32.const 2) ) - (get_local $c) - (get_local $a) - (get_local $q) ) (get_local $q) ) @@ -10494,6 +10494,9 @@ (if (i32.eq (call_indirect $FUNCSIG$iiii + (get_local $a) + (get_local $d) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10506,9 +10509,6 @@ ) (i32.const 2) ) - (get_local $a) - (get_local $d) - (i32.const 1) ) (i32.const 1) ) @@ -10564,6 +10564,9 @@ (block (drop (call_indirect $FUNCSIG$iiii + (get_local $a) + (i32.const 0) + (i32.const 0) (i32.add (i32.and (i32.load @@ -10576,9 +10579,6 @@ ) (i32.const 2) ) - (get_local $a) - (i32.const 0) - (i32.const 0) ) ) (if @@ -10633,6 +10633,12 @@ (get_local $h) ) (call_indirect $FUNCSIG$iiii + (get_local $a) + (i32.sub + (get_local $f) + (get_local $h) + ) + (i32.const 1) (i32.add (i32.and (i32.load @@ -10645,12 +10651,6 @@ ) (i32.const 2) ) - (get_local $a) - (i32.sub - (get_local $f) - (get_local $h) - ) - (i32.const 1) ) ) (i32.store @@ -11773,6 +11773,9 @@ (func $lb (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) (return (call_indirect $FUNCSIG$iiii + (get_local $b) + (get_local $c) + (get_local $d) (i32.add (i32.and (get_local $a) @@ -11780,9 +11783,6 @@ ) (i32.const 2) ) - (get_local $b) - (get_local $c) - (get_local $d) ) ) ) @@ -11863,6 +11863,7 @@ (func $kb (param $a i32) (param $b i32) (result i32) (return (call_indirect $FUNCSIG$ii + (get_local $b) (i32.add (i32.and (get_local $a) @@ -11870,7 +11871,6 @@ ) (i32.const 0) ) - (get_local $b) ) ) ) @@ -11892,6 +11892,7 @@ ) (func $mb (param $a i32) (param $b i32) (call_indirect $FUNCSIG$vi + (get_local $b) (i32.add (i32.and (get_local $a) @@ -11899,7 +11900,6 @@ ) (i32.const 6) ) - (get_local $b) ) ) (func $Ha (param $a i32) (param $b i32) diff --git a/test/passes/dce.wast b/test/passes/dce.wast index c7eb1145e..22ae25fbc 100644 --- a/test/passes/dce.wast +++ b/test/passes/dce.wast @@ -90,6 +90,7 @@ (drop (i32.const 0) ) + (unreachable) ) ) (if @@ -102,6 +103,7 @@ (drop (i32.const 0) ) + (unreachable) ) ) (if @@ -114,6 +116,7 @@ (drop (i32.const 0) ) + (unreachable) ) ) (block $out diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index a82bf489f..43bbaf582 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -702,19 +702,22 @@ (i32.const 50) ) (drop - (i32.const 10) + (i32.const 50) ) (drop - (i32.const 30) + (i32.const 10) ) (drop - (i32.const 50) + (i32.const 30) ) (call_indirect $ii (i32.const 20) (i32.const 40) (i32.const 60) ) + (drop + (i32.const 50) + ) (call_indirect $ii (unreachable) (block @@ -723,12 +726,7 @@ ) (i32.const 40) ) - (block - (drop - (i32.const 50) - ) - (i32.const 60) - ) + (i32.const 60) ) ) (func $block-type-change (type $3) diff --git a/test/unit.fromasm b/test/unit.fromasm index 5a790c92f..edb9f5ece 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -229,22 +229,22 @@ (func $neg (local $0 f32) (call_indirect $FUNCSIG$vf + (f32.neg + (get_local $0) + ) (i32.add (i32.const 1) (i32.const 8) ) - (f32.neg - (get_local $0) - ) ) ) (func $cneg (param $0 f32) (call_indirect $FUNCSIG$vf + (get_local $0) (i32.add (i32.const 1) (i32.const 8) ) - (get_local $0) ) ) (func $smallCompare (result i32) @@ -278,11 +278,11 @@ ) (func $cneg_nosemicolon (call_indirect $FUNCSIG$vi + (i32.const 1) (i32.add (i32.const 1) (i32.const 8) ) - (i32.const 1) ) ) (func $forLoop diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index f81663fa1..abb6c3317 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -211,22 +211,22 @@ (func $neg (local $0 f32) (call_indirect $FUNCSIG$vf + (f32.neg + (get_local $0) + ) (i32.add (i32.const 1) (i32.const 8) ) - (f32.neg - (get_local $0) - ) ) ) (func $cneg (param $0 f32) (call_indirect $FUNCSIG$vf + (get_local $0) (i32.add (i32.const 1) (i32.const 8) ) - (get_local $0) ) ) (func $smallCompare (result i32) @@ -260,11 +260,11 @@ ) (func $cneg_nosemicolon (call_indirect $FUNCSIG$vi + (i32.const 1) (i32.add (i32.const 1) (i32.const 8) ) - (i32.const 1) ) ) (func $forLoop diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 083e6f888..b7f63c67b 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -414,6 +414,7 @@ ) ) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -421,11 +422,11 @@ ) (i32.const 8) ) - (get_local $x) ) ) (func $cneg (param $x f32) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -433,7 +434,6 @@ ) (i32.const 8) ) - (get_local $x) ) ) (func $___syscall_ret @@ -478,6 +478,7 @@ ) (func $cneg_nosemicolon (call_indirect $FUNCSIG$vi + (i32.const 1) (i32.add (i32.and (i32.const 1) @@ -485,7 +486,6 @@ ) (i32.const 8) ) - (i32.const 1) ) ) (func $forLoop diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 3f561465a..55966a172 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -420,6 +420,7 @@ ) ) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -427,11 +428,11 @@ ) (i32.const 8) ) - (get_local $x) ) ) (func $cneg (param $x f32) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -439,7 +440,6 @@ ) (i32.const 8) ) - (get_local $x) ) ) (func $___syscall_ret @@ -484,6 +484,7 @@ ) (func $cneg_nosemicolon (call_indirect $FUNCSIG$vi + (i32.const 1) (i32.add (i32.and (i32.const 1) @@ -491,7 +492,6 @@ ) (i32.const 8) ) - (i32.const 1) ) ) (func $forLoop diff --git a/test/unit.wast b/test/unit.wast index aece78930..b4105ed0b 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -378,6 +378,7 @@ ) ) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -385,12 +386,12 @@ ) (i32.const 8) ) - (get_local $x) ) ) ) (func $cneg (type $FUNCSIG$vf) (param $x f32) (call_indirect $FUNCSIG$vf + (get_local $x) (i32.add (i32.and (i32.const 1) @@ -398,7 +399,6 @@ ) (i32.const 8) ) - (get_local $x) ) ) (func $___syscall_ret (type $FUNCSIG$v) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 621f9aeb6..971b89fb7 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -386,6 +386,7 @@ ) ) (call_indirect $0 + (get_local $var$0) (i32.add (i32.and (i32.const 1) @@ -393,12 +394,12 @@ ) (i32.const 8) ) - (get_local $var$0) ) ) ) (func $cneg (type $0) (param $var$0 f32) (call_indirect $0 + (get_local $var$0) (i32.add (i32.and (i32.const 1) @@ -406,7 +407,6 @@ ) (i32.const 8) ) - (get_local $var$0) ) ) (func $___syscall_ret (type $1) -- cgit v1.2.3 From f30d9f6cde023b29409f73aba68f472c06c3b11c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 3 Aug 2016 12:12:24 -0700 Subject: loops no longer have an out label and other upstream loop updates --- src/asm2wasm.h | 34 +- src/ast_utils.h | 11 +- src/binaryen-c.cpp | 9 +- src/binaryen-c.h | 3 +- src/cfg/Relooper.cpp | 2 +- src/cfg/cfg-traversal.h | 14 +- src/passes/DeadCodeElimination.cpp | 8 +- src/passes/NameManager.cpp | 3 +- src/passes/Print.cpp | 16 +- src/passes/RemoveUnusedNames.cpp | 28 +- src/s2wasm.h | 7 +- src/wasm-binary.h | 11 +- src/wasm-builder.h | 20 +- src/wasm-interpreter.h | 3 +- src/wasm-s-parser.h | 20 +- src/wasm-validator.h | 14 +- src/wasm.cpp | 10 +- src/wasm.h | 2 +- test/emcc_O2_hello_world.fromasm | 2358 +-- test/emcc_O2_hello_world.fromasm.imprecise | 2358 +-- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 2896 +-- test/emcc_O2_hello_world.fromasm.no-opts | 2896 +-- test/emcc_hello_world.fromasm | 11546 ++++++------ test/emcc_hello_world.fromasm.imprecise | 11546 ++++++------ test/emcc_hello_world.fromasm.imprecise.no-opts | 18802 ++++++++++--------- test/emcc_hello_world.fromasm.no-opts | 18802 ++++++++++--------- test/example/c-api-kitchen-sink.c | 5 +- test/example/c-api-kitchen-sink.txt | 226 +- test/example/c-api-kitchen-sink.txt.txt | 61 +- test/memorygrowth.fromasm | 2368 +-- test/memorygrowth.fromasm.imprecise | 2368 +-- test/memorygrowth.fromasm.imprecise.no-opts | 2918 +-- test/memorygrowth.fromasm.no-opts | 2918 +-- test/passes/coalesce-locals-learning.txt | 214 +- test/passes/coalesce-locals-learning.wast | 214 +- test/passes/coalesce-locals.txt | 194 +- test/passes/coalesce-locals.wast | 194 +- test/passes/dce.txt | 12 +- test/passes/dce.wast | 8 +- test/passes/duplicate-function-elimination.txt | 2 +- test/passes/duplicate-function-elimination.wast | 4 +- test/passes/nm.txt | 2 +- test/passes/nm.wast | 2 +- test/passes/precompute.txt | 2 +- test/passes/precompute.wast | 2 +- test/passes/remove-unused-names.txt | 45 +- test/passes/remove-unused-names.wast | 35 +- test/passes/simplify-locals.txt | 2 +- test/passes/simplify-locals.wast | 2 +- test/passes/vacuum.wast | 6 +- test/unit.fromasm | 84 +- test/unit.fromasm.imprecise | 84 +- test/unit.fromasm.imprecise.no-opts | 140 +- test/unit.fromasm.no-opts | 140 +- test/unit.wast | 10 +- test/unit.wast.fromBinary | 12 +- 56 files changed, 42381 insertions(+), 41312 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 857145937..2d0d1300e 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1478,8 +1478,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { out = getNextId("while-out"); in = getNextId("while-in"); } - ret->out = out; - ret->in = in; + ret->name = in; breakStack.push_back(out); continueStack.push_back(in); if (forever) { @@ -1497,9 +1496,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ret->body = body; } // loops do not automatically loop, add a branch back - Block* block = blockify(ret->body); + Block* block = builder.blockifyWithName(ret->body, out); auto continuer = allocator.alloc(); - continuer->name = ret->in; + continuer->name = ret->name; block->list.push_back(continuer); ret->body = block; continueStack.pop_back(); @@ -1536,13 +1535,12 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } else { auto loop = allocator.alloc(); loop->body = child; - loop->out = stop; - loop->in = more; - return loop; + loop->name = more; + return builder.blockifyWithName(loop, stop); } } // general do-while loop - auto ret = allocator.alloc(); + auto loop = allocator.alloc(); IString out, in; if (!parentLabel.isNull()) { out = getBreakLabelName(parentLabel); @@ -1552,20 +1550,18 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { out = getNextId("do-out"); in = getNextId("do-in"); } - ret->out = out; - ret->in = in; + loop->name = in; breakStack.push_back(out); continueStack.push_back(in); - ret->body = process(ast[2]); + loop->body = process(ast[2]); continueStack.pop_back(); breakStack.pop_back(); Break *continuer = allocator.alloc(); continuer->name = in; continuer->condition = process(ast[1]); - Block *block = blockify(ret->body); - block->list.push_back(continuer); - ret->body = block; - return ret; + Block *block = builder.blockifyWithName(loop->body, out, continuer); + loop->body = block; + return loop; } else if (what == FOR) { Ref finit = ast[1], fcond = ast[2], @@ -1581,8 +1577,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { out = getNextId("for-out"); in = getNextId("for-in"); } - ret->out = out; - ret->in = in; + ret->name = in; breakStack.push_back(out); continueStack.push_back(in); Break *breakOut = allocator.alloc(); @@ -1597,10 +1592,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { body->finalize(); ret->body = body; // loops do not automatically loop, add a branch back - Block* block = blockify(ret->body); auto continuer = allocator.alloc(); - continuer->name = ret->in; - block->list.push_back(continuer); + continuer->name = ret->name; + Block* block = builder.blockifyWithName(ret->body, out, continuer); ret->body = block; continueStack.pop_back(); breakStack.pop_back(); diff --git a/src/ast_utils.h b/src/ast_utils.h index 17f5490a9..30e1d9a36 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -148,8 +148,7 @@ struct EffectAnalyzer : public PostWalkername.is()) breakNames.erase(curr->name); // these were internal breaks } void visitLoop(Loop* curr) { - if (curr->in.is()) breakNames.erase(curr->in); // these were internal breaks - if (curr->out.is()) breakNames.erase(curr->out); // these were internal breaks + if (curr->name.is()) breakNames.erase(curr->name); // these were internal breaks } void visitCall(Call *curr) { calls = true; } @@ -245,7 +244,7 @@ struct ExpressionManipulator { return builder.makeIf(copy(curr->condition), copy(curr->ifTrue), copy(curr->ifFalse)); } Expression* visitLoop(Loop *curr) { - return builder.makeLoop(curr->out, curr->in, copy(curr->body)); + return builder.makeLoop(curr->name, copy(curr->body)); } Expression* visitBreak(Break *curr) { return builder.makeBreak(curr->name, copy(curr->value), copy(curr->condition)); @@ -438,8 +437,7 @@ struct ExpressionAnalyzer { break; } case Expression::Id::LoopId: { - if (!noteNames(left->cast()->out, right->cast()->out)) return false; - if (!noteNames(left->cast()->in, right->cast()->in)) return false; + if (!noteNames(left->cast()->name, right->cast()->name)) return false; PUSH(Loop, body); break; } @@ -655,8 +653,7 @@ struct ExpressionAnalyzer { break; } case Expression::Id::LoopId: { - noteName(curr->cast()->out); - noteName(curr->cast()->in); + noteName(curr->cast()->name); PUSH(Loop, body); break; } diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 71c6cad80..8703237d5 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -338,16 +338,13 @@ BinaryenExpressionRef BinaryenIf(BinaryenModuleRef module, BinaryenExpressionRef return static_cast(ret); } -BinaryenExpressionRef BinaryenLoop(BinaryenModuleRef module, const char* out, const char* in, BinaryenExpressionRef body) { - if (out && !in) abort(); - auto* ret = Builder(*((Module*)module)).makeLoop(out ? Name(out) : Name(), in ? Name(in) : Name(), (Expression*)body); +BinaryenExpressionRef BinaryenLoop(BinaryenModuleRef module, const char* name, BinaryenExpressionRef body) { + auto* ret = Builder(*((Module*)module)).makeLoop(name ? Name(name) : Name(), (Expression*)body); if (tracing) { auto id = noteExpression(ret); std::cout << " expressions[" << id << "] = BinaryenLoop(the_module, "; - traceNameOrNULL(out); - std::cout << ", "; - traceNameOrNULL(in); + traceNameOrNULL(name); std::cout << ", expressions[" << expressions[body] << "]);\n"; } diff --git a/src/binaryen-c.h b/src/binaryen-c.h index 7ca5cd6c7..5d7520a77 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -265,8 +265,7 @@ typedef void* BinaryenExpressionRef; BinaryenExpressionRef BinaryenBlock(BinaryenModuleRef module, const char* name, BinaryenExpressionRef* children, BinaryenIndex numChildren); // If: ifFalse can be NULL BinaryenExpressionRef BinaryenIf(BinaryenModuleRef module, BinaryenExpressionRef condition, BinaryenExpressionRef ifTrue, BinaryenExpressionRef ifFalse); -// Loop: both out and in can be NULL, or just out can be NULL -BinaryenExpressionRef BinaryenLoop(BinaryenModuleRef module, const char* out, const char* in, BinaryenExpressionRef body); +BinaryenExpressionRef BinaryenLoop(BinaryenModuleRef module, const char* in, BinaryenExpressionRef body); // Break: value and condition can be NULL BinaryenExpressionRef BinaryenBreak(BinaryenModuleRef module, const char* name, BinaryenExpressionRef condition, BinaryenExpressionRef value); // Switch: value can be NULL diff --git a/src/cfg/Relooper.cpp b/src/cfg/Relooper.cpp index e75adbce5..8a5337ed0 100644 --- a/src/cfg/Relooper.cpp +++ b/src/cfg/Relooper.cpp @@ -383,7 +383,7 @@ wasm::Expression* MultipleShape::Render(RelooperBuilder& Builder, bool InLoop) { // LoopShape wasm::Expression* LoopShape::Render(RelooperBuilder& Builder, bool InLoop) { - wasm::Expression* Ret = Builder.makeLoop(wasm::Name(), Builder.getShapeContinueName(Id), Inner->Render(Builder, true)); + wasm::Expression* Ret = Builder.makeLoop(Builder.getShapeContinueName(Id), Inner->Render(Builder, true)); Ret = HandleFollowupMultiples(Ret, this, Builder, InLoop); if (Next) { Ret = Builder.makeSequence(Ret, Next->Render(Builder, InLoop)); diff --git a/src/cfg/cfg-traversal.h b/src/cfg/cfg-traversal.h index d690de4aa..2b96fc67a 100644 --- a/src/cfg/cfg-traversal.h +++ b/src/cfg/cfg-traversal.h @@ -130,23 +130,15 @@ struct CFGWalker : public PostWalker { auto* last = self->currBasicBlock; doStartBasicBlock(self, currp); self->link(last, self->currBasicBlock); // fallthrough - // branches to the new one auto* curr = (*currp)->cast(); - if (curr->out.is()) { - auto& origins = self->branches[curr->out]; - for (auto* origin : origins) { - self->link(origin, self->currBasicBlock); - } - self->branches.erase(curr->out); - } // branches to the top of the loop - if (curr->in.is()) { + if (curr->name.is()) { auto* loopStart = self->loopStack.back(); - auto& origins = self->branches[curr->in]; + auto& origins = self->branches[curr->name]; for (auto* origin : origins) { self->link(origin, loopStart); } - self->branches.erase(curr->in); + self->branches.erase(curr->name); } self->loopStack.pop_back(); } diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index 866b3cb73..b30b8ffbd 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -132,12 +132,8 @@ struct DeadCodeElimination : public WalkerPassin.is()) { - reachableBreaks.erase(curr->in); - } - if (curr->out.is()) { - reachable = reachable || reachableBreaks.count(curr->out); - reachableBreaks.erase(curr->out); + if (curr->name.is()) { + reachableBreaks.erase(curr->name); } if (isDead(curr->body)) { replaceCurrent(curr->body); diff --git a/src/passes/NameManager.cpp b/src/passes/NameManager.cpp index df8b34557..9f0198c2f 100644 --- a/src/passes/NameManager.cpp +++ b/src/passes/NameManager.cpp @@ -37,8 +37,7 @@ void NameManager::visitBlock(Block* curr) { names.insert(curr->name); } void NameManager::visitLoop(Loop* curr) { - names.insert(curr->out); - names.insert(curr->in); + names.insert(curr->name); } void NameManager::visitBreak(Break* curr) { names.insert(curr->name); diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index e54468c41..4fb9274c7 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -64,7 +64,9 @@ struct PrintSExpression : public Visitor { } void printFullLine(Expression *expression) { !minify && doIndent(o, indent); - //o << "[" << printWasmType(expression->type) << "] "; // debugging tool +#ifdef DEBUG_TYPES + o << "[" << printWasmType(expression->type) << "] "; +#endif visit(expression); o << maybeNewLine; } @@ -152,12 +154,8 @@ struct PrintSExpression : public Visitor { } void visitLoop(Loop *curr) { printOpening(o, "loop"); - if (curr->out.is()) { - o << ' ' << curr->out; - assert(curr->in.is()); // if just one is printed, it must be the in - } - if (curr->in.is()) { - o << ' ' << curr->in; + if (curr->name.is()) { + o << ' ' << curr->name; } incIndent(); auto block = curr->body->dynCast(); @@ -734,7 +732,9 @@ Pass *createFullPrinterPass() { std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify) { PrintSExpression print(o); print.setMinify(minify); - //o << "[" << printWasmType(expression->type) << "] "; // debugging tool +#ifdef DEBUG_TYPES + o << "[" << printWasmType(expression->type) << "] "; +#endif print.visit(expression); return o; } diff --git a/src/passes/RemoveUnusedNames.cpp b/src/passes/RemoveUnusedNames.cpp index 9c6743479..8e24f9549 100644 --- a/src/passes/RemoveUnusedNames.cpp +++ b/src/passes/RemoveUnusedNames.cpp @@ -76,34 +76,12 @@ struct RemoveUnusedNames : public WalkerPassname); - if (curr->name.is() && curr->list.size() == 1) { - auto* child = curr->list[0]->dynCast(); - if (child && !child->out.is()) { - // we have just one child, this loop, and it lacks an out label. So this block's name is doing just that! - child->out = curr->name; - replaceCurrent(child); - } - } } void visitLoop(Loop *curr) { - handleBreakTarget(curr->in); - // Loops can have just 'in', but cannot have just 'out' - auto out = curr->out; - handleBreakTarget(curr->out); - if (curr->out.is() && !curr->in.is()) { - auto* block = getModule()->allocator.alloc(); - block->name = out; - block->list.push_back(curr->body); - replaceCurrent(block); - } - if (curr->in.is() && !curr->out.is()) { - auto* child = curr->body->dynCast(); - if (child && child->name.is()) { - // we have just one child, this block, and we lack an out label. So we can take the block's! - curr->out = child->name; - child->name = Name(); - } + handleBreakTarget(curr->name); + if (!curr->name.is()) { + replaceCurrent(curr->body); } } diff --git a/src/s2wasm.h b/src/s2wasm.h index 5226ceda3..8c04f7891 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -1064,7 +1064,7 @@ class S2WasmBuilder { if (target->is()) { return target->cast()->name; } else { - return target->cast()->in; + return target->cast()->name; } }; // fixups @@ -1099,10 +1099,9 @@ class S2WasmBuilder { } else if (match("loop")) { auto curr = allocator->alloc(); addToBlock(curr); - curr->in = getNextLabel(); - curr->out = getNextLabel(); + curr->name = getNextLabel(); auto block = allocator->alloc(); - block->name = curr->out; // temporary, fake - this way, on bstack we have the right label at the right offset for a br + block->name = getNextLabel(); curr->body = block; loopBlocks.push_back(block); bstack.push_back(block); diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 791a0459b..373465296 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -875,11 +875,9 @@ public: void visitLoop(Loop *curr) { if (debug) std::cerr << "zz node: Loop" << std::endl; o << int8_t(BinaryConsts::Loop); - breakStack.push_back(curr->out); - breakStack.push_back(curr->in); + breakStack.push_back(curr->name); recursePossibleBlockContents(curr->body); breakStack.pop_back(); - breakStack.pop_back(); o << int8_t(BinaryConsts::End); } @@ -1841,13 +1839,10 @@ public: } void visitLoop(Loop *curr) { if (debug) std::cerr << "zz node: Loop" << std::endl; - curr->out = getNextLabel(); - curr->in = getNextLabel(); - breakStack.push_back(curr->out); - breakStack.push_back(curr->in); + curr->name = getNextLabel(); + breakStack.push_back(curr->name); curr->body = getMaybeBlock(); breakStack.pop_back(); - breakStack.pop_back(); curr->finalize(); } diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 3cba351a2..e68fd5ef2 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -82,9 +82,9 @@ public: ret->finalize(); return ret; } - Loop* makeLoop(Name out, Name in, Expression* body) { + Loop* makeLoop(Name name, Expression* body) { auto* ret = allocator.alloc(); - ret->out = out; ret->in = in; ret->body = body; + ret->name = name; ret->body = body; ret->finalize(); return ret; } @@ -265,7 +265,21 @@ public: if (!block) block = makeBlock(any); if (append) { block->list.push_back(append); - block->finalize(); + block->finalize(); // TODO: move out of if + } + return block; + } + + // ensure a node is a block, if it isn't already, and optionally append to the block + // this variant sets a name for the block, so it will not reuse a block already named + Block* blockifyWithName(Expression* any, Name name, Expression* append = nullptr) { + Block* block = nullptr; + if (any) block = any->dynCast(); + if (!block || block->name.is()) block = makeBlock(any); + block->name = name; + if (append) { + block->list.push_back(append); + block->finalize(); // TODO: move out of if } return block; } diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 77cbd8aab..247d34500 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -170,8 +170,7 @@ public: while (1) { Flow flow = visit(curr->body); if (flow.breaking()) { - if (flow.breakTo == curr->in) continue; // lol - flow.clearIf(curr->out); + if (flow.breakTo == curr->name) continue; // lol } return flow; // loop does not loop automatically, only continue achieves that } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 49fd52ef0..28975c7e3 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1171,24 +1171,28 @@ private: Expression* makeLoop(Element& s) { auto ret = allocator.alloc(); size_t i = 1; + Name out; if (s.size() > i + 1 && s[i]->isStr() && s[i + 1]->isStr()) { // out can only be named if both are - ret->out = s[i]->str(); + out = s[i]->str(); i++; - } else { - ret->out = getPrefixedName("loop-out"); } if (s.size() > i && s[i]->isStr()) { - ret->in = s[i]->str(); + ret->name = s[i]->str(); i++; } else { - ret->in = getPrefixedName("loop-in"); + ret->name = getPrefixedName("loop-in"); } - labelStack.push_back(ret->out); - labelStack.push_back(ret->in); + labelStack.push_back(ret->name); ret->body = makeMaybeBlock(s, i); labelStack.pop_back(); - labelStack.pop_back(); ret->finalize(); + if (out.is()) { + auto* block = allocator.alloc(); + block->name = out; + block->list.push_back(ret); + block->finalize(); + return block; + } return ret; } diff --git a/src/wasm-validator.h b/src/wasm-validator.h index ca89270e9..5844dafcd 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -89,16 +89,16 @@ public: static void visitPreLoop(WasmValidator* self, Expression** currp) { auto* curr = (*currp)->cast(); - if (curr->in.is()) self->breakTargets[curr->in].push_back(curr); - if (curr->out.is()) self->breakTargets[curr->out].push_back(curr); + if (curr->name.is()) self->breakTargets[curr->name].push_back(curr); } void visitLoop(Loop *curr) { - if (curr->in.is()) { - breakTargets[curr->in].pop_back(); - } - if (curr->out.is()) { - breakTargets[curr->out].pop_back(); + if (curr->name.is()) { + breakTargets[curr->name].pop_back(); + if (breakInfos.count(curr) > 0) { + auto& info = breakInfos[curr]; + shouldBeEqual(info.arity, Index(0), curr, "breaks to a loop cannot pass a value"); + } } } diff --git a/src/wasm.cpp b/src/wasm.cpp index 8cfdee759..f6486eb50 100644 --- a/src/wasm.cpp +++ b/src/wasm.cpp @@ -120,7 +120,7 @@ struct TypeSeeker : public PostWalker> { void visitLoop(Loop* curr) { if (curr == target) { types.push_back(curr->body->type); - } else if (curr->in == targetName || curr->out == targetName) { + } else if (curr->name == targetName) { types.clear(); // ignore all breaks til now, they were captured by someone with the same name } } @@ -162,13 +162,7 @@ void Block::finalize() { } void Loop::finalize() { - if (!out.is()) { - type = body->type; - return; - } - - TypeSeeker seeker(this, this->out); - type = mergeTypes(seeker.types); + type = body->type; } } // namespace wasm diff --git a/src/wasm.h b/src/wasm.h index ee3e12910..de86ebba0 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1001,7 +1001,7 @@ public: Loop() {} Loop(MixedArena& allocator) {} - Name out, in; + Name name; Expression *body; // set the type of a loop if you already know it diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 5f36a6209..31e1ff280 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -757,70 +757,72 @@ (set_local $1 (get_local $8) ) - (loop $while-out$23 $while-in$24 - (if - (tee_local $8 - (i32.load offset=16 - (get_local $5) - ) - ) - (set_local $7 - (get_local $8) - ) + (loop $while-in$24 + (block $while-out$23 (if - (tee_local $10 - (i32.load offset=20 + (tee_local $8 + (i32.load offset=16 (get_local $5) ) ) (set_local $7 - (get_local $10) + (get_local $8) ) - (block + (if + (tee_local $10 + (i32.load offset=20 + (get_local $5) + ) + ) (set_local $7 - (get_local $2) + (get_local $10) ) - (set_local $4 - (get_local $1) + (block + (set_local $7 + (get_local $2) + ) + (set_local $4 + (get_local $1) + ) + (br $while-out$23) ) - (br $while-out$23) ) ) - ) - (set_local $10 - (i32.lt_u - (tee_local $8 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $7) + (set_local $10 + (i32.lt_u + (tee_local $8 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $7) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $0) ) - (get_local $0) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $8) - (get_local $2) - (get_local $10) + (set_local $2 + (select + (get_local $8) + (get_local $2) + (get_local $10) + ) ) - ) - (set_local $5 - (get_local $7) - ) - (set_local $1 - (select + (set_local $5 (get_local $7) - (get_local $1) - (get_local $10) ) + (set_local $1 + (select + (get_local $7) + (get_local $1) + (get_local $10) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -901,50 +903,52 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (if - (tee_local $19 - (i32.load - (tee_local $16 - (i32.add - (get_local $8) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (tee_local $19 + (i32.load + (tee_local $16 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $19) - ) - (set_local $10 - (get_local $16) + (block + (set_local $8 + (get_local $19) + ) + (set_local $10 + (get_local $16) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (tee_local $19 - (i32.load - (tee_local $16 - (i32.add - (get_local $8) - (i32.const 16) + (if + (tee_local $19 + (i32.load + (tee_local $16 + (i32.add + (get_local $8) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $19) - ) - (set_local $10 - (get_local $16) + (block + (set_local $8 + (get_local $19) + ) + (set_local $10 + (get_local $16) + ) ) + (br $while-out$27) ) - (br $while-out$27) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1530,131 +1534,133 @@ (set_local $4 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $5 - (i32.sub - (tee_local $18 - (i32.and - (i32.load offset=4 - (get_local $19) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.lt_u + (tee_local $5 + (i32.sub + (tee_local $18 + (i32.and + (i32.load offset=4 + (get_local $19) + ) + (i32.const -8) ) - (i32.const -8) ) + (get_local $2) ) - (get_local $2) ) + (get_local $9) ) - (get_local $9) - ) - (if - (i32.eq - (get_local $18) - (get_local $2) - ) - (block - (set_local $27 - (get_local $5) - ) - (set_local $25 - (get_local $19) + (if + (i32.eq + (get_local $18) + (get_local $2) ) - (set_local $29 - (get_local $19) + (block + (set_local $27 + (get_local $5) + ) + (set_local $25 + (get_local $19) + ) + (set_local $29 + (get_local $19) + ) + (set_local $9 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $9 - (i32.const 90) + (block + (set_local $9 + (get_local $5) + ) + (set_local $4 + (get_local $19) + ) ) - (br $label$break$L123) ) - (block - (set_local $9 - (get_local $5) + ) + (set_local $18 + (select + (get_local $8) + (tee_local $5 + (i32.load offset=20 + (get_local $19) + ) ) - (set_local $4 - (get_local $19) + (i32.or + (i32.eq + (get_local $5) + (i32.const 0) + ) + (i32.eq + (get_local $5) + (tee_local $19 + (i32.load + (i32.add + (i32.add + (get_local $19) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) ) ) ) - ) - (set_local $18 - (select - (get_local $8) + (if (tee_local $5 - (i32.load offset=20 + (i32.eq (get_local $19) + (i32.const 0) ) ) - (i32.or - (i32.eq - (get_local $5) - (i32.const 0) + (block + (set_local $33 + (get_local $9) ) - (i32.eq - (get_local $5) - (tee_local $19 - (i32.load - (i32.add - (i32.add - (get_local $19) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) - ) - (i32.const 2) - ) + (set_local $34 + (get_local $18) + ) + (set_local $30 + (get_local $4) + ) + (set_local $9 + (i32.const 86) + ) + (br $while-out$3) + ) + (block + (set_local $8 + (get_local $18) + ) + (set_local $1 + (i32.shl + (get_local $1) + (i32.xor + (i32.and + (get_local $5) + (i32.const 1) ) + (i32.const 1) ) ) ) ) ) + (br $while-in$4) ) - (if - (tee_local $5 - (i32.eq - (get_local $19) - (i32.const 0) - ) - ) - (block - (set_local $33 - (get_local $9) - ) - (set_local $34 - (get_local $18) - ) - (set_local $30 - (get_local $4) - ) - (set_local $9 - (i32.const 86) - ) - (br $while-out$3) - ) - (block - (set_local $8 - (get_local $18) - ) - (set_local $1 - (i32.shl - (get_local $1) - (i32.xor - (i32.and - (get_local $5) - (i32.const 1) - ) - (i32.const 1) - ) - ) - ) - ) - ) - (br $while-in$4) ) ) (block @@ -1848,84 +1854,86 @@ (get_local $9) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $9 - (i32.const 0) - ) - (set_local $1 - (i32.lt_u - (tee_local $4 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $25) + (loop $while-in$6 + (block $while-out$5 + (set_local $9 + (i32.const 0) + ) + (set_local $1 + (i32.lt_u + (tee_local $4 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $25) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $2) ) - (get_local $2) ) - ) - (get_local $27) - ) - ) - (set_local $5 - (select - (get_local $4) - (get_local $27) - (get_local $1) - ) - ) - (set_local $4 - (select - (get_local $25) - (get_local $29) - (get_local $1) - ) - ) - (if - (tee_local $1 - (i32.load offset=16 - (get_local $25) + (get_local $27) ) ) - (block - (set_local $27 - (get_local $5) - ) - (set_local $25 - (get_local $1) - ) - (set_local $29 + (set_local $5 + (select (get_local $4) + (get_local $27) + (get_local $1) ) - (br $while-in$6) ) - ) - (if - (tee_local $25 - (i32.load offset=20 + (set_local $4 + (select (get_local $25) + (get_local $29) + (get_local $1) ) ) - (block - (set_local $27 - (get_local $5) + (if + (tee_local $1 + (i32.load offset=16 + (get_local $25) + ) ) - (set_local $29 - (get_local $4) + (block + (set_local $27 + (get_local $5) + ) + (set_local $25 + (get_local $1) + ) + (set_local $29 + (get_local $4) + ) + (br $while-in$6) ) ) - (block - (set_local $6 - (get_local $5) + (if + (tee_local $25 + (i32.load offset=20 + (get_local $25) + ) ) - (set_local $12 - (get_local $4) + (block + (set_local $27 + (get_local $5) + ) + (set_local $29 + (get_local $4) + ) + ) + (block + (set_local $6 + (get_local $5) + ) + (set_local $12 + (get_local $4) + ) + (br $while-out$5) ) - (br $while-out$5) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2025,50 +2033,52 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (if - (tee_local $16 - (i32.load - (tee_local $0 - (i32.add - (get_local $8) - (i32.const 20) + (loop $while-in$10 + (block $while-out$9 + (if + (tee_local $16 + (i32.load + (tee_local $0 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $16) - ) - (set_local $7 - (get_local $0) + (block + (set_local $8 + (get_local $16) + ) + (set_local $7 + (get_local $0) + ) + (br $while-in$10) ) - (br $while-in$10) ) - ) - (if - (tee_local $16 - (i32.load - (tee_local $0 - (i32.add - (get_local $8) - (i32.const 16) + (if + (tee_local $16 + (i32.load + (tee_local $0 + (i32.add + (get_local $8) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $16) - ) - (set_local $7 - (get_local $0) + (block + (set_local $8 + (get_local $16) + ) + (set_local $7 + (get_local $0) + ) ) + (br $while-out$9) ) - (br $while-out$9) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -2620,72 +2630,74 @@ (get_local $5) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $6) - ) - (block - (set_local $15 - (get_local $1) + (get_local $6) ) - (set_local $9 - (i32.const 148) + (block + (set_local $15 + (get_local $1) + ) + (set_local $9 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (if - (tee_local $0 - (i32.load - (tee_local $5 - (i32.add + (if + (tee_local $0 + (i32.load + (tee_local $5 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $7) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $7) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $7 - (i32.shl - (get_local $7) - (i32.const 1) + (block + (set_local $7 + (i32.shl + (get_local $7) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $0) ) ) - (set_local $1 - (get_local $0) - ) - ) - (block - (set_local $23 - (get_local $5) - ) - (set_local $21 - (get_local $1) - ) - (set_local $9 - (i32.const 145) + (block + (set_local $23 + (get_local $5) + ) + (set_local $21 + (get_local $1) + ) + (set_local $9 + (i32.const 145) + ) + (br $while-out$17) ) - (br $while-out$17) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3154,59 +3166,61 @@ (set_local $14 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (if + (loop $while-in$38 + (block $while-out$37 (if - (i32.le_u - (tee_local $26 - (i32.load - (get_local $14) - ) - ) - (get_local $8) - ) - (i32.gt_u - (i32.add - (get_local $26) - (i32.load - (tee_local $11 - (i32.add - (get_local $14) - (i32.const 4) - ) + (if + (i32.le_u + (tee_local $26 + (i32.load + (get_local $14) ) ) + (get_local $8) ) - (get_local $8) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $14) - ) - (set_local $7 - (get_local $11) + (i32.gt_u + (i32.add + (get_local $26) + (i32.load + (tee_local $11 + (i32.add + (get_local $14) + (i32.const 4) + ) + ) + ) + ) + (get_local $8) + ) + (i32.const 0) ) - (br $while-out$37) - ) - ) - (if - (i32.eqz - (tee_local $14 - (i32.load offset=8 + (block + (set_local $5 (get_local $14) ) + (set_local $7 + (get_local $11) + ) + (br $while-out$37) ) ) - (block - (set_local $9 - (i32.const 173) + (if + (i32.eqz + (tee_local $14 + (i32.load offset=8 + (get_local $14) + ) + ) + ) + (block + (set_local $9 + (i32.const 173) + ) + (br $label$break$L259) ) - (br $label$break$L259) ) + (br $while-in$38) ) - (br $while-in$38) ) (if (i32.lt_u @@ -3621,55 +3635,57 @@ (set_local $3 (i32.const 624) ) - (loop $do-out$48 $do-in$49 - (if - (i32.eq - (get_local $20) - (i32.add - (tee_local $6 - (i32.load - (get_local $3) + (loop $do-in$49 + (block $do-out$48 + (if + (i32.eq + (get_local $20) + (i32.add + (tee_local $6 + (i32.load + (get_local $3) + ) ) - ) - (tee_local $12 - (i32.load - (tee_local $17 - (i32.add - (get_local $3) - (i32.const 4) + (tee_local $12 + (i32.load + (tee_local $17 + (i32.add + (get_local $3) + (i32.const 4) + ) ) ) ) ) ) - ) - (block - (set_local $47 - (get_local $6) - ) - (set_local $48 - (get_local $17) - ) - (set_local $49 - (get_local $12) - ) - (set_local $50 - (get_local $3) - ) - (set_local $9 - (i32.const 203) + (block + (set_local $47 + (get_local $6) + ) + (set_local $48 + (get_local $17) + ) + (set_local $49 + (get_local $12) + ) + (set_local $50 + (get_local $3) + ) + (set_local $9 + (i32.const 203) + ) + (br $do-out$48) ) - (br $do-out$48) ) - ) - (br_if $do-in$49 - (i32.ne - (tee_local $3 - (i32.load offset=8 - (get_local $3) + (br_if $do-in$49 + (i32.ne + (tee_local $3 + (i32.load offset=8 + (get_local $3) + ) ) + (i32.const 0) ) - (i32.const 0) ) ) ) @@ -3811,43 +3827,45 @@ (set_local $3 (i32.const 624) ) - (loop $while-out$50 $while-in$51 - (if - (i32.eq - (i32.load - (get_local $3) - ) - (get_local $17) - ) - (block - (set_local $51 - (get_local $3) - ) - (set_local $41 - (get_local $3) - ) - (set_local $9 - (i32.const 211) + (loop $while-in$51 + (block $while-out$50 + (if + (i32.eq + (i32.load + (get_local $3) + ) + (get_local $17) ) - (br $while-out$50) - ) - ) - (if - (i32.eqz - (tee_local $3 - (i32.load offset=8 + (block + (set_local $51 + (get_local $3) + ) + (set_local $41 (get_local $3) ) + (set_local $9 + (i32.const 211) + ) + (br $while-out$50) ) ) - (block - (set_local $28 - (i32.const 624) + (if + (i32.eqz + (tee_local $3 + (i32.load offset=8 + (get_local $3) + ) + ) + ) + (block + (set_local $28 + (i32.const 624) + ) + (br $while-out$50) ) - (br $while-out$50) ) + (br $while-in$51) ) - (br $while-in$51) ) (if (i32.eq @@ -4097,50 +4115,52 @@ ) ) ) - (loop $while-out$61 $while-in$62 - (if - (tee_local $8 - (i32.load - (tee_local $2 - (i32.add - (get_local $14) - (i32.const 20) + (loop $while-in$62 + (block $while-out$61 + (if + (tee_local $8 + (i32.load + (tee_local $2 + (i32.add + (get_local $14) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $14 - (get_local $8) - ) - (set_local $11 - (get_local $2) + (block + (set_local $14 + (get_local $8) + ) + (set_local $11 + (get_local $2) + ) + (br $while-in$62) ) - (br $while-in$62) ) - ) - (if - (tee_local $8 - (i32.load - (tee_local $2 - (i32.add - (get_local $14) - (i32.const 16) + (if + (tee_local $8 + (i32.load + (tee_local $2 + (i32.add + (get_local $14) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $14 - (get_local $8) - ) - (set_local $11 - (get_local $2) + (block + (set_local $14 + (get_local $8) + ) + (set_local $11 + (get_local $2) + ) ) + (br $while-out$61) ) - (br $while-out$61) + (br $while-in$62) ) - (br $while-in$62) ) (if (i32.lt_u @@ -4839,72 +4859,74 @@ (get_local $2) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$72 + (block $while-out$71 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $15) - ) - (block - (set_local $36 - (get_local $1) + (get_local $15) ) - (set_local $9 - (i32.const 281) + (block + (set_local $36 + (get_local $1) + ) + (set_local $9 + (i32.const 281) + ) + (br $while-out$71) ) - (br $while-out$71) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $2 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $14) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $14) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $14 - (i32.shl - (get_local $14) - (i32.const 1) + (block + (set_local $14 + (i32.shl + (get_local $14) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $44 - (get_local $2) - ) - (set_local $52 - (get_local $1) - ) - (set_local $9 - (i32.const 278) + (block + (set_local $44 + (get_local $2) + ) + (set_local $52 + (get_local $1) + ) + (set_local $9 + (i32.const 278) + ) + (br $while-out$71) ) - (br $while-out$71) ) + (br $while-in$72) ) - (br $while-in$72) ) (if (i32.eq @@ -5029,43 +5051,45 @@ ) ) ) - (loop $while-out$73 $while-in$74 - (if + (loop $while-in$74 + (block $while-out$73 (if - (i32.le_u - (tee_local $3 - (i32.load - (get_local $28) - ) - ) - (get_local $13) - ) - (i32.gt_u - (tee_local $15 - (i32.add - (get_local $3) - (i32.load offset=4 + (if + (i32.le_u + (tee_local $3 + (i32.load (get_local $28) ) ) + (get_local $13) ) - (get_local $13) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $15) + (i32.gt_u + (tee_local $15 + (i32.add + (get_local $3) + (i32.load offset=4 + (get_local $28) + ) + ) + ) + (get_local $13) + ) + (i32.const 0) + ) + (block + (set_local $5 + (get_local $15) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (set_local $28 - (i32.load offset=8 - (get_local $28) + (set_local $28 + (i32.load offset=8 + (get_local $28) + ) ) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $15 (i32.add @@ -5575,72 +5599,74 @@ (get_local $6) ) ) - (loop $while-out$77 $while-in$78 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$78 + (block $while-out$77 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $3) - ) - (block - (set_local $38 - (get_local $1) + (get_local $3) ) - (set_local $9 - (i32.const 307) + (block + (set_local $38 + (get_local $1) + ) + (set_local $9 + (i32.const 307) + ) + (br $while-out$77) ) - (br $while-out$77) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $6 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $6 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $2) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $2) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $2 - (i32.shl - (get_local $2) - (i32.const 1) + (block + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $46 - (get_local $6) - ) - (set_local $53 - (get_local $1) - ) - (set_local $9 - (i32.const 304) + (block + (set_local $46 + (get_local $6) + ) + (set_local $53 + (get_local $1) + ) + (set_local $9 + (i32.const 304) + ) + (br $while-out$77) ) - (br $while-out$77) ) + (br $while-in$78) ) - (br $while-in$78) ) (if (i32.eq @@ -6318,58 +6344,60 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (if - (tee_local $11 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (tee_local $11 + (i32.load + (tee_local $5 + (i32.add + (get_local $1) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $6 - (get_local $5) + (block + (set_local $1 + (get_local $11) + ) + (set_local $6 + (get_local $5) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $5 + (i32.add + (get_local $1) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $6 - (get_local $5) - ) - ) - (block - (set_local $5 - (get_local $1) + (block + (set_local $1 + (get_local $11) + ) + (set_local $6 + (get_local $5) + ) ) - (set_local $10 - (get_local $6) + (block + (set_local $5 + (get_local $1) + ) + (set_local $10 + (get_local $6) + ) + (br $while-out$4) ) - (br $while-out$4) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -6870,50 +6898,52 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $6 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $6 + (get_local $1) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $6 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $6 + (get_local $1) + ) ) + (br $while-out$12) ) - (br $while-out$12) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -7568,72 +7598,74 @@ (get_local $3) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $0) - ) - (block - (set_local $17 - (get_local $1) + (get_local $0) ) - (set_local $0 - (i32.const 130) + (block + (set_local $17 + (get_local $1) + ) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $16 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $16 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $18 - (get_local $16) - ) - (set_local $19 - (get_local $1) - ) - (set_local $0 - (i32.const 127) + (block + (set_local $18 + (get_local $16) + ) + (set_local $19 + (get_local $1) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (br $while-out$18) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -7767,22 +7799,24 @@ (i32.const 632) ) ) - (loop $while-out$20 $while-in$21 - (if - (tee_local $2 - (i32.load - (get_local $0) + (loop $while-in$21 + (block $while-out$20 + (if + (tee_local $2 + (i32.load + (get_local $0) + ) ) - ) - (set_local $0 - (i32.add - (get_local $2) - (i32.const 8) + (set_local $0 + (i32.add + (get_local $2) + (i32.const 8) + ) ) + (br $while-out$20) ) - (br $while-out$20) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -7895,209 +7929,211 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $5) - (tee_local $6 - (if - (i32.load - (i32.const 8) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 4) - (get_local $0) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $5) + (tee_local $6 + (if + (i32.load + (i32.const 8) ) - (i32.store - (get_local $13) - (i32.load - (get_local $1) + (block + (call_import $_pthread_cleanup_push + (i32.const 4) + (get_local $0) ) - ) - (i32.store offset=4 - (get_local $13) - (get_local $4) - ) - (i32.store offset=8 - (get_local $13) - (get_local $3) - ) - (set_local $10 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) - (get_local $13) + (i32.store + (get_local $13) + (i32.load + (get_local $1) ) ) - ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (get_local $10) - ) - (block - (i32.store - (get_local $12) - (i32.load - (get_local $1) + (i32.store offset=4 + (get_local $13) + (get_local $4) ) + (i32.store offset=8 + (get_local $13) + (get_local $3) + ) + (set_local $10 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $13) + ) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (get_local $10) ) - (i32.store offset=4 - (get_local $12) - (get_local $4) - ) - (i32.store offset=8 - (get_local $12) - (get_local $3) - ) - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (block + (i32.store + (get_local $12) + (i32.load + (get_local $1) + ) + ) + (i32.store offset=4 (get_local $12) + (get_local $4) + ) + (i32.store offset=8 + (get_local $12) + (get_local $3) + ) + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $12) + ) ) ) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $6) - (i32.const 0) ) - (block - (set_local $17 - (get_local $4) - ) - (set_local $18 - (get_local $3) + (if + (i32.lt_s + (get_local $6) + (i32.const 0) ) - (set_local $1 - (i32.const 8) + (block + (set_local $17 + (get_local $4) + ) + (set_local $18 + (get_local $3) + ) + (set_local $1 + (i32.const 8) + ) + (br $while-out$0) ) - (br $while-out$0) ) - ) - (set_local $10 - (i32.sub - (get_local $5) - (get_local $6) - ) - ) - (set_local $3 - (if - (i32.le_u + (set_local $10 + (i32.sub + (get_local $5) (get_local $6) - (tee_local $5 - (i32.load offset=4 - (get_local $4) - ) - ) ) + ) + (set_local $3 (if - (i32.eq - (get_local $3) - (i32.const 2) + (i32.le_u + (get_local $6) + (tee_local $5 + (i32.load offset=4 + (get_local $4) + ) + ) + ) + (if + (i32.eq + (get_local $3) + (i32.const 2) + ) + (block + (i32.store + (get_local $9) + (i32.add + (i32.load + (get_local $9) + ) + (get_local $6) + ) + ) + (set_local $7 + (get_local $4) + ) + (set_local $15 + (i32.const 2) + ) + (get_local $5) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $15 + (get_local $3) + ) + (get_local $5) + ) ) (block (i32.store (get_local $9) - (i32.add + (tee_local $7 (i32.load - (get_local $9) + (get_local $8) ) - (get_local $6) ) ) - (set_local $7 - (get_local $4) + (i32.store + (get_local $14) + (get_local $7) ) - (set_local $15 - (i32.const 2) + (set_local $6 + (i32.sub + (get_local $6) + (get_local $5) + ) ) - (get_local $5) - ) - (block (set_local $7 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $15 - (get_local $3) - ) - (get_local $5) - ) - ) - (block - (i32.store - (get_local $9) - (tee_local $7 - (i32.load - (get_local $8) + (i32.add + (get_local $3) + (i32.const -1) ) ) - ) - (i32.store - (get_local $14) - (get_local $7) - ) - (set_local $6 - (i32.sub - (get_local $6) - (get_local $5) - ) - ) - (set_local $7 - (i32.add + (i32.load offset=12 (get_local $4) - (i32.const 8) ) ) - (set_local $15 - (i32.add - (get_local $3) - (i32.const -1) - ) - ) - (i32.load offset=12 - (get_local $4) + ) + ) + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) ) + (get_local $6) ) ) - ) - (i32.store - (get_local $7) - (i32.add - (i32.load - (get_local $7) + (i32.store offset=4 + (get_local $7) + (i32.sub + (get_local $3) + (get_local $6) ) - (get_local $6) ) - ) - (i32.store offset=4 - (get_local $7) - (i32.sub - (get_local $3) - (get_local $6) + (set_local $4 + (get_local $7) ) + (set_local $3 + (get_local $15) + ) + (set_local $5 + (get_local $10) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $7) - ) - (set_local $3 - (get_local $15) - ) - (set_local $5 - (get_local $10) - ) - (br $while-in$1) ) (if (i32.eq @@ -8287,49 +8323,51 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $3) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $3 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $3) ) - (br $label$break$L10 - (get_local $1) + (block + (set_local $2 + (get_local $0) + ) + (set_local $3 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $1) + ) ) ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $7 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $7 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 10) ) - (i32.const 10) - ) - (block - (set_local $4 - (get_local $3) + (block + (set_local $4 + (get_local $3) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $7) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $7) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -8483,62 +8521,64 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $___lockfile (get_local $1) ) - (i32.const -1) - ) - (call $___lockfile - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $___fflush_unlocked - (get_local $1) + (i32.or + (call $___fflush_unlocked + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) ) - ) - (if - (get_local $0) - (call $___unlockfile - (get_local $1) + (if + (get_local $0) + (call $___unlockfile + (get_local $1) + ) ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=56 - (get_local $1) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) ) - (br $while-out$2) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -8568,45 +8608,47 @@ (set_local $4 (get_local $3) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $0) + (loop $while-in$2 + (block $while-out$1 + (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) ) - ) - (if - (i32.eqz - (i32.and - (tee_local $4 - (tee_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (if + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) - ) - ) - (block - (set_local $2 - (get_local $0) ) - (set_local $1 - (i32.const 4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $1 + (i32.const 4) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -8628,34 +8670,36 @@ (set_local $1 (get_local $2) ) - (loop $while-out$3 $while-in$4 - (if - (i32.and - (i32.xor - (i32.and - (tee_local $2 - (i32.load - (get_local $1) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.and + (i32.xor + (i32.and + (tee_local $2 + (i32.load + (get_local $1) + ) ) + (i32.const -2139062144) ) (i32.const -2139062144) ) - (i32.const -2139062144) - ) - (i32.add - (get_local $2) - (i32.const -16843009) + (i32.add + (get_local $2) + (i32.const -16843009) + ) ) - ) - (br $while-out$3) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (br $while-out$3) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.shr_s @@ -8672,22 +8716,24 @@ (set_local $2 (get_local $1) ) - (loop $while-out$5 $while-in$6 - (if - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$6 + (block $while-out$5 + (if + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $2) + (i32.const 1) + ) ) ) + (set_local $2 + (get_local $1) + ) + (br $while-out$5) ) - (set_local $2 - (get_local $1) - ) - (br $while-out$5) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -9011,116 +9057,122 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eqz - (get_local $2) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -9193,66 +9245,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index a79d63e05..0b3963290 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -756,70 +756,72 @@ (set_local $1 (get_local $8) ) - (loop $while-out$23 $while-in$24 - (if - (tee_local $8 - (i32.load offset=16 - (get_local $5) - ) - ) - (set_local $7 - (get_local $8) - ) + (loop $while-in$24 + (block $while-out$23 (if - (tee_local $10 - (i32.load offset=20 + (tee_local $8 + (i32.load offset=16 (get_local $5) ) ) (set_local $7 - (get_local $10) + (get_local $8) ) - (block + (if + (tee_local $10 + (i32.load offset=20 + (get_local $5) + ) + ) (set_local $7 - (get_local $2) + (get_local $10) ) - (set_local $4 - (get_local $1) + (block + (set_local $7 + (get_local $2) + ) + (set_local $4 + (get_local $1) + ) + (br $while-out$23) ) - (br $while-out$23) ) ) - ) - (set_local $10 - (i32.lt_u - (tee_local $8 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $7) + (set_local $10 + (i32.lt_u + (tee_local $8 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $7) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $0) ) - (get_local $0) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $8) - (get_local $2) - (get_local $10) + (set_local $2 + (select + (get_local $8) + (get_local $2) + (get_local $10) + ) ) - ) - (set_local $5 - (get_local $7) - ) - (set_local $1 - (select + (set_local $5 (get_local $7) - (get_local $1) - (get_local $10) ) + (set_local $1 + (select + (get_local $7) + (get_local $1) + (get_local $10) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -900,50 +902,52 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (if - (tee_local $19 - (i32.load - (tee_local $16 - (i32.add - (get_local $8) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (tee_local $19 + (i32.load + (tee_local $16 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $19) - ) - (set_local $10 - (get_local $16) + (block + (set_local $8 + (get_local $19) + ) + (set_local $10 + (get_local $16) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (tee_local $19 - (i32.load - (tee_local $16 - (i32.add - (get_local $8) - (i32.const 16) + (if + (tee_local $19 + (i32.load + (tee_local $16 + (i32.add + (get_local $8) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $19) - ) - (set_local $10 - (get_local $16) + (block + (set_local $8 + (get_local $19) + ) + (set_local $10 + (get_local $16) + ) ) + (br $while-out$27) ) - (br $while-out$27) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1529,131 +1533,133 @@ (set_local $4 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $5 - (i32.sub - (tee_local $18 - (i32.and - (i32.load offset=4 - (get_local $19) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.lt_u + (tee_local $5 + (i32.sub + (tee_local $18 + (i32.and + (i32.load offset=4 + (get_local $19) + ) + (i32.const -8) ) - (i32.const -8) ) + (get_local $2) ) - (get_local $2) ) + (get_local $9) ) - (get_local $9) - ) - (if - (i32.eq - (get_local $18) - (get_local $2) - ) - (block - (set_local $27 - (get_local $5) - ) - (set_local $25 - (get_local $19) + (if + (i32.eq + (get_local $18) + (get_local $2) ) - (set_local $29 - (get_local $19) + (block + (set_local $27 + (get_local $5) + ) + (set_local $25 + (get_local $19) + ) + (set_local $29 + (get_local $19) + ) + (set_local $9 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $9 - (i32.const 90) + (block + (set_local $9 + (get_local $5) + ) + (set_local $4 + (get_local $19) + ) ) - (br $label$break$L123) ) - (block - (set_local $9 - (get_local $5) + ) + (set_local $18 + (select + (get_local $8) + (tee_local $5 + (i32.load offset=20 + (get_local $19) + ) ) - (set_local $4 - (get_local $19) + (i32.or + (i32.eq + (get_local $5) + (i32.const 0) + ) + (i32.eq + (get_local $5) + (tee_local $19 + (i32.load + (i32.add + (i32.add + (get_local $19) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) ) ) ) - ) - (set_local $18 - (select - (get_local $8) + (if (tee_local $5 - (i32.load offset=20 + (i32.eq (get_local $19) + (i32.const 0) ) ) - (i32.or - (i32.eq - (get_local $5) - (i32.const 0) + (block + (set_local $33 + (get_local $9) ) - (i32.eq - (get_local $5) - (tee_local $19 - (i32.load - (i32.add - (i32.add - (get_local $19) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) - ) - (i32.const 2) - ) + (set_local $34 + (get_local $18) + ) + (set_local $30 + (get_local $4) + ) + (set_local $9 + (i32.const 86) + ) + (br $while-out$3) + ) + (block + (set_local $8 + (get_local $18) + ) + (set_local $1 + (i32.shl + (get_local $1) + (i32.xor + (i32.and + (get_local $5) + (i32.const 1) ) + (i32.const 1) ) ) ) ) ) + (br $while-in$4) ) - (if - (tee_local $5 - (i32.eq - (get_local $19) - (i32.const 0) - ) - ) - (block - (set_local $33 - (get_local $9) - ) - (set_local $34 - (get_local $18) - ) - (set_local $30 - (get_local $4) - ) - (set_local $9 - (i32.const 86) - ) - (br $while-out$3) - ) - (block - (set_local $8 - (get_local $18) - ) - (set_local $1 - (i32.shl - (get_local $1) - (i32.xor - (i32.and - (get_local $5) - (i32.const 1) - ) - (i32.const 1) - ) - ) - ) - ) - ) - (br $while-in$4) ) ) (block @@ -1847,84 +1853,86 @@ (get_local $9) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $9 - (i32.const 0) - ) - (set_local $1 - (i32.lt_u - (tee_local $4 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $25) + (loop $while-in$6 + (block $while-out$5 + (set_local $9 + (i32.const 0) + ) + (set_local $1 + (i32.lt_u + (tee_local $4 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $25) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $2) ) - (get_local $2) ) - ) - (get_local $27) - ) - ) - (set_local $5 - (select - (get_local $4) - (get_local $27) - (get_local $1) - ) - ) - (set_local $4 - (select - (get_local $25) - (get_local $29) - (get_local $1) - ) - ) - (if - (tee_local $1 - (i32.load offset=16 - (get_local $25) + (get_local $27) ) ) - (block - (set_local $27 - (get_local $5) - ) - (set_local $25 - (get_local $1) - ) - (set_local $29 + (set_local $5 + (select (get_local $4) + (get_local $27) + (get_local $1) ) - (br $while-in$6) ) - ) - (if - (tee_local $25 - (i32.load offset=20 + (set_local $4 + (select (get_local $25) + (get_local $29) + (get_local $1) ) ) - (block - (set_local $27 - (get_local $5) + (if + (tee_local $1 + (i32.load offset=16 + (get_local $25) + ) ) - (set_local $29 - (get_local $4) + (block + (set_local $27 + (get_local $5) + ) + (set_local $25 + (get_local $1) + ) + (set_local $29 + (get_local $4) + ) + (br $while-in$6) ) ) - (block - (set_local $6 - (get_local $5) + (if + (tee_local $25 + (i32.load offset=20 + (get_local $25) + ) ) - (set_local $12 - (get_local $4) + (block + (set_local $27 + (get_local $5) + ) + (set_local $29 + (get_local $4) + ) + ) + (block + (set_local $6 + (get_local $5) + ) + (set_local $12 + (get_local $4) + ) + (br $while-out$5) ) - (br $while-out$5) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2024,50 +2032,52 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (if - (tee_local $16 - (i32.load - (tee_local $0 - (i32.add - (get_local $8) - (i32.const 20) + (loop $while-in$10 + (block $while-out$9 + (if + (tee_local $16 + (i32.load + (tee_local $0 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $16) - ) - (set_local $7 - (get_local $0) + (block + (set_local $8 + (get_local $16) + ) + (set_local $7 + (get_local $0) + ) + (br $while-in$10) ) - (br $while-in$10) ) - ) - (if - (tee_local $16 - (i32.load - (tee_local $0 - (i32.add - (get_local $8) - (i32.const 16) + (if + (tee_local $16 + (i32.load + (tee_local $0 + (i32.add + (get_local $8) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $8 - (get_local $16) - ) - (set_local $7 - (get_local $0) + (block + (set_local $8 + (get_local $16) + ) + (set_local $7 + (get_local $0) + ) ) + (br $while-out$9) ) - (br $while-out$9) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -2619,72 +2629,74 @@ (get_local $5) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $6) - ) - (block - (set_local $15 - (get_local $1) + (get_local $6) ) - (set_local $9 - (i32.const 148) + (block + (set_local $15 + (get_local $1) + ) + (set_local $9 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (if - (tee_local $0 - (i32.load - (tee_local $5 - (i32.add + (if + (tee_local $0 + (i32.load + (tee_local $5 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $7) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $7) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $7 - (i32.shl - (get_local $7) - (i32.const 1) + (block + (set_local $7 + (i32.shl + (get_local $7) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $0) ) ) - (set_local $1 - (get_local $0) - ) - ) - (block - (set_local $23 - (get_local $5) - ) - (set_local $21 - (get_local $1) - ) - (set_local $9 - (i32.const 145) + (block + (set_local $23 + (get_local $5) + ) + (set_local $21 + (get_local $1) + ) + (set_local $9 + (i32.const 145) + ) + (br $while-out$17) ) - (br $while-out$17) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3153,59 +3165,61 @@ (set_local $14 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (if + (loop $while-in$38 + (block $while-out$37 (if - (i32.le_u - (tee_local $26 - (i32.load - (get_local $14) - ) - ) - (get_local $8) - ) - (i32.gt_u - (i32.add - (get_local $26) - (i32.load - (tee_local $11 - (i32.add - (get_local $14) - (i32.const 4) - ) + (if + (i32.le_u + (tee_local $26 + (i32.load + (get_local $14) ) ) + (get_local $8) ) - (get_local $8) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $14) - ) - (set_local $7 - (get_local $11) + (i32.gt_u + (i32.add + (get_local $26) + (i32.load + (tee_local $11 + (i32.add + (get_local $14) + (i32.const 4) + ) + ) + ) + ) + (get_local $8) + ) + (i32.const 0) ) - (br $while-out$37) - ) - ) - (if - (i32.eqz - (tee_local $14 - (i32.load offset=8 + (block + (set_local $5 (get_local $14) ) + (set_local $7 + (get_local $11) + ) + (br $while-out$37) ) ) - (block - (set_local $9 - (i32.const 173) + (if + (i32.eqz + (tee_local $14 + (i32.load offset=8 + (get_local $14) + ) + ) + ) + (block + (set_local $9 + (i32.const 173) + ) + (br $label$break$L259) ) - (br $label$break$L259) ) + (br $while-in$38) ) - (br $while-in$38) ) (if (i32.lt_u @@ -3620,55 +3634,57 @@ (set_local $3 (i32.const 624) ) - (loop $do-out$48 $do-in$49 - (if - (i32.eq - (get_local $20) - (i32.add - (tee_local $6 - (i32.load - (get_local $3) + (loop $do-in$49 + (block $do-out$48 + (if + (i32.eq + (get_local $20) + (i32.add + (tee_local $6 + (i32.load + (get_local $3) + ) ) - ) - (tee_local $12 - (i32.load - (tee_local $17 - (i32.add - (get_local $3) - (i32.const 4) + (tee_local $12 + (i32.load + (tee_local $17 + (i32.add + (get_local $3) + (i32.const 4) + ) ) ) ) ) ) - ) - (block - (set_local $47 - (get_local $6) - ) - (set_local $48 - (get_local $17) - ) - (set_local $49 - (get_local $12) - ) - (set_local $50 - (get_local $3) - ) - (set_local $9 - (i32.const 203) + (block + (set_local $47 + (get_local $6) + ) + (set_local $48 + (get_local $17) + ) + (set_local $49 + (get_local $12) + ) + (set_local $50 + (get_local $3) + ) + (set_local $9 + (i32.const 203) + ) + (br $do-out$48) ) - (br $do-out$48) ) - ) - (br_if $do-in$49 - (i32.ne - (tee_local $3 - (i32.load offset=8 - (get_local $3) + (br_if $do-in$49 + (i32.ne + (tee_local $3 + (i32.load offset=8 + (get_local $3) + ) ) + (i32.const 0) ) - (i32.const 0) ) ) ) @@ -3810,43 +3826,45 @@ (set_local $3 (i32.const 624) ) - (loop $while-out$50 $while-in$51 - (if - (i32.eq - (i32.load - (get_local $3) - ) - (get_local $17) - ) - (block - (set_local $51 - (get_local $3) - ) - (set_local $41 - (get_local $3) - ) - (set_local $9 - (i32.const 211) + (loop $while-in$51 + (block $while-out$50 + (if + (i32.eq + (i32.load + (get_local $3) + ) + (get_local $17) ) - (br $while-out$50) - ) - ) - (if - (i32.eqz - (tee_local $3 - (i32.load offset=8 + (block + (set_local $51 + (get_local $3) + ) + (set_local $41 (get_local $3) ) + (set_local $9 + (i32.const 211) + ) + (br $while-out$50) ) ) - (block - (set_local $28 - (i32.const 624) + (if + (i32.eqz + (tee_local $3 + (i32.load offset=8 + (get_local $3) + ) + ) + ) + (block + (set_local $28 + (i32.const 624) + ) + (br $while-out$50) ) - (br $while-out$50) ) + (br $while-in$51) ) - (br $while-in$51) ) (if (i32.eq @@ -4096,50 +4114,52 @@ ) ) ) - (loop $while-out$61 $while-in$62 - (if - (tee_local $8 - (i32.load - (tee_local $2 - (i32.add - (get_local $14) - (i32.const 20) + (loop $while-in$62 + (block $while-out$61 + (if + (tee_local $8 + (i32.load + (tee_local $2 + (i32.add + (get_local $14) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $14 - (get_local $8) - ) - (set_local $11 - (get_local $2) + (block + (set_local $14 + (get_local $8) + ) + (set_local $11 + (get_local $2) + ) + (br $while-in$62) ) - (br $while-in$62) ) - ) - (if - (tee_local $8 - (i32.load - (tee_local $2 - (i32.add - (get_local $14) - (i32.const 16) + (if + (tee_local $8 + (i32.load + (tee_local $2 + (i32.add + (get_local $14) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $14 - (get_local $8) - ) - (set_local $11 - (get_local $2) + (block + (set_local $14 + (get_local $8) + ) + (set_local $11 + (get_local $2) + ) ) + (br $while-out$61) ) - (br $while-out$61) + (br $while-in$62) ) - (br $while-in$62) ) (if (i32.lt_u @@ -4838,72 +4858,74 @@ (get_local $2) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$72 + (block $while-out$71 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $15) - ) - (block - (set_local $36 - (get_local $1) + (get_local $15) ) - (set_local $9 - (i32.const 281) + (block + (set_local $36 + (get_local $1) + ) + (set_local $9 + (i32.const 281) + ) + (br $while-out$71) ) - (br $while-out$71) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $2 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $14) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $14) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $14 - (i32.shl - (get_local $14) - (i32.const 1) + (block + (set_local $14 + (i32.shl + (get_local $14) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $44 - (get_local $2) - ) - (set_local $52 - (get_local $1) - ) - (set_local $9 - (i32.const 278) + (block + (set_local $44 + (get_local $2) + ) + (set_local $52 + (get_local $1) + ) + (set_local $9 + (i32.const 278) + ) + (br $while-out$71) ) - (br $while-out$71) ) + (br $while-in$72) ) - (br $while-in$72) ) (if (i32.eq @@ -5028,43 +5050,45 @@ ) ) ) - (loop $while-out$73 $while-in$74 - (if + (loop $while-in$74 + (block $while-out$73 (if - (i32.le_u - (tee_local $3 - (i32.load - (get_local $28) - ) - ) - (get_local $13) - ) - (i32.gt_u - (tee_local $15 - (i32.add - (get_local $3) - (i32.load offset=4 + (if + (i32.le_u + (tee_local $3 + (i32.load (get_local $28) ) ) + (get_local $13) ) - (get_local $13) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $15) + (i32.gt_u + (tee_local $15 + (i32.add + (get_local $3) + (i32.load offset=4 + (get_local $28) + ) + ) + ) + (get_local $13) + ) + (i32.const 0) + ) + (block + (set_local $5 + (get_local $15) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (set_local $28 - (i32.load offset=8 - (get_local $28) + (set_local $28 + (i32.load offset=8 + (get_local $28) + ) ) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $15 (i32.add @@ -5574,72 +5598,74 @@ (get_local $6) ) ) - (loop $while-out$77 $while-in$78 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$78 + (block $while-out$77 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $3) - ) - (block - (set_local $38 - (get_local $1) + (get_local $3) ) - (set_local $9 - (i32.const 307) + (block + (set_local $38 + (get_local $1) + ) + (set_local $9 + (i32.const 307) + ) + (br $while-out$77) ) - (br $while-out$77) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $6 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $6 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $2) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $2) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $2 - (i32.shl - (get_local $2) - (i32.const 1) + (block + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $46 - (get_local $6) - ) - (set_local $53 - (get_local $1) - ) - (set_local $9 - (i32.const 304) + (block + (set_local $46 + (get_local $6) + ) + (set_local $53 + (get_local $1) + ) + (set_local $9 + (i32.const 304) + ) + (br $while-out$77) ) - (br $while-out$77) ) + (br $while-in$78) ) - (br $while-in$78) ) (if (i32.eq @@ -6317,58 +6343,60 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (if - (tee_local $11 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (tee_local $11 + (i32.load + (tee_local $5 + (i32.add + (get_local $1) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $6 - (get_local $5) + (block + (set_local $1 + (get_local $11) + ) + (set_local $6 + (get_local $5) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $5 + (i32.add + (get_local $1) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $6 - (get_local $5) - ) - ) - (block - (set_local $5 - (get_local $1) + (block + (set_local $1 + (get_local $11) + ) + (set_local $6 + (get_local $5) + ) ) - (set_local $10 - (get_local $6) + (block + (set_local $5 + (get_local $1) + ) + (set_local $10 + (get_local $6) + ) + (br $while-out$4) ) - (br $while-out$4) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -6869,50 +6897,52 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $6 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $6 + (get_local $1) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $6 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $6 + (get_local $1) + ) ) + (br $while-out$12) ) - (br $while-out$12) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -7567,72 +7597,74 @@ (get_local $3) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $0) - ) - (block - (set_local $17 - (get_local $1) + (get_local $0) ) - (set_local $0 - (i32.const 130) + (block + (set_local $17 + (get_local $1) + ) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $16 - (i32.add + (if + (tee_local $7 + (i32.load + (tee_local $16 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $7) ) ) - (set_local $1 - (get_local $7) - ) - ) - (block - (set_local $18 - (get_local $16) - ) - (set_local $19 - (get_local $1) - ) - (set_local $0 - (i32.const 127) + (block + (set_local $18 + (get_local $16) + ) + (set_local $19 + (get_local $1) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (br $while-out$18) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -7766,22 +7798,24 @@ (i32.const 632) ) ) - (loop $while-out$20 $while-in$21 - (if - (tee_local $2 - (i32.load - (get_local $0) + (loop $while-in$21 + (block $while-out$20 + (if + (tee_local $2 + (i32.load + (get_local $0) + ) ) - ) - (set_local $0 - (i32.add - (get_local $2) - (i32.const 8) + (set_local $0 + (i32.add + (get_local $2) + (i32.const 8) + ) ) + (br $while-out$20) ) - (br $while-out$20) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -7894,209 +7928,211 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $5) - (tee_local $6 - (if - (i32.load - (i32.const 8) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 4) - (get_local $0) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $5) + (tee_local $6 + (if + (i32.load + (i32.const 8) ) - (i32.store - (get_local $13) - (i32.load - (get_local $1) + (block + (call_import $_pthread_cleanup_push + (i32.const 4) + (get_local $0) ) - ) - (i32.store offset=4 - (get_local $13) - (get_local $4) - ) - (i32.store offset=8 - (get_local $13) - (get_local $3) - ) - (set_local $10 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) - (get_local $13) + (i32.store + (get_local $13) + (i32.load + (get_local $1) ) ) - ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (get_local $10) - ) - (block - (i32.store - (get_local $12) - (i32.load - (get_local $1) + (i32.store offset=4 + (get_local $13) + (get_local $4) ) + (i32.store offset=8 + (get_local $13) + (get_local $3) + ) + (set_local $10 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $13) + ) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (get_local $10) ) - (i32.store offset=4 - (get_local $12) - (get_local $4) - ) - (i32.store offset=8 - (get_local $12) - (get_local $3) - ) - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (block + (i32.store + (get_local $12) + (i32.load + (get_local $1) + ) + ) + (i32.store offset=4 (get_local $12) + (get_local $4) + ) + (i32.store offset=8 + (get_local $12) + (get_local $3) + ) + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $12) + ) ) ) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $6) - (i32.const 0) ) - (block - (set_local $17 - (get_local $4) - ) - (set_local $18 - (get_local $3) + (if + (i32.lt_s + (get_local $6) + (i32.const 0) ) - (set_local $1 - (i32.const 8) + (block + (set_local $17 + (get_local $4) + ) + (set_local $18 + (get_local $3) + ) + (set_local $1 + (i32.const 8) + ) + (br $while-out$0) ) - (br $while-out$0) ) - ) - (set_local $10 - (i32.sub - (get_local $5) - (get_local $6) - ) - ) - (set_local $3 - (if - (i32.le_u + (set_local $10 + (i32.sub + (get_local $5) (get_local $6) - (tee_local $5 - (i32.load offset=4 - (get_local $4) - ) - ) ) + ) + (set_local $3 (if - (i32.eq - (get_local $3) - (i32.const 2) + (i32.le_u + (get_local $6) + (tee_local $5 + (i32.load offset=4 + (get_local $4) + ) + ) + ) + (if + (i32.eq + (get_local $3) + (i32.const 2) + ) + (block + (i32.store + (get_local $9) + (i32.add + (i32.load + (get_local $9) + ) + (get_local $6) + ) + ) + (set_local $7 + (get_local $4) + ) + (set_local $15 + (i32.const 2) + ) + (get_local $5) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $15 + (get_local $3) + ) + (get_local $5) + ) ) (block (i32.store (get_local $9) - (i32.add + (tee_local $7 (i32.load - (get_local $9) + (get_local $8) ) - (get_local $6) ) ) - (set_local $7 - (get_local $4) + (i32.store + (get_local $14) + (get_local $7) ) - (set_local $15 - (i32.const 2) + (set_local $6 + (i32.sub + (get_local $6) + (get_local $5) + ) ) - (get_local $5) - ) - (block (set_local $7 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $15 - (get_local $3) - ) - (get_local $5) - ) - ) - (block - (i32.store - (get_local $9) - (tee_local $7 - (i32.load - (get_local $8) + (i32.add + (get_local $3) + (i32.const -1) ) ) - ) - (i32.store - (get_local $14) - (get_local $7) - ) - (set_local $6 - (i32.sub - (get_local $6) - (get_local $5) - ) - ) - (set_local $7 - (i32.add + (i32.load offset=12 (get_local $4) - (i32.const 8) ) ) - (set_local $15 - (i32.add - (get_local $3) - (i32.const -1) - ) - ) - (i32.load offset=12 - (get_local $4) + ) + ) + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) ) + (get_local $6) ) ) - ) - (i32.store - (get_local $7) - (i32.add - (i32.load - (get_local $7) + (i32.store offset=4 + (get_local $7) + (i32.sub + (get_local $3) + (get_local $6) ) - (get_local $6) ) - ) - (i32.store offset=4 - (get_local $7) - (i32.sub - (get_local $3) - (get_local $6) + (set_local $4 + (get_local $7) ) + (set_local $3 + (get_local $15) + ) + (set_local $5 + (get_local $10) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $7) - ) - (set_local $3 - (get_local $15) - ) - (set_local $5 - (get_local $10) - ) - (br $while-in$1) ) (if (i32.eq @@ -8286,49 +8322,51 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $3) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $3 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $3) ) - (br $label$break$L10 - (get_local $1) + (block + (set_local $2 + (get_local $0) + ) + (set_local $3 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $1) + ) ) ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $7 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $7 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 10) ) - (i32.const 10) - ) - (block - (set_local $4 - (get_local $3) + (block + (set_local $4 + (get_local $3) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $7) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $7) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -8482,62 +8520,64 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $___lockfile (get_local $1) ) - (i32.const -1) - ) - (call $___lockfile - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $___fflush_unlocked - (get_local $1) + (i32.or + (call $___fflush_unlocked + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) ) - ) - (if - (get_local $0) - (call $___unlockfile - (get_local $1) + (if + (get_local $0) + (call $___unlockfile + (get_local $1) + ) ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=56 - (get_local $1) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) ) - (br $while-out$2) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -8567,45 +8607,47 @@ (set_local $4 (get_local $3) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $0) + (loop $while-in$2 + (block $while-out$1 + (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) ) - ) - (if - (i32.eqz - (i32.and - (tee_local $4 - (tee_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (if + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) - ) - ) - (block - (set_local $2 - (get_local $0) ) - (set_local $1 - (i32.const 4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $1 + (i32.const 4) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -8627,34 +8669,36 @@ (set_local $1 (get_local $2) ) - (loop $while-out$3 $while-in$4 - (if - (i32.and - (i32.xor - (i32.and - (tee_local $2 - (i32.load - (get_local $1) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.and + (i32.xor + (i32.and + (tee_local $2 + (i32.load + (get_local $1) + ) ) + (i32.const -2139062144) ) (i32.const -2139062144) ) - (i32.const -2139062144) - ) - (i32.add - (get_local $2) - (i32.const -16843009) + (i32.add + (get_local $2) + (i32.const -16843009) + ) ) - ) - (br $while-out$3) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (br $while-out$3) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.shr_s @@ -8671,22 +8715,24 @@ (set_local $2 (get_local $1) ) - (loop $while-out$5 $while-in$6 - (if - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$6 + (block $while-out$5 + (if + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $2) + (i32.const 1) + ) ) ) + (set_local $2 + (get_local $1) + ) + (br $while-out$5) ) - (set_local $2 - (get_local $1) - ) - (br $while-out$5) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -9010,116 +9056,122 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eqz - (get_local $2) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -9192,66 +9244,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 5c70bf1c4..af4655d11 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -880,88 +880,90 @@ (set_local $i7 (get_local $i10) ) - (loop $while-out$23 $while-in$24 - (set_local $i10 - (i32.load - (i32.add - (get_local $i3) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $i10 + (i32.load + (i32.add + (get_local $i3) + (i32.const 16) + ) ) ) - ) - (if - (i32.eqz - (get_local $i10) - ) - (block - (set_local $i15 - (i32.load - (i32.add - (get_local $i3) - (i32.const 20) - ) - ) + (if + (i32.eqz + (get_local $i10) ) - (if - (i32.eqz - (get_local $i15) + (block + (set_local $i15 + (i32.load + (i32.add + (get_local $i3) + (i32.const 20) + ) + ) ) - (block - (set_local $i21 - (get_local $i5) + (if + (i32.eqz + (get_local $i15) ) - (set_local $i22 - (get_local $i7) + (block + (set_local $i21 + (get_local $i5) + ) + (set_local $i22 + (get_local $i7) + ) + (br $while-out$23) + ) + (set_local $i23 + (get_local $i15) ) - (br $while-out$23) - ) - (set_local $i23 - (get_local $i15) ) ) + (set_local $i23 + (get_local $i10) + ) ) - (set_local $i23 - (get_local $i10) - ) - ) - (set_local $i10 - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $i23) - (i32.const 4) + (set_local $i10 + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $i23) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i2) ) - (get_local $i2) ) - ) - (set_local $i15 - (i32.lt_u - (get_local $i10) - (get_local $i5) + (set_local $i15 + (i32.lt_u + (get_local $i10) + (get_local $i5) + ) ) - ) - (set_local $i5 - (if - (get_local $i15) - (get_local $i10) - (get_local $i5) + (set_local $i5 + (if + (get_local $i15) + (get_local $i10) + (get_local $i5) + ) ) - ) - (set_local $i3 - (get_local $i23) - ) - (set_local $i7 - (if - (get_local $i15) + (set_local $i3 (get_local $i23) - (get_local $i7) ) + (set_local $i7 + (if + (get_local $i15) + (get_local $i23) + (get_local $i7) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (set_local $i7 (i32.load @@ -1067,64 +1069,66 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $i14 - (i32.add - (get_local $i25) - (i32.const 20) - ) - ) - (set_local $i17 - (i32.load - (get_local $i14) - ) - ) - (if - (get_local $i17) - (block - (set_local $i25 - (get_local $i17) + (loop $while-in$28 + (block $while-out$27 + (set_local $i14 + (i32.add + (get_local $i25) + (i32.const 20) ) - (set_local $i26 + ) + (set_local $i17 + (i32.load (get_local $i14) ) - (br $while-in$28) - ) - ) - (set_local $i14 - (i32.add - (get_local $i25) - (i32.const 16) - ) - ) - (set_local $i17 - (i32.load - (get_local $i14) ) - ) - (if - (i32.eqz + (if (get_local $i17) + (block + (set_local $i25 + (get_local $i17) + ) + (set_local $i26 + (get_local $i14) + ) + (br $while-in$28) + ) ) - (block - (set_local $i27 + (set_local $i14 + (i32.add (get_local $i25) + (i32.const 16) ) - (set_local $i28 - (get_local $i26) + ) + (set_local $i17 + (i32.load + (get_local $i14) ) - (br $while-out$27) ) - (block - (set_local $i25 + (if + (i32.eqz (get_local $i17) ) - (set_local $i26 - (get_local $i14) + (block + (set_local $i27 + (get_local $i25) + ) + (set_local $i28 + (get_local $i26) + ) + (br $while-out$27) + ) + (block + (set_local $i25 + (get_local $i17) + ) + (set_local $i26 + (get_local $i14) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1829,156 +1833,158 @@ (set_local $i8 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $i16 - (i32.and - (i32.load - (i32.add - (get_local $i17) - (i32.const 4) + (loop $while-in$4 + (block $while-out$3 + (set_local $i16 + (i32.and + (i32.load + (i32.add + (get_local $i17) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - ) - (set_local $i9 - (i32.sub - (get_local $i16) - (get_local $i5) - ) - ) - (if - (i32.lt_u - (get_local $i9) - (get_local $i12) ) - (if - (i32.eq + (set_local $i9 + (i32.sub (get_local $i16) (get_local $i5) ) - (block - (set_local $i37 - (get_local $i9) - ) - (set_local $i38 - (get_local $i17) + ) + (if + (i32.lt_u + (get_local $i9) + (get_local $i12) + ) + (if + (i32.eq + (get_local $i16) + (get_local $i5) ) - (set_local $i39 - (get_local $i17) + (block + (set_local $i37 + (get_local $i9) + ) + (set_local $i38 + (get_local $i17) + ) + (set_local $i39 + (get_local $i17) + ) + (set_local $i36 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $i36 - (i32.const 90) + (block + (set_local $i40 + (get_local $i9) + ) + (set_local $i41 + (get_local $i17) + ) ) - (br $label$break$L123) ) (block (set_local $i40 - (get_local $i9) + (get_local $i12) ) (set_local $i41 - (get_local $i17) + (get_local $i8) ) ) ) - (block - (set_local $i40 - (get_local $i12) - ) - (set_local $i41 - (get_local $i8) - ) - ) - ) - (set_local $i9 - (i32.load - (i32.add - (get_local $i17) - (i32.const 20) - ) - ) - ) - (set_local $i17 - (i32.load - (i32.add + (set_local $i9 + (i32.load (i32.add (get_local $i17) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i7) - (i32.const 31) - ) - (i32.const 2) + (i32.const 20) ) ) ) - ) - (set_local $i16 - (if - (i32.or - (i32.eq - (get_local $i9) - (i32.const 0) - ) - (i32.eq - (get_local $i9) - (get_local $i17) + (set_local $i17 + (i32.load + (i32.add + (i32.add + (get_local $i17) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i7) + (i32.const 31) + ) + (i32.const 2) + ) ) ) - (get_local $i10) - (get_local $i9) ) - ) - (set_local $i9 - (i32.eq - (get_local $i17) - (i32.const 0) - ) - ) - (if - (get_local $i9) - (block - (set_local $i33 - (get_local $i40) - ) - (set_local $i34 - (get_local $i16) - ) - (set_local $i35 - (get_local $i41) - ) - (set_local $i36 - (i32.const 86) + (set_local $i16 + (if + (i32.or + (i32.eq + (get_local $i9) + (i32.const 0) + ) + (i32.eq + (get_local $i9) + (get_local $i17) + ) + ) + (get_local $i10) + (get_local $i9) ) - (br $while-out$3) ) - (block - (set_local $i12 - (get_local $i40) + (set_local $i9 + (i32.eq + (get_local $i17) + (i32.const 0) ) - (set_local $i10 - (get_local $i16) + ) + (if + (get_local $i9) + (block + (set_local $i33 + (get_local $i40) + ) + (set_local $i34 + (get_local $i16) + ) + (set_local $i35 + (get_local $i41) + ) + (set_local $i36 + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $i7 - (i32.shl - (get_local $i7) - (i32.xor - (i32.and - (get_local $i9) + (block + (set_local $i12 + (get_local $i40) + ) + (set_local $i10 + (get_local $i16) + ) + (set_local $i7 + (i32.shl + (get_local $i7) + (i32.xor + (i32.and + (get_local $i9) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $i8 - (get_local $i41) + (set_local $i8 + (get_local $i41) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -2179,104 +2185,106 @@ (get_local $i36) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $i36 - (i32.const 0) - ) - (set_local $i8 - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $i38) - (i32.const 4) + (loop $while-in$6 + (block $while-out$5 + (set_local $i36 + (i32.const 0) + ) + (set_local $i8 + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $i38) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i5) ) - (get_local $i5) - ) - ) - (set_local $i7 - (i32.lt_u - (get_local $i8) - (get_local $i37) - ) - ) - (set_local $i3 - (if - (get_local $i7) - (get_local $i8) - (get_local $i37) - ) - ) - (set_local $i8 - (if - (get_local $i7) - (get_local $i38) - (get_local $i39) ) - ) - (set_local $i7 - (i32.load - (i32.add - (get_local $i38) - (i32.const 16) + (set_local $i7 + (i32.lt_u + (get_local $i8) + (get_local $i37) ) ) - ) - (if - (get_local $i7) - (block - (set_local $i37 - (get_local $i3) - ) - (set_local $i38 + (set_local $i3 + (if (get_local $i7) - ) - (set_local $i39 (get_local $i8) + (get_local $i37) ) - (set_local $i36 - (i32.const 90) - ) - (br $while-in$6) ) - ) - (set_local $i38 - (i32.load - (i32.add + (set_local $i8 + (if + (get_local $i7) (get_local $i38) - (i32.const 20) + (get_local $i39) ) ) - ) - (if - (i32.eqz - (get_local $i38) + (set_local $i7 + (i32.load + (i32.add + (get_local $i38) + (i32.const 16) + ) + ) ) - (block - (set_local $i43 - (get_local $i3) + (if + (get_local $i7) + (block + (set_local $i37 + (get_local $i3) + ) + (set_local $i38 + (get_local $i7) + ) + (set_local $i39 + (get_local $i8) + ) + (set_local $i36 + (i32.const 90) + ) + (br $while-in$6) ) - (set_local $i44 - (get_local $i8) + ) + (set_local $i38 + (i32.load + (i32.add + (get_local $i38) + (i32.const 20) + ) ) - (br $while-out$5) ) - (block - (set_local $i37 - (get_local $i3) + (if + (i32.eqz + (get_local $i38) ) - (set_local $i39 - (get_local $i8) + (block + (set_local $i43 + (get_local $i3) + ) + (set_local $i44 + (get_local $i8) + ) + (br $while-out$5) ) - (set_local $i36 - (i32.const 90) + (block + (set_local $i37 + (get_local $i3) + ) + (set_local $i39 + (get_local $i8) + ) + (set_local $i36 + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2401,66 +2409,68 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (set_local $i2 - (i32.add - (get_local $i46) - (i32.const 20) - ) - ) - (set_local $i14 - (i32.load - (get_local $i2) - ) - ) - (if - (get_local $i14) - (block - (set_local $i46 - (get_local $i14) + (loop $while-in$10 + (block $while-out$9 + (set_local $i2 + (i32.add + (get_local $i46) + (i32.const 20) ) - (set_local $i47 + ) + (set_local $i14 + (i32.load (get_local $i2) ) - (br $while-in$10) ) - ) - (set_local $i2 - (i32.add - (get_local $i46) - (i32.const 16) - ) - ) - (set_local $i14 - (i32.load - (get_local $i2) - ) - ) - (if - (i32.eqz + (if (get_local $i14) + (block + (set_local $i46 + (get_local $i14) + ) + (set_local $i47 + (get_local $i2) + ) + (br $while-in$10) + ) ) - (block - (set_local $i48 + (set_local $i2 + (i32.add (get_local $i46) + (i32.const 16) ) - (set_local $i49 - (get_local $i47) - ) - (br $while-out$9) ) - (block - (set_local $i46 - (get_local $i14) - ) - (set_local $i47 + (set_local $i14 + (i32.load (get_local $i2) ) ) - ) - (br $while-in$10) - ) - (if + (if + (i32.eqz + (get_local $i14) + ) + (block + (set_local $i48 + (get_local $i46) + ) + (set_local $i49 + (get_local $i47) + ) + (br $while-out$9) + ) + (block + (set_local $i46 + (get_local $i14) + ) + (set_local $i47 + (get_local $i2) + ) + ) + ) + (br $while-in$10) + ) + ) + (if (i32.lt_u (get_local $i49) (get_local $i15) @@ -3109,79 +3119,81 @@ (get_local $i3) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i7) - (i32.const 4) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i7) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i43) - ) - (block - (set_local $i53 - (get_local $i7) + (get_local $i43) ) - (set_local $i36 - (i32.const 148) + (block + (set_local $i53 + (get_local $i7) + ) + (set_local $i36 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $i3 - (i32.add + (set_local $i3 (i32.add - (get_local $i7) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i4) - (i32.const 31) + (i32.add + (get_local $i7) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i4) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i2 - (i32.load - (get_local $i3) - ) - ) - (if - (i32.eqz - (get_local $i2) - ) - (block - (set_local $i54 + (set_local $i2 + (i32.load (get_local $i3) ) - (set_local $i55 - (get_local $i7) - ) - (set_local $i36 - (i32.const 145) - ) - (br $while-out$17) ) - (block - (set_local $i4 - (i32.shl - (get_local $i4) - (i32.const 1) + (if + (i32.eqz + (get_local $i2) + ) + (block + (set_local $i54 + (get_local $i3) ) + (set_local $i55 + (get_local $i7) + ) + (set_local $i36 + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $i7 - (get_local $i2) + (block + (set_local $i4 + (i32.shl + (get_local $i4) + (i32.const 1) + ) + ) + (set_local $i7 + (get_local $i2) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3736,67 +3748,69 @@ (set_local $i50 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (set_local $i51 - (i32.load - (get_local $i50) + (loop $while-in$38 + (block $while-out$37 + (set_local $i51 + (i32.load + (get_local $i50) + ) ) - ) - (if (if - (i32.le_u - (get_local $i51) - (get_local $i52) - ) - (block - (set_local $i45 - (i32.add - (get_local $i50) - (i32.const 4) - ) + (if + (i32.le_u + (get_local $i51) + (get_local $i52) ) - (i32.gt_u - (i32.add - (get_local $i51) - (i32.load - (get_local $i45) + (block + (set_local $i45 + (i32.add + (get_local $i50) + (i32.const 4) ) ) - (get_local $i52) + (i32.gt_u + (i32.add + (get_local $i51) + (i32.load + (get_local $i45) + ) + ) + (get_local $i52) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $i56 - (get_local $i50) + (block + (set_local $i56 + (get_local $i50) + ) + (set_local $i57 + (get_local $i45) + ) + (br $while-out$37) ) - (set_local $i57 - (get_local $i45) + ) + (set_local $i50 + (i32.load + (i32.add + (get_local $i50) + (i32.const 8) + ) ) - (br $while-out$37) ) - ) - (set_local $i50 - (i32.load - (i32.add + (if + (i32.eqz (get_local $i50) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $i50) - ) - (block - (set_local $i36 - (i32.const 173) + (block + (set_local $i36 + (i32.const 173) + ) + (br $label$break$L259) ) - (br $label$break$L259) ) + (br $while-in$38) ) - (br $while-in$38) ) (set_local $i50 (i32.and @@ -4269,64 +4283,66 @@ (set_local $i63 (i32.const 624) ) - (loop $do-out$48 $do-in$49 - (set_local $i43 - (i32.load - (get_local $i63) - ) - ) - (set_local $i61 - (i32.add - (get_local $i63) - (i32.const 4) - ) - ) - (set_local $i44 - (i32.load - (get_local $i61) + (loop $do-in$49 + (block $do-out$48 + (set_local $i43 + (i32.load + (get_local $i63) + ) ) - ) - (if - (i32.eq - (get_local $i58) + (set_local $i61 (i32.add - (get_local $i43) - (get_local $i44) + (get_local $i63) + (i32.const 4) ) ) - (block - (set_local $i64 - (get_local $i43) - ) - (set_local $i65 + (set_local $i44 + (i32.load (get_local $i61) ) - (set_local $i66 - (get_local $i44) + ) + (if + (i32.eq + (get_local $i58) + (i32.add + (get_local $i43) + (get_local $i44) + ) ) - (set_local $i67 - (get_local $i63) + (block + (set_local $i64 + (get_local $i43) + ) + (set_local $i65 + (get_local $i61) + ) + (set_local $i66 + (get_local $i44) + ) + (set_local $i67 + (get_local $i63) + ) + (set_local $i36 + (i32.const 203) + ) + (br $do-out$48) ) - (set_local $i36 - (i32.const 203) + ) + (set_local $i63 + (i32.load + (i32.add + (get_local $i63) + (i32.const 8) + ) ) - (br $do-out$48) ) - ) - (set_local $i63 - (i32.load - (i32.add + (br_if $do-in$49 + (i32.ne (get_local $i63) - (i32.const 8) + (i32.const 0) ) ) ) - (br_if $do-in$49 - (i32.ne - (get_local $i63) - (i32.const 0) - ) - ) ) (if (if @@ -4480,47 +4496,49 @@ (set_local $i63 (i32.const 624) ) - (loop $while-out$50 $while-in$51 - (if - (i32.eq - (i32.load - (get_local $i63) + (loop $while-in$51 + (block $while-out$50 + (if + (i32.eq + (i32.load + (get_local $i63) + ) + (get_local $i61) ) - (get_local $i61) - ) - (block - (set_local $i69 - (get_local $i63) - ) - (set_local $i70 - (get_local $i63) + (block + (set_local $i69 + (get_local $i63) + ) + (set_local $i70 + (get_local $i63) + ) + (set_local $i36 + (i32.const 211) + ) + (br $while-out$50) ) - (set_local $i36 - (i32.const 211) + ) + (set_local $i63 + (i32.load + (i32.add + (get_local $i63) + (i32.const 8) + ) ) - (br $while-out$50) ) - ) - (set_local $i63 - (i32.load - (i32.add + (if + (i32.eqz (get_local $i63) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $i63) - ) - (block - (set_local $i71 - (i32.const 624) + (block + (set_local $i71 + (i32.const 624) + ) + (br $while-out$50) ) - (br $while-out$50) ) + (br $while-in$51) ) - (br $while-in$51) ) (if (i32.eq @@ -4806,64 +4824,66 @@ ) ) ) - (loop $while-out$61 $while-in$62 - (set_local $i5 - (i32.add - (get_local $i73) - (i32.const 20) - ) - ) - (set_local $i52 - (i32.load - (get_local $i5) - ) - ) - (if - (get_local $i52) - (block - (set_local $i73 - (get_local $i52) + (loop $while-in$62 + (block $while-out$61 + (set_local $i5 + (i32.add + (get_local $i73) + (i32.const 20) ) - (set_local $i74 + ) + (set_local $i52 + (i32.load (get_local $i5) ) - (br $while-in$62) ) - ) - (set_local $i5 - (i32.add - (get_local $i73) - (i32.const 16) - ) - ) - (set_local $i52 - (i32.load - (get_local $i5) - ) - ) - (if - (i32.eqz + (if (get_local $i52) + (block + (set_local $i73 + (get_local $i52) + ) + (set_local $i74 + (get_local $i5) + ) + (br $while-in$62) + ) ) - (block - (set_local $i75 + (set_local $i5 + (i32.add (get_local $i73) + (i32.const 16) ) - (set_local $i76 - (get_local $i74) + ) + (set_local $i52 + (i32.load + (get_local $i5) ) - (br $while-out$61) ) - (block - (set_local $i73 + (if + (i32.eqz (get_local $i52) ) - (set_local $i74 - (get_local $i5) + (block + (set_local $i75 + (get_local $i73) + ) + (set_local $i76 + (get_local $i74) + ) + (br $while-out$61) + ) + (block + (set_local $i73 + (get_local $i52) + ) + (set_local $i74 + (get_local $i5) + ) ) ) + (br $while-in$62) ) - (br $while-in$62) ) (if (i32.lt_u @@ -5692,79 +5712,81 @@ (get_local $i5) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i62) - (i32.const 4) + (loop $while-in$72 + (block $while-out$71 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i62) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i79) - ) - (block - (set_local $i83 - (get_local $i62) + (get_local $i79) ) - (set_local $i36 - (i32.const 281) + (block + (set_local $i83 + (get_local $i62) + ) + (set_local $i36 + (i32.const 281) + ) + (br $while-out$71) ) - (br $while-out$71) ) - ) - (set_local $i5 - (i32.add + (set_local $i5 (i32.add - (get_local $i62) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i50) - (i32.const 31) + (i32.add + (get_local $i62) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i50) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i57 - (i32.load - (get_local $i5) - ) - ) - (if - (i32.eqz - (get_local $i57) - ) - (block - (set_local $i84 + (set_local $i57 + (i32.load (get_local $i5) ) - (set_local $i85 - (get_local $i62) - ) - (set_local $i36 - (i32.const 278) - ) - (br $while-out$71) ) - (block - (set_local $i50 - (i32.shl - (get_local $i50) - (i32.const 1) + (if + (i32.eqz + (get_local $i57) + ) + (block + (set_local $i84 + (get_local $i5) ) + (set_local $i85 + (get_local $i62) + ) + (set_local $i36 + (i32.const 278) + ) + (br $while-out$71) ) - (set_local $i62 - (get_local $i57) + (block + (set_local $i50 + (i32.shl + (get_local $i50) + (i32.const 1) + ) + ) + (set_local $i62 + (get_local $i57) + ) ) ) + (br $while-in$72) ) - (br $while-in$72) ) (if (i32.eq @@ -5927,53 +5949,55 @@ ) ) ) - (loop $while-out$73 $while-in$74 - (set_local $i63 - (i32.load - (get_local $i71) + (loop $while-in$74 + (block $while-out$73 + (set_local $i63 + (i32.load + (get_local $i71) + ) ) - ) - (if (if - (i32.le_u - (get_local $i63) - (get_local $i60) - ) - (block - (set_local $i53 - (i32.add - (get_local $i63) - (i32.load - (i32.add - (get_local $i71) - (i32.const 4) + (if + (i32.le_u + (get_local $i63) + (get_local $i60) + ) + (block + (set_local $i53 + (i32.add + (get_local $i63) + (i32.load + (i32.add + (get_local $i71) + (i32.const 4) + ) ) ) ) + (i32.gt_u + (get_local $i53) + (get_local $i60) + ) ) - (i32.gt_u + (i32.const 0) + ) + (block + (set_local $i86 (get_local $i53) - (get_local $i60) ) + (br $while-out$73) ) - (i32.const 0) - ) - (block - (set_local $i86 - (get_local $i53) - ) - (br $while-out$73) ) - ) - (set_local $i71 - (i32.load - (i32.add - (get_local $i71) - (i32.const 8) + (set_local $i71 + (i32.load + (i32.add + (get_local $i71) + (i32.const 8) + ) ) ) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $i44 (i32.add @@ -6170,24 +6194,26 @@ (i32.const 24) ) ) - (loop $do-out$75 $do-in$76 - (set_local $i63 - (i32.add - (get_local $i63) - (i32.const 4) - ) - ) - (i32.store - (get_local $i63) - (i32.const 7) - ) - (br_if $do-in$76 - (i32.lt_u + (loop $do-in$76 + (block $do-out$75 + (set_local $i63 (i32.add (get_local $i63) (i32.const 4) ) - (get_local $i86) + ) + (i32.store + (get_local $i63) + (i32.const 7) + ) + (br_if $do-in$76 + (i32.lt_u + (i32.add + (get_local $i63) + (i32.const 4) + ) + (get_local $i86) + ) ) ) ) @@ -6558,79 +6584,81 @@ (get_local $i43) ) ) - (loop $while-out$77 $while-in$78 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i62) - (i32.const 4) + (loop $while-in$78 + (block $while-out$77 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i62) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i63) ) - (get_local $i63) - ) - (block - (set_local $i90 - (get_local $i62) - ) - (set_local $i36 - (i32.const 307) + (block + (set_local $i90 + (get_local $i62) + ) + (set_local $i36 + (i32.const 307) + ) + (br $while-out$77) ) - (br $while-out$77) ) - ) - (set_local $i43 - (i32.add + (set_local $i43 (i32.add - (get_local $i62) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i5) - (i32.const 31) + (i32.add + (get_local $i62) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i5) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i57 - (i32.load - (get_local $i43) - ) - ) - (if - (i32.eqz - (get_local $i57) - ) - (block - (set_local $i91 + (set_local $i57 + (i32.load (get_local $i43) ) - (set_local $i92 - (get_local $i62) - ) - (set_local $i36 - (i32.const 304) - ) - (br $while-out$77) ) - (block - (set_local $i5 - (i32.shl - (get_local $i5) - (i32.const 1) + (if + (i32.eqz + (get_local $i57) + ) + (block + (set_local $i91 + (get_local $i43) + ) + (set_local $i92 + (get_local $i62) + ) + (set_local $i36 + (i32.const 304) ) + (br $while-out$77) ) - (set_local $i62 - (get_local $i57) + (block + (set_local $i5 + (i32.shl + (get_local $i5) + (i32.const 1) + ) + ) + (set_local $i62 + (get_local $i57) + ) ) ) + (br $while-in$78) ) - (br $while-in$78) ) (if (i32.eq @@ -6797,43 +6825,45 @@ (set_local $i5 (i32.const 0) ) - (loop $do-out$46 $do-in$47 - (set_local $i62 - (i32.add - (i32.const 216) - (i32.shl + (loop $do-in$47 + (block $do-out$46 + (set_local $i62 + (i32.add + (i32.const 216) (i32.shl - (get_local $i5) - (i32.const 1) + (i32.shl + (get_local $i5) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $i62) + (i32.const 12) + ) (get_local $i62) - (i32.const 12) ) - (get_local $i62) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $i62) + (i32.const 8) + ) (get_local $i62) - (i32.const 8) ) - (get_local $i62) - ) - (set_local $i5 - (i32.add - (get_local $i5) - (i32.const 1) + (set_local $i5 + (i32.add + (get_local $i5) + (i32.const 1) + ) ) - ) - (br_if $do-in$47 - (i32.ne - (get_local $i5) - (i32.const 32) + (br_if $do-in$47 + (i32.ne + (get_local $i5) + (i32.const 32) + ) ) ) ) @@ -7433,64 +7463,66 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $i11 - (i32.add - (get_local $i19) - (i32.const 20) - ) - ) - (set_local $i16 - (i32.load - (get_local $i11) - ) - ) - (if - (get_local $i16) - (block - (set_local $i19 - (get_local $i16) + (loop $while-in$5 + (block $while-out$4 + (set_local $i11 + (i32.add + (get_local $i19) + (i32.const 20) ) - (set_local $i20 + ) + (set_local $i16 + (i32.load (get_local $i11) ) - (br $while-in$5) - ) - ) - (set_local $i11 - (i32.add - (get_local $i19) - (i32.const 16) - ) - ) - (set_local $i16 - (i32.load - (get_local $i11) ) - ) - (if - (i32.eqz + (if (get_local $i16) + (block + (set_local $i19 + (get_local $i16) + ) + (set_local $i20 + (get_local $i11) + ) + (br $while-in$5) + ) ) - (block - (set_local $i21 + (set_local $i11 + (i32.add (get_local $i19) + (i32.const 16) ) - (set_local $i22 - (get_local $i20) + ) + (set_local $i16 + (i32.load + (get_local $i11) ) - (br $while-out$4) ) - (block - (set_local $i19 + (if + (i32.eqz (get_local $i16) ) - (set_local $i20 - (get_local $i11) + (block + (set_local $i21 + (get_local $i19) + ) + (set_local $i22 + (get_local $i20) + ) + (br $while-out$4) + ) + (block + (set_local $i19 + (get_local $i16) + ) + (set_local $i20 + (get_local $i11) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -8051,64 +8083,66 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (set_local $i19 - (i32.add - (get_local $i24) - (i32.const 20) - ) - ) - (set_local $i15 - (i32.load - (get_local $i19) - ) - ) - (if - (get_local $i15) - (block - (set_local $i24 - (get_local $i15) + (loop $while-in$13 + (block $while-out$12 + (set_local $i19 + (i32.add + (get_local $i24) + (i32.const 20) ) - (set_local $i25 + ) + (set_local $i15 + (i32.load (get_local $i19) ) - (br $while-in$13) - ) - ) - (set_local $i19 - (i32.add - (get_local $i24) - (i32.const 16) - ) - ) - (set_local $i15 - (i32.load - (get_local $i19) ) - ) - (if - (i32.eqz + (if (get_local $i15) + (block + (set_local $i24 + (get_local $i15) + ) + (set_local $i25 + (get_local $i19) + ) + (br $while-in$13) + ) ) - (block - (set_local $i26 + (set_local $i19 + (i32.add (get_local $i24) + (i32.const 16) ) - (set_local $i27 - (get_local $i25) + ) + (set_local $i15 + (i32.load + (get_local $i19) ) - (br $while-out$12) ) - (block - (set_local $i24 + (if + (i32.eqz (get_local $i15) ) - (set_local $i25 - (get_local $i19) + (block + (set_local $i26 + (get_local $i24) + ) + (set_local $i27 + (get_local $i25) + ) + (br $while-out$12) + ) + (block + (set_local $i24 + (get_local $i15) + ) + (set_local $i25 + (get_local $i19) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -8895,79 +8929,81 @@ (get_local $i5) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i2) - (i32.const 4) - ) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i29) - ) - (block - (set_local $i33 - (get_local $i2) + (get_local $i29) ) - (set_local $i34 - (i32.const 130) + (block + (set_local $i33 + (get_local $i2) + ) + (set_local $i34 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $i28 - (i32.add + (set_local $i28 (i32.add - (get_local $i2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i31) - (i32.const 31) + (i32.add + (get_local $i2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i31) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i13 - (i32.load - (get_local $i28) - ) - ) - (if - (i32.eqz - (get_local $i13) - ) - (block - (set_local $i35 + (set_local $i13 + (i32.load (get_local $i28) ) - (set_local $i36 - (get_local $i2) - ) - (set_local $i34 - (i32.const 127) - ) - (br $while-out$18) ) - (block - (set_local $i31 - (i32.shl - (get_local $i31) - (i32.const 1) + (if + (i32.eqz + (get_local $i13) + ) + (block + (set_local $i35 + (get_local $i28) ) + (set_local $i36 + (get_local $i2) + ) + (set_local $i34 + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $i2 - (get_local $i13) + (block + (set_local $i31 + (i32.shl + (get_local $i31) + (i32.const 1) + ) + ) + (set_local $i2 + (get_local $i13) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -9142,25 +9178,27 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $i12 - (i32.load - (get_local $i37) - ) - ) - (if - (i32.eqz - (get_local $i12) + (loop $while-in$21 + (block $while-out$20 + (set_local $i12 + (i32.load + (get_local $i37) + ) ) - (br $while-out$20) - (set_local $i37 - (i32.add + (if + (i32.eqz (get_local $i12) - (i32.const 8) + ) + (br $while-out$20) + (set_local $i37 + (i32.add + (get_local $i12) + (i32.const 8) + ) ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -9293,247 +9331,249 @@ (get_local $i3) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.load - (i32.const 8) - ) - ) - (block - (i32.store - (get_local $i5) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz (i32.load - (get_local $i2) + (i32.const 8) ) ) - (i32.store - (i32.add + (block + (i32.store (get_local $i5) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - (get_local $i12) - ) - (i32.store - (i32.add - (get_local $i5) - (i32.const 8) + (i32.store + (i32.add + (get_local $i5) + (i32.const 4) + ) + (get_local $i12) ) - (get_local $i7) - ) - (set_local $i14 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (i32.store + (i32.add (get_local $i5) + (i32.const 8) ) + (get_local $i7) ) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 4) - (get_local $i1) - ) - (i32.store - (get_local $i6) - (i32.load - (get_local $i2) + (set_local $i14 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $i5) + ) + ) ) ) - (i32.store - (i32.add - (get_local $i6) + (block + (call_import $_pthread_cleanup_push (i32.const 4) + (get_local $i1) ) - (get_local $i12) - ) - (i32.store - (i32.add + (i32.store (get_local $i6) - (i32.const 8) + (i32.load + (get_local $i2) + ) ) - (get_local $i7) - ) - (set_local $i11 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (i32.store + (i32.add (get_local $i6) + (i32.const 4) ) + (get_local $i12) ) - ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (set_local $i14 - (get_local $i11) - ) - ) - ) - (if - (i32.eq - (get_local $i13) - (get_local $i14) - ) - (block - (set_local $i15 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $i14) - (i32.const 0) - ) - (block - (set_local $i16 - (get_local $i12) - ) - (set_local $i17 - (get_local $i7) - ) - (set_local $i15 - (i32.const 8) - ) - (br $while-out$0) - ) - ) - (set_local $i11 - (i32.sub - (get_local $i13) - (get_local $i14) - ) - ) - (set_local $i18 - (i32.load - (i32.add - (get_local $i12) - (i32.const 4) - ) - ) - ) - (if - (i32.le_u - (get_local $i14) - (get_local $i18) - ) - (if - (i32.eq - (get_local $i7) - (i32.const 2) - ) - (block (i32.store - (get_local $i8) (i32.add - (i32.load - (get_local $i8) - ) - (get_local $i14) + (get_local $i6) + (i32.const 8) ) + (get_local $i7) ) - (set_local $i19 - (get_local $i18) - ) - (set_local $i20 - (get_local $i14) + (set_local $i11 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $i6) + ) + ) ) - (set_local $i21 - (get_local $i12) + (call_import $_pthread_cleanup_pop + (i32.const 0) ) - (set_local $i22 - (i32.const 2) + (set_local $i14 + (get_local $i11) ) ) + ) + (if + (i32.eq + (get_local $i13) + (get_local $i14) + ) (block - (set_local $i19 - (get_local $i18) - ) - (set_local $i20 - (get_local $i14) + (set_local $i15 + (i32.const 6) ) - (set_local $i21 + (br $while-out$0) + ) + ) + (if + (i32.lt_s + (get_local $i14) + (i32.const 0) + ) + (block + (set_local $i16 (get_local $i12) ) - (set_local $i22 + (set_local $i17 (get_local $i7) ) - ) - ) - (block - (set_local $i23 - (i32.load - (get_local $i9) + (set_local $i15 + (i32.const 8) ) + (br $while-out$0) ) - (i32.store - (get_local $i8) - (get_local $i23) + ) + (set_local $i11 + (i32.sub + (get_local $i13) + (get_local $i14) ) - (i32.store - (get_local $i10) - (get_local $i23) + ) + (set_local $i18 + (i32.load + (i32.add + (get_local $i12) + (i32.const 4) + ) ) - (set_local $i19 - (i32.load - (i32.add + ) + (if + (i32.le_u + (get_local $i14) + (get_local $i18) + ) + (if + (i32.eq + (get_local $i7) + (i32.const 2) + ) + (block + (i32.store + (get_local $i8) + (i32.add + (i32.load + (get_local $i8) + ) + (get_local $i14) + ) + ) + (set_local $i19 + (get_local $i18) + ) + (set_local $i20 + (get_local $i14) + ) + (set_local $i21 (get_local $i12) - (i32.const 12) + ) + (set_local $i22 + (i32.const 2) ) ) - ) - (set_local $i20 - (i32.sub - (get_local $i14) - (get_local $i18) + (block + (set_local $i19 + (get_local $i18) + ) + (set_local $i20 + (get_local $i14) + ) + (set_local $i21 + (get_local $i12) + ) + (set_local $i22 + (get_local $i7) + ) ) ) - (set_local $i21 - (i32.add - (get_local $i12) - (i32.const 8) + (block + (set_local $i23 + (i32.load + (get_local $i9) + ) + ) + (i32.store + (get_local $i8) + (get_local $i23) + ) + (i32.store + (get_local $i10) + (get_local $i23) + ) + (set_local $i19 + (i32.load + (i32.add + (get_local $i12) + (i32.const 12) + ) + ) + ) + (set_local $i20 + (i32.sub + (get_local $i14) + (get_local $i18) + ) + ) + (set_local $i21 + (i32.add + (get_local $i12) + (i32.const 8) + ) + ) + (set_local $i22 + (i32.add + (get_local $i7) + (i32.const -1) + ) ) ) - (set_local $i22 - (i32.add - (get_local $i7) - (i32.const -1) + ) + (i32.store + (get_local $i21) + (i32.add + (i32.load + (get_local $i21) ) + (get_local $i20) ) ) - ) - (i32.store - (get_local $i21) - (i32.add - (i32.load + (i32.store + (i32.add (get_local $i21) + (i32.const 4) + ) + (i32.sub + (get_local $i19) + (get_local $i20) ) - (get_local $i20) ) - ) - (i32.store - (i32.add + (set_local $i12 (get_local $i21) - (i32.const 4) ) - (i32.sub - (get_local $i19) - (get_local $i20) + (set_local $i7 + (get_local $i22) ) + (set_local $i13 + (get_local $i11) + ) + (br $while-in$1) ) - (set_local $i12 - (get_local $i21) - ) - (set_local $i7 - (get_local $i22) - ) - (set_local $i13 - (get_local $i11) - ) - (br $while-in$1) ) (if (i32.eq @@ -9761,54 +9801,56 @@ (set_local $i4 (get_local $i2) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $i4) - ) - (block - (set_local $i10 - (get_local $i2) - ) - (set_local $i11 - (get_local $i1) - ) - (set_local $i12 - (get_local $i9) - ) - (set_local $i13 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $i4) ) - (br $label$break$L10) - ) - ) - (set_local $i14 - (i32.add - (get_local $i4) - (i32.const -1) - ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add + (block + (set_local $i10 + (get_local $i2) + ) + (set_local $i11 (get_local $i1) - (get_local $i14) ) + (set_local $i12 + (get_local $i9) + ) + (set_local $i13 + (i32.const 0) + ) + (br $label$break$L10) ) - (i32.const 10) ) - (block - (set_local $i15 + (set_local $i14 + (i32.add (get_local $i4) + (i32.const -1) ) - (br $while-out$2) ) - (set_local $i4 - (get_local $i14) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $i1) + (get_local $i14) + ) + ) + (i32.const 10) + ) + (block + (set_local $i15 + (get_local $i4) + ) + (br $while-out$2) + ) + (set_local $i4 + (get_local $i14) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -10003,82 +10045,84 @@ (set_local $i4 (get_local $i5) ) - (loop $while-out$2 $while-in$3 - (if - (i32.gt_s - (i32.load - (i32.add + (loop $while-in$3 + (block $while-out$2 + (if + (i32.gt_s + (i32.load + (i32.add + (get_local $i3) + (i32.const 76) + ) + ) + (i32.const -1) + ) + (set_local $i7 + (call $___lockfile (get_local $i3) - (i32.const 76) ) ) - (i32.const -1) - ) - (set_local $i7 - (call $___lockfile - (get_local $i3) + (set_local $i7 + (i32.const 0) ) ) - (set_local $i7 - (i32.const 0) - ) - ) - (if - (i32.gt_u - (i32.load - (i32.add - (get_local $i3) - (i32.const 20) + (if + (i32.gt_u + (i32.load + (i32.add + (get_local $i3) + (i32.const 20) + ) ) - ) - (i32.load - (i32.add - (get_local $i3) - (i32.const 28) + (i32.load + (i32.add + (get_local $i3) + (i32.const 28) + ) ) ) - ) - (set_local $i8 - (i32.or - (call $___fflush_unlocked - (get_local $i3) + (set_local $i8 + (i32.or + (call $___fflush_unlocked + (get_local $i3) + ) + (get_local $i4) ) + ) + (set_local $i8 (get_local $i4) ) ) - (set_local $i8 - (get_local $i4) - ) - ) - (if - (get_local $i7) - (call $___unlockfile - (get_local $i3) - ) - ) - (set_local $i3 - (i32.load - (i32.add + (if + (get_local $i7) + (call $___unlockfile (get_local $i3) - (i32.const 56) ) ) - ) - (if - (i32.eqz - (get_local $i3) + (set_local $i3 + (i32.load + (i32.add + (get_local $i3) + (i32.const 56) + ) + ) ) - (block - (set_local $i6 + (if + (i32.eqz + (get_local $i3) + ) + (block + (set_local $i6 + (get_local $i8) + ) + (br $while-out$2) + ) + (set_local $i4 (get_local $i8) ) - (br $while-out$2) - ) - (set_local $i4 - (get_local $i8) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -10132,50 +10176,52 @@ (set_local $i6 (get_local $i2) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $i5) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (i32.load8_s + (get_local $i5) + ) + ) + (block + (set_local $i7 + (get_local $i6) + ) + (br $label$break$L1) ) ) - (block - (set_local $i7 - (get_local $i6) + (set_local $i8 + (i32.add + (get_local $i5) + (i32.const 1) ) - (br $label$break$L1) ) - ) - (set_local $i8 - (i32.add - (get_local $i5) - (i32.const 1) + (set_local $i6 + (get_local $i8) ) - ) - (set_local $i6 - (get_local $i8) - ) - (if - (i32.eqz - (i32.and - (get_local $i6) - (i32.const 3) + (if + (i32.eqz + (i32.and + (get_local $i6) + (i32.const 3) + ) ) - ) - (block - (set_local $i3 - (get_local $i8) + (block + (set_local $i3 + (get_local $i8) + ) + (set_local $i4 + (i32.const 4) + ) + (br $while-out$1) ) - (set_local $i4 - (i32.const 4) + (set_local $i5 + (get_local $i8) ) - (br $while-out$1) - ) - (set_local $i5 - (get_local $i8) ) + (br $while-in$2) ) - (br $while-in$2) ) ) ) @@ -10189,45 +10235,47 @@ (set_local $i4 (get_local $i3) ) - (loop $while-out$3 $while-in$4 - (set_local $i3 - (i32.load - (get_local $i4) + (loop $while-in$4 + (block $while-out$3 + (set_local $i3 + (i32.load + (get_local $i4) + ) ) - ) - (if - (i32.eqz - (i32.and - (i32.xor - (i32.and - (get_local $i3) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (get_local $i3) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (i32.add + (get_local $i3) + (i32.const -16843009) + ) ) + ) + (set_local $i4 (i32.add - (get_local $i3) - (i32.const -16843009) + (get_local $i4) + (i32.const 4) ) ) - ) - (set_local $i4 - (i32.add - (get_local $i4) - (i32.const 4) - ) - ) - (block - (set_local $i9 - (get_local $i3) - ) - (set_local $i10 - (get_local $i4) + (block + (set_local $i9 + (get_local $i3) + ) + (set_local $i10 + (get_local $i4) + ) + (br $while-out$3) ) - (br $while-out$3) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.eqz @@ -10249,30 +10297,32 @@ (set_local $i9 (get_local $i10) ) - (loop $while-out$5 $while-in$6 - (set_local $i10 - (i32.add - (get_local $i9) - (i32.const 1) - ) - ) - (if - (i32.eqz - (i32.load8_s - (get_local $i10) + (loop $while-in$6 + (block $while-out$5 + (set_local $i10 + (i32.add + (get_local $i9) + (i32.const 1) ) ) - (block - (set_local $i11 + (if + (i32.eqz + (i32.load8_s + (get_local $i10) + ) + ) + (block + (set_local $i11 + (get_local $i10) + ) + (br $while-out$5) + ) + (set_local $i9 (get_local $i10) ) - (br $while-out$5) - ) - (set_local $i9 - (get_local $i10) ) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -10644,129 +10694,135 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $i1) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if (i32.eqz - (get_local $i3) - ) - (return - (get_local $i4) + (i32.and + (get_local $i1) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (block + (if + (i32.eqz + (get_local $i3) + ) + (return + (get_local $i4) + ) ) - ) - (set_local $i1 - (i32.add + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $i3) - (i32.const 4) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $i1) - (i32.load - (get_local $i2) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $i3) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $i1 - (i32.add + (block + (i32.store (get_local $i1) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 4) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 4) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $i3) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $i3) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $i4) @@ -10846,81 +10902,87 @@ (get_local $i5) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i5) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i5) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $i1) - (get_local $i2) - ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (get_local $i2) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i7) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i7) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $i1) - (get_local $i6) - ) - (set_local $i1 - (i32.add + (block + (i32.store (get_local $i1) - (i32.const 4) + (get_local $i6) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i4) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i4) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $i1) - (get_local $i2) - ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (get_local $i2) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 69db3001b..648738c11 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -881,88 +881,90 @@ (set_local $i7 (get_local $i10) ) - (loop $while-out$23 $while-in$24 - (set_local $i10 - (i32.load - (i32.add - (get_local $i3) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $i10 + (i32.load + (i32.add + (get_local $i3) + (i32.const 16) + ) ) ) - ) - (if - (i32.eqz - (get_local $i10) - ) - (block - (set_local $i15 - (i32.load - (i32.add - (get_local $i3) - (i32.const 20) - ) - ) + (if + (i32.eqz + (get_local $i10) ) - (if - (i32.eqz - (get_local $i15) + (block + (set_local $i15 + (i32.load + (i32.add + (get_local $i3) + (i32.const 20) + ) + ) ) - (block - (set_local $i21 - (get_local $i5) + (if + (i32.eqz + (get_local $i15) ) - (set_local $i22 - (get_local $i7) + (block + (set_local $i21 + (get_local $i5) + ) + (set_local $i22 + (get_local $i7) + ) + (br $while-out$23) + ) + (set_local $i23 + (get_local $i15) ) - (br $while-out$23) - ) - (set_local $i23 - (get_local $i15) ) ) + (set_local $i23 + (get_local $i10) + ) ) - (set_local $i23 - (get_local $i10) - ) - ) - (set_local $i10 - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $i23) - (i32.const 4) + (set_local $i10 + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $i23) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i2) ) - (get_local $i2) ) - ) - (set_local $i15 - (i32.lt_u - (get_local $i10) - (get_local $i5) + (set_local $i15 + (i32.lt_u + (get_local $i10) + (get_local $i5) + ) ) - ) - (set_local $i5 - (if - (get_local $i15) - (get_local $i10) - (get_local $i5) + (set_local $i5 + (if + (get_local $i15) + (get_local $i10) + (get_local $i5) + ) ) - ) - (set_local $i3 - (get_local $i23) - ) - (set_local $i7 - (if - (get_local $i15) + (set_local $i3 (get_local $i23) - (get_local $i7) ) + (set_local $i7 + (if + (get_local $i15) + (get_local $i23) + (get_local $i7) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (set_local $i7 (i32.load @@ -1068,64 +1070,66 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $i14 - (i32.add - (get_local $i25) - (i32.const 20) - ) - ) - (set_local $i17 - (i32.load - (get_local $i14) - ) - ) - (if - (get_local $i17) - (block - (set_local $i25 - (get_local $i17) + (loop $while-in$28 + (block $while-out$27 + (set_local $i14 + (i32.add + (get_local $i25) + (i32.const 20) ) - (set_local $i26 + ) + (set_local $i17 + (i32.load (get_local $i14) ) - (br $while-in$28) - ) - ) - (set_local $i14 - (i32.add - (get_local $i25) - (i32.const 16) - ) - ) - (set_local $i17 - (i32.load - (get_local $i14) ) - ) - (if - (i32.eqz + (if (get_local $i17) + (block + (set_local $i25 + (get_local $i17) + ) + (set_local $i26 + (get_local $i14) + ) + (br $while-in$28) + ) ) - (block - (set_local $i27 + (set_local $i14 + (i32.add (get_local $i25) + (i32.const 16) ) - (set_local $i28 - (get_local $i26) + ) + (set_local $i17 + (i32.load + (get_local $i14) ) - (br $while-out$27) ) - (block - (set_local $i25 + (if + (i32.eqz (get_local $i17) ) - (set_local $i26 - (get_local $i14) + (block + (set_local $i27 + (get_local $i25) + ) + (set_local $i28 + (get_local $i26) + ) + (br $while-out$27) + ) + (block + (set_local $i25 + (get_local $i17) + ) + (set_local $i26 + (get_local $i14) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1830,156 +1834,158 @@ (set_local $i8 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $i16 - (i32.and - (i32.load - (i32.add - (get_local $i17) - (i32.const 4) + (loop $while-in$4 + (block $while-out$3 + (set_local $i16 + (i32.and + (i32.load + (i32.add + (get_local $i17) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - ) - (set_local $i9 - (i32.sub - (get_local $i16) - (get_local $i5) - ) - ) - (if - (i32.lt_u - (get_local $i9) - (get_local $i12) ) - (if - (i32.eq + (set_local $i9 + (i32.sub (get_local $i16) (get_local $i5) ) - (block - (set_local $i37 - (get_local $i9) - ) - (set_local $i38 - (get_local $i17) + ) + (if + (i32.lt_u + (get_local $i9) + (get_local $i12) + ) + (if + (i32.eq + (get_local $i16) + (get_local $i5) ) - (set_local $i39 - (get_local $i17) + (block + (set_local $i37 + (get_local $i9) + ) + (set_local $i38 + (get_local $i17) + ) + (set_local $i39 + (get_local $i17) + ) + (set_local $i36 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $i36 - (i32.const 90) + (block + (set_local $i40 + (get_local $i9) + ) + (set_local $i41 + (get_local $i17) + ) ) - (br $label$break$L123) ) (block (set_local $i40 - (get_local $i9) + (get_local $i12) ) (set_local $i41 - (get_local $i17) + (get_local $i8) ) ) ) - (block - (set_local $i40 - (get_local $i12) - ) - (set_local $i41 - (get_local $i8) - ) - ) - ) - (set_local $i9 - (i32.load - (i32.add - (get_local $i17) - (i32.const 20) - ) - ) - ) - (set_local $i17 - (i32.load - (i32.add + (set_local $i9 + (i32.load (i32.add (get_local $i17) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i7) - (i32.const 31) - ) - (i32.const 2) + (i32.const 20) ) ) ) - ) - (set_local $i16 - (if - (i32.or - (i32.eq - (get_local $i9) - (i32.const 0) - ) - (i32.eq - (get_local $i9) - (get_local $i17) + (set_local $i17 + (i32.load + (i32.add + (i32.add + (get_local $i17) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i7) + (i32.const 31) + ) + (i32.const 2) + ) ) ) - (get_local $i10) - (get_local $i9) ) - ) - (set_local $i9 - (i32.eq - (get_local $i17) - (i32.const 0) - ) - ) - (if - (get_local $i9) - (block - (set_local $i33 - (get_local $i40) - ) - (set_local $i34 - (get_local $i16) - ) - (set_local $i35 - (get_local $i41) - ) - (set_local $i36 - (i32.const 86) + (set_local $i16 + (if + (i32.or + (i32.eq + (get_local $i9) + (i32.const 0) + ) + (i32.eq + (get_local $i9) + (get_local $i17) + ) + ) + (get_local $i10) + (get_local $i9) ) - (br $while-out$3) ) - (block - (set_local $i12 - (get_local $i40) + (set_local $i9 + (i32.eq + (get_local $i17) + (i32.const 0) ) - (set_local $i10 - (get_local $i16) + ) + (if + (get_local $i9) + (block + (set_local $i33 + (get_local $i40) + ) + (set_local $i34 + (get_local $i16) + ) + (set_local $i35 + (get_local $i41) + ) + (set_local $i36 + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $i7 - (i32.shl - (get_local $i7) - (i32.xor - (i32.and - (get_local $i9) + (block + (set_local $i12 + (get_local $i40) + ) + (set_local $i10 + (get_local $i16) + ) + (set_local $i7 + (i32.shl + (get_local $i7) + (i32.xor + (i32.and + (get_local $i9) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $i8 - (get_local $i41) + (set_local $i8 + (get_local $i41) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -2180,104 +2186,106 @@ (get_local $i36) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $i36 - (i32.const 0) - ) - (set_local $i8 - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $i38) - (i32.const 4) + (loop $while-in$6 + (block $while-out$5 + (set_local $i36 + (i32.const 0) + ) + (set_local $i8 + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $i38) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i5) ) - (get_local $i5) - ) - ) - (set_local $i7 - (i32.lt_u - (get_local $i8) - (get_local $i37) - ) - ) - (set_local $i3 - (if - (get_local $i7) - (get_local $i8) - (get_local $i37) - ) - ) - (set_local $i8 - (if - (get_local $i7) - (get_local $i38) - (get_local $i39) ) - ) - (set_local $i7 - (i32.load - (i32.add - (get_local $i38) - (i32.const 16) + (set_local $i7 + (i32.lt_u + (get_local $i8) + (get_local $i37) ) ) - ) - (if - (get_local $i7) - (block - (set_local $i37 - (get_local $i3) - ) - (set_local $i38 + (set_local $i3 + (if (get_local $i7) - ) - (set_local $i39 (get_local $i8) + (get_local $i37) ) - (set_local $i36 - (i32.const 90) - ) - (br $while-in$6) ) - ) - (set_local $i38 - (i32.load - (i32.add + (set_local $i8 + (if + (get_local $i7) (get_local $i38) - (i32.const 20) + (get_local $i39) ) ) - ) - (if - (i32.eqz - (get_local $i38) + (set_local $i7 + (i32.load + (i32.add + (get_local $i38) + (i32.const 16) + ) + ) ) - (block - (set_local $i43 - (get_local $i3) + (if + (get_local $i7) + (block + (set_local $i37 + (get_local $i3) + ) + (set_local $i38 + (get_local $i7) + ) + (set_local $i39 + (get_local $i8) + ) + (set_local $i36 + (i32.const 90) + ) + (br $while-in$6) ) - (set_local $i44 - (get_local $i8) + ) + (set_local $i38 + (i32.load + (i32.add + (get_local $i38) + (i32.const 20) + ) ) - (br $while-out$5) ) - (block - (set_local $i37 - (get_local $i3) + (if + (i32.eqz + (get_local $i38) ) - (set_local $i39 - (get_local $i8) + (block + (set_local $i43 + (get_local $i3) + ) + (set_local $i44 + (get_local $i8) + ) + (br $while-out$5) ) - (set_local $i36 - (i32.const 90) + (block + (set_local $i37 + (get_local $i3) + ) + (set_local $i39 + (get_local $i8) + ) + (set_local $i36 + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2402,66 +2410,68 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (set_local $i2 - (i32.add - (get_local $i46) - (i32.const 20) - ) - ) - (set_local $i14 - (i32.load - (get_local $i2) - ) - ) - (if - (get_local $i14) - (block - (set_local $i46 - (get_local $i14) + (loop $while-in$10 + (block $while-out$9 + (set_local $i2 + (i32.add + (get_local $i46) + (i32.const 20) ) - (set_local $i47 + ) + (set_local $i14 + (i32.load (get_local $i2) ) - (br $while-in$10) ) - ) - (set_local $i2 - (i32.add - (get_local $i46) - (i32.const 16) - ) - ) - (set_local $i14 - (i32.load - (get_local $i2) - ) - ) - (if - (i32.eqz + (if (get_local $i14) + (block + (set_local $i46 + (get_local $i14) + ) + (set_local $i47 + (get_local $i2) + ) + (br $while-in$10) + ) ) - (block - (set_local $i48 + (set_local $i2 + (i32.add (get_local $i46) + (i32.const 16) ) - (set_local $i49 - (get_local $i47) - ) - (br $while-out$9) ) - (block - (set_local $i46 - (get_local $i14) - ) - (set_local $i47 + (set_local $i14 + (i32.load (get_local $i2) ) ) - ) - (br $while-in$10) - ) - (if + (if + (i32.eqz + (get_local $i14) + ) + (block + (set_local $i48 + (get_local $i46) + ) + (set_local $i49 + (get_local $i47) + ) + (br $while-out$9) + ) + (block + (set_local $i46 + (get_local $i14) + ) + (set_local $i47 + (get_local $i2) + ) + ) + ) + (br $while-in$10) + ) + ) + (if (i32.lt_u (get_local $i49) (get_local $i15) @@ -3110,79 +3120,81 @@ (get_local $i3) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i7) - (i32.const 4) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i7) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i43) - ) - (block - (set_local $i53 - (get_local $i7) + (get_local $i43) ) - (set_local $i36 - (i32.const 148) + (block + (set_local $i53 + (get_local $i7) + ) + (set_local $i36 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $i3 - (i32.add + (set_local $i3 (i32.add - (get_local $i7) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i4) - (i32.const 31) + (i32.add + (get_local $i7) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i4) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i2 - (i32.load - (get_local $i3) - ) - ) - (if - (i32.eqz - (get_local $i2) - ) - (block - (set_local $i54 + (set_local $i2 + (i32.load (get_local $i3) ) - (set_local $i55 - (get_local $i7) - ) - (set_local $i36 - (i32.const 145) - ) - (br $while-out$17) ) - (block - (set_local $i4 - (i32.shl - (get_local $i4) - (i32.const 1) + (if + (i32.eqz + (get_local $i2) + ) + (block + (set_local $i54 + (get_local $i3) ) + (set_local $i55 + (get_local $i7) + ) + (set_local $i36 + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $i7 - (get_local $i2) + (block + (set_local $i4 + (i32.shl + (get_local $i4) + (i32.const 1) + ) + ) + (set_local $i7 + (get_local $i2) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3737,67 +3749,69 @@ (set_local $i50 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (set_local $i51 - (i32.load - (get_local $i50) + (loop $while-in$38 + (block $while-out$37 + (set_local $i51 + (i32.load + (get_local $i50) + ) ) - ) - (if (if - (i32.le_u - (get_local $i51) - (get_local $i52) - ) - (block - (set_local $i45 - (i32.add - (get_local $i50) - (i32.const 4) - ) + (if + (i32.le_u + (get_local $i51) + (get_local $i52) ) - (i32.gt_u - (i32.add - (get_local $i51) - (i32.load - (get_local $i45) + (block + (set_local $i45 + (i32.add + (get_local $i50) + (i32.const 4) ) ) - (get_local $i52) + (i32.gt_u + (i32.add + (get_local $i51) + (i32.load + (get_local $i45) + ) + ) + (get_local $i52) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $i56 - (get_local $i50) + (block + (set_local $i56 + (get_local $i50) + ) + (set_local $i57 + (get_local $i45) + ) + (br $while-out$37) ) - (set_local $i57 - (get_local $i45) + ) + (set_local $i50 + (i32.load + (i32.add + (get_local $i50) + (i32.const 8) + ) ) - (br $while-out$37) ) - ) - (set_local $i50 - (i32.load - (i32.add + (if + (i32.eqz (get_local $i50) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $i50) - ) - (block - (set_local $i36 - (i32.const 173) + (block + (set_local $i36 + (i32.const 173) + ) + (br $label$break$L259) ) - (br $label$break$L259) ) + (br $while-in$38) ) - (br $while-in$38) ) (set_local $i50 (i32.and @@ -4270,64 +4284,66 @@ (set_local $i63 (i32.const 624) ) - (loop $do-out$48 $do-in$49 - (set_local $i43 - (i32.load - (get_local $i63) - ) - ) - (set_local $i61 - (i32.add - (get_local $i63) - (i32.const 4) - ) - ) - (set_local $i44 - (i32.load - (get_local $i61) + (loop $do-in$49 + (block $do-out$48 + (set_local $i43 + (i32.load + (get_local $i63) + ) ) - ) - (if - (i32.eq - (get_local $i58) + (set_local $i61 (i32.add - (get_local $i43) - (get_local $i44) + (get_local $i63) + (i32.const 4) ) ) - (block - (set_local $i64 - (get_local $i43) - ) - (set_local $i65 + (set_local $i44 + (i32.load (get_local $i61) ) - (set_local $i66 - (get_local $i44) + ) + (if + (i32.eq + (get_local $i58) + (i32.add + (get_local $i43) + (get_local $i44) + ) ) - (set_local $i67 - (get_local $i63) + (block + (set_local $i64 + (get_local $i43) + ) + (set_local $i65 + (get_local $i61) + ) + (set_local $i66 + (get_local $i44) + ) + (set_local $i67 + (get_local $i63) + ) + (set_local $i36 + (i32.const 203) + ) + (br $do-out$48) ) - (set_local $i36 - (i32.const 203) + ) + (set_local $i63 + (i32.load + (i32.add + (get_local $i63) + (i32.const 8) + ) ) - (br $do-out$48) ) - ) - (set_local $i63 - (i32.load - (i32.add + (br_if $do-in$49 + (i32.ne (get_local $i63) - (i32.const 8) + (i32.const 0) ) ) ) - (br_if $do-in$49 - (i32.ne - (get_local $i63) - (i32.const 0) - ) - ) ) (if (if @@ -4481,47 +4497,49 @@ (set_local $i63 (i32.const 624) ) - (loop $while-out$50 $while-in$51 - (if - (i32.eq - (i32.load - (get_local $i63) + (loop $while-in$51 + (block $while-out$50 + (if + (i32.eq + (i32.load + (get_local $i63) + ) + (get_local $i61) ) - (get_local $i61) - ) - (block - (set_local $i69 - (get_local $i63) - ) - (set_local $i70 - (get_local $i63) + (block + (set_local $i69 + (get_local $i63) + ) + (set_local $i70 + (get_local $i63) + ) + (set_local $i36 + (i32.const 211) + ) + (br $while-out$50) ) - (set_local $i36 - (i32.const 211) + ) + (set_local $i63 + (i32.load + (i32.add + (get_local $i63) + (i32.const 8) + ) ) - (br $while-out$50) ) - ) - (set_local $i63 - (i32.load - (i32.add + (if + (i32.eqz (get_local $i63) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $i63) - ) - (block - (set_local $i71 - (i32.const 624) + (block + (set_local $i71 + (i32.const 624) + ) + (br $while-out$50) ) - (br $while-out$50) ) + (br $while-in$51) ) - (br $while-in$51) ) (if (i32.eq @@ -4807,64 +4825,66 @@ ) ) ) - (loop $while-out$61 $while-in$62 - (set_local $i5 - (i32.add - (get_local $i73) - (i32.const 20) - ) - ) - (set_local $i52 - (i32.load - (get_local $i5) - ) - ) - (if - (get_local $i52) - (block - (set_local $i73 - (get_local $i52) + (loop $while-in$62 + (block $while-out$61 + (set_local $i5 + (i32.add + (get_local $i73) + (i32.const 20) ) - (set_local $i74 + ) + (set_local $i52 + (i32.load (get_local $i5) ) - (br $while-in$62) ) - ) - (set_local $i5 - (i32.add - (get_local $i73) - (i32.const 16) - ) - ) - (set_local $i52 - (i32.load - (get_local $i5) - ) - ) - (if - (i32.eqz + (if (get_local $i52) + (block + (set_local $i73 + (get_local $i52) + ) + (set_local $i74 + (get_local $i5) + ) + (br $while-in$62) + ) ) - (block - (set_local $i75 + (set_local $i5 + (i32.add (get_local $i73) + (i32.const 16) ) - (set_local $i76 - (get_local $i74) + ) + (set_local $i52 + (i32.load + (get_local $i5) ) - (br $while-out$61) ) - (block - (set_local $i73 + (if + (i32.eqz (get_local $i52) ) - (set_local $i74 - (get_local $i5) + (block + (set_local $i75 + (get_local $i73) + ) + (set_local $i76 + (get_local $i74) + ) + (br $while-out$61) + ) + (block + (set_local $i73 + (get_local $i52) + ) + (set_local $i74 + (get_local $i5) + ) ) ) + (br $while-in$62) ) - (br $while-in$62) ) (if (i32.lt_u @@ -5693,79 +5713,81 @@ (get_local $i5) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i62) - (i32.const 4) + (loop $while-in$72 + (block $while-out$71 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i62) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i79) - ) - (block - (set_local $i83 - (get_local $i62) + (get_local $i79) ) - (set_local $i36 - (i32.const 281) + (block + (set_local $i83 + (get_local $i62) + ) + (set_local $i36 + (i32.const 281) + ) + (br $while-out$71) ) - (br $while-out$71) ) - ) - (set_local $i5 - (i32.add + (set_local $i5 (i32.add - (get_local $i62) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i50) - (i32.const 31) + (i32.add + (get_local $i62) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i50) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i57 - (i32.load - (get_local $i5) - ) - ) - (if - (i32.eqz - (get_local $i57) - ) - (block - (set_local $i84 + (set_local $i57 + (i32.load (get_local $i5) ) - (set_local $i85 - (get_local $i62) - ) - (set_local $i36 - (i32.const 278) - ) - (br $while-out$71) ) - (block - (set_local $i50 - (i32.shl - (get_local $i50) - (i32.const 1) + (if + (i32.eqz + (get_local $i57) + ) + (block + (set_local $i84 + (get_local $i5) ) + (set_local $i85 + (get_local $i62) + ) + (set_local $i36 + (i32.const 278) + ) + (br $while-out$71) ) - (set_local $i62 - (get_local $i57) + (block + (set_local $i50 + (i32.shl + (get_local $i50) + (i32.const 1) + ) + ) + (set_local $i62 + (get_local $i57) + ) ) ) + (br $while-in$72) ) - (br $while-in$72) ) (if (i32.eq @@ -5928,53 +5950,55 @@ ) ) ) - (loop $while-out$73 $while-in$74 - (set_local $i63 - (i32.load - (get_local $i71) + (loop $while-in$74 + (block $while-out$73 + (set_local $i63 + (i32.load + (get_local $i71) + ) ) - ) - (if (if - (i32.le_u - (get_local $i63) - (get_local $i60) - ) - (block - (set_local $i53 - (i32.add - (get_local $i63) - (i32.load - (i32.add - (get_local $i71) - (i32.const 4) + (if + (i32.le_u + (get_local $i63) + (get_local $i60) + ) + (block + (set_local $i53 + (i32.add + (get_local $i63) + (i32.load + (i32.add + (get_local $i71) + (i32.const 4) + ) ) ) ) + (i32.gt_u + (get_local $i53) + (get_local $i60) + ) ) - (i32.gt_u + (i32.const 0) + ) + (block + (set_local $i86 (get_local $i53) - (get_local $i60) ) + (br $while-out$73) ) - (i32.const 0) - ) - (block - (set_local $i86 - (get_local $i53) - ) - (br $while-out$73) ) - ) - (set_local $i71 - (i32.load - (i32.add - (get_local $i71) - (i32.const 8) + (set_local $i71 + (i32.load + (i32.add + (get_local $i71) + (i32.const 8) + ) ) ) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $i44 (i32.add @@ -6171,24 +6195,26 @@ (i32.const 24) ) ) - (loop $do-out$75 $do-in$76 - (set_local $i63 - (i32.add - (get_local $i63) - (i32.const 4) - ) - ) - (i32.store - (get_local $i63) - (i32.const 7) - ) - (br_if $do-in$76 - (i32.lt_u + (loop $do-in$76 + (block $do-out$75 + (set_local $i63 (i32.add (get_local $i63) (i32.const 4) ) - (get_local $i86) + ) + (i32.store + (get_local $i63) + (i32.const 7) + ) + (br_if $do-in$76 + (i32.lt_u + (i32.add + (get_local $i63) + (i32.const 4) + ) + (get_local $i86) + ) ) ) ) @@ -6559,79 +6585,81 @@ (get_local $i43) ) ) - (loop $while-out$77 $while-in$78 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i62) - (i32.const 4) + (loop $while-in$78 + (block $while-out$77 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i62) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $i63) ) - (get_local $i63) - ) - (block - (set_local $i90 - (get_local $i62) - ) - (set_local $i36 - (i32.const 307) + (block + (set_local $i90 + (get_local $i62) + ) + (set_local $i36 + (i32.const 307) + ) + (br $while-out$77) ) - (br $while-out$77) ) - ) - (set_local $i43 - (i32.add + (set_local $i43 (i32.add - (get_local $i62) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i5) - (i32.const 31) + (i32.add + (get_local $i62) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i5) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i57 - (i32.load - (get_local $i43) - ) - ) - (if - (i32.eqz - (get_local $i57) - ) - (block - (set_local $i91 + (set_local $i57 + (i32.load (get_local $i43) ) - (set_local $i92 - (get_local $i62) - ) - (set_local $i36 - (i32.const 304) - ) - (br $while-out$77) ) - (block - (set_local $i5 - (i32.shl - (get_local $i5) - (i32.const 1) + (if + (i32.eqz + (get_local $i57) + ) + (block + (set_local $i91 + (get_local $i43) + ) + (set_local $i92 + (get_local $i62) + ) + (set_local $i36 + (i32.const 304) ) + (br $while-out$77) ) - (set_local $i62 - (get_local $i57) + (block + (set_local $i5 + (i32.shl + (get_local $i5) + (i32.const 1) + ) + ) + (set_local $i62 + (get_local $i57) + ) ) ) + (br $while-in$78) ) - (br $while-in$78) ) (if (i32.eq @@ -6798,43 +6826,45 @@ (set_local $i5 (i32.const 0) ) - (loop $do-out$46 $do-in$47 - (set_local $i62 - (i32.add - (i32.const 216) - (i32.shl + (loop $do-in$47 + (block $do-out$46 + (set_local $i62 + (i32.add + (i32.const 216) (i32.shl - (get_local $i5) - (i32.const 1) + (i32.shl + (get_local $i5) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $i62) + (i32.const 12) + ) (get_local $i62) - (i32.const 12) ) - (get_local $i62) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $i62) + (i32.const 8) + ) (get_local $i62) - (i32.const 8) ) - (get_local $i62) - ) - (set_local $i5 - (i32.add - (get_local $i5) - (i32.const 1) + (set_local $i5 + (i32.add + (get_local $i5) + (i32.const 1) + ) ) - ) - (br_if $do-in$47 - (i32.ne - (get_local $i5) - (i32.const 32) + (br_if $do-in$47 + (i32.ne + (get_local $i5) + (i32.const 32) + ) ) ) ) @@ -7434,64 +7464,66 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $i11 - (i32.add - (get_local $i19) - (i32.const 20) - ) - ) - (set_local $i16 - (i32.load - (get_local $i11) - ) - ) - (if - (get_local $i16) - (block - (set_local $i19 - (get_local $i16) + (loop $while-in$5 + (block $while-out$4 + (set_local $i11 + (i32.add + (get_local $i19) + (i32.const 20) ) - (set_local $i20 + ) + (set_local $i16 + (i32.load (get_local $i11) ) - (br $while-in$5) - ) - ) - (set_local $i11 - (i32.add - (get_local $i19) - (i32.const 16) - ) - ) - (set_local $i16 - (i32.load - (get_local $i11) ) - ) - (if - (i32.eqz + (if (get_local $i16) + (block + (set_local $i19 + (get_local $i16) + ) + (set_local $i20 + (get_local $i11) + ) + (br $while-in$5) + ) ) - (block - (set_local $i21 + (set_local $i11 + (i32.add (get_local $i19) + (i32.const 16) ) - (set_local $i22 - (get_local $i20) + ) + (set_local $i16 + (i32.load + (get_local $i11) ) - (br $while-out$4) ) - (block - (set_local $i19 + (if + (i32.eqz (get_local $i16) ) - (set_local $i20 - (get_local $i11) + (block + (set_local $i21 + (get_local $i19) + ) + (set_local $i22 + (get_local $i20) + ) + (br $while-out$4) + ) + (block + (set_local $i19 + (get_local $i16) + ) + (set_local $i20 + (get_local $i11) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -8052,64 +8084,66 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (set_local $i19 - (i32.add - (get_local $i24) - (i32.const 20) - ) - ) - (set_local $i15 - (i32.load - (get_local $i19) - ) - ) - (if - (get_local $i15) - (block - (set_local $i24 - (get_local $i15) + (loop $while-in$13 + (block $while-out$12 + (set_local $i19 + (i32.add + (get_local $i24) + (i32.const 20) ) - (set_local $i25 + ) + (set_local $i15 + (i32.load (get_local $i19) ) - (br $while-in$13) - ) - ) - (set_local $i19 - (i32.add - (get_local $i24) - (i32.const 16) - ) - ) - (set_local $i15 - (i32.load - (get_local $i19) ) - ) - (if - (i32.eqz + (if (get_local $i15) + (block + (set_local $i24 + (get_local $i15) + ) + (set_local $i25 + (get_local $i19) + ) + (br $while-in$13) + ) ) - (block - (set_local $i26 + (set_local $i19 + (i32.add (get_local $i24) + (i32.const 16) ) - (set_local $i27 - (get_local $i25) + ) + (set_local $i15 + (i32.load + (get_local $i19) ) - (br $while-out$12) ) - (block - (set_local $i24 + (if + (i32.eqz (get_local $i15) ) - (set_local $i25 - (get_local $i19) + (block + (set_local $i26 + (get_local $i24) + ) + (set_local $i27 + (get_local $i25) + ) + (br $while-out$12) + ) + (block + (set_local $i24 + (get_local $i15) + ) + (set_local $i25 + (get_local $i19) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -8896,79 +8930,81 @@ (get_local $i5) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $i2) - (i32.const 4) - ) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $i29) - ) - (block - (set_local $i33 - (get_local $i2) + (get_local $i29) ) - (set_local $i34 - (i32.const 130) + (block + (set_local $i33 + (get_local $i2) + ) + (set_local $i34 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $i28 - (i32.add + (set_local $i28 (i32.add - (get_local $i2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $i31) - (i32.const 31) + (i32.add + (get_local $i2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $i31) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $i13 - (i32.load - (get_local $i28) - ) - ) - (if - (i32.eqz - (get_local $i13) - ) - (block - (set_local $i35 + (set_local $i13 + (i32.load (get_local $i28) ) - (set_local $i36 - (get_local $i2) - ) - (set_local $i34 - (i32.const 127) - ) - (br $while-out$18) ) - (block - (set_local $i31 - (i32.shl - (get_local $i31) - (i32.const 1) + (if + (i32.eqz + (get_local $i13) + ) + (block + (set_local $i35 + (get_local $i28) ) + (set_local $i36 + (get_local $i2) + ) + (set_local $i34 + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $i2 - (get_local $i13) + (block + (set_local $i31 + (i32.shl + (get_local $i31) + (i32.const 1) + ) + ) + (set_local $i2 + (get_local $i13) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -9143,25 +9179,27 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $i12 - (i32.load - (get_local $i37) - ) - ) - (if - (i32.eqz - (get_local $i12) + (loop $while-in$21 + (block $while-out$20 + (set_local $i12 + (i32.load + (get_local $i37) + ) ) - (br $while-out$20) - (set_local $i37 - (i32.add + (if + (i32.eqz (get_local $i12) - (i32.const 8) + ) + (br $while-out$20) + (set_local $i37 + (i32.add + (get_local $i12) + (i32.const 8) + ) ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -9294,247 +9332,249 @@ (get_local $i3) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.load - (i32.const 8) - ) - ) - (block - (i32.store - (get_local $i5) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz (i32.load - (get_local $i2) + (i32.const 8) ) ) - (i32.store - (i32.add + (block + (i32.store (get_local $i5) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - (get_local $i12) - ) - (i32.store - (i32.add - (get_local $i5) - (i32.const 8) + (i32.store + (i32.add + (get_local $i5) + (i32.const 4) + ) + (get_local $i12) ) - (get_local $i7) - ) - (set_local $i14 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (i32.store + (i32.add (get_local $i5) + (i32.const 8) ) + (get_local $i7) ) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 4) - (get_local $i1) - ) - (i32.store - (get_local $i6) - (i32.load - (get_local $i2) + (set_local $i14 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $i5) + ) + ) ) ) - (i32.store - (i32.add - (get_local $i6) + (block + (call_import $_pthread_cleanup_push (i32.const 4) + (get_local $i1) ) - (get_local $i12) - ) - (i32.store - (i32.add + (i32.store (get_local $i6) - (i32.const 8) + (i32.load + (get_local $i2) + ) ) - (get_local $i7) - ) - (set_local $i11 - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (i32.store + (i32.add (get_local $i6) + (i32.const 4) ) + (get_local $i12) ) - ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (set_local $i14 - (get_local $i11) - ) - ) - ) - (if - (i32.eq - (get_local $i13) - (get_local $i14) - ) - (block - (set_local $i15 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $i14) - (i32.const 0) - ) - (block - (set_local $i16 - (get_local $i12) - ) - (set_local $i17 - (get_local $i7) - ) - (set_local $i15 - (i32.const 8) - ) - (br $while-out$0) - ) - ) - (set_local $i11 - (i32.sub - (get_local $i13) - (get_local $i14) - ) - ) - (set_local $i18 - (i32.load - (i32.add - (get_local $i12) - (i32.const 4) - ) - ) - ) - (if - (i32.le_u - (get_local $i14) - (get_local $i18) - ) - (if - (i32.eq - (get_local $i7) - (i32.const 2) - ) - (block (i32.store - (get_local $i8) (i32.add - (i32.load - (get_local $i8) - ) - (get_local $i14) + (get_local $i6) + (i32.const 8) ) + (get_local $i7) ) - (set_local $i19 - (get_local $i18) - ) - (set_local $i20 - (get_local $i14) + (set_local $i11 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $i6) + ) + ) ) - (set_local $i21 - (get_local $i12) + (call_import $_pthread_cleanup_pop + (i32.const 0) ) - (set_local $i22 - (i32.const 2) + (set_local $i14 + (get_local $i11) ) ) + ) + (if + (i32.eq + (get_local $i13) + (get_local $i14) + ) (block - (set_local $i19 - (get_local $i18) - ) - (set_local $i20 - (get_local $i14) + (set_local $i15 + (i32.const 6) ) - (set_local $i21 + (br $while-out$0) + ) + ) + (if + (i32.lt_s + (get_local $i14) + (i32.const 0) + ) + (block + (set_local $i16 (get_local $i12) ) - (set_local $i22 + (set_local $i17 (get_local $i7) ) - ) - ) - (block - (set_local $i23 - (i32.load - (get_local $i9) + (set_local $i15 + (i32.const 8) ) + (br $while-out$0) ) - (i32.store - (get_local $i8) - (get_local $i23) + ) + (set_local $i11 + (i32.sub + (get_local $i13) + (get_local $i14) ) - (i32.store - (get_local $i10) - (get_local $i23) + ) + (set_local $i18 + (i32.load + (i32.add + (get_local $i12) + (i32.const 4) + ) ) - (set_local $i19 - (i32.load - (i32.add + ) + (if + (i32.le_u + (get_local $i14) + (get_local $i18) + ) + (if + (i32.eq + (get_local $i7) + (i32.const 2) + ) + (block + (i32.store + (get_local $i8) + (i32.add + (i32.load + (get_local $i8) + ) + (get_local $i14) + ) + ) + (set_local $i19 + (get_local $i18) + ) + (set_local $i20 + (get_local $i14) + ) + (set_local $i21 (get_local $i12) - (i32.const 12) + ) + (set_local $i22 + (i32.const 2) ) ) - ) - (set_local $i20 - (i32.sub - (get_local $i14) - (get_local $i18) + (block + (set_local $i19 + (get_local $i18) + ) + (set_local $i20 + (get_local $i14) + ) + (set_local $i21 + (get_local $i12) + ) + (set_local $i22 + (get_local $i7) + ) ) ) - (set_local $i21 - (i32.add - (get_local $i12) - (i32.const 8) + (block + (set_local $i23 + (i32.load + (get_local $i9) + ) + ) + (i32.store + (get_local $i8) + (get_local $i23) + ) + (i32.store + (get_local $i10) + (get_local $i23) + ) + (set_local $i19 + (i32.load + (i32.add + (get_local $i12) + (i32.const 12) + ) + ) + ) + (set_local $i20 + (i32.sub + (get_local $i14) + (get_local $i18) + ) + ) + (set_local $i21 + (i32.add + (get_local $i12) + (i32.const 8) + ) + ) + (set_local $i22 + (i32.add + (get_local $i7) + (i32.const -1) + ) ) ) - (set_local $i22 - (i32.add - (get_local $i7) - (i32.const -1) + ) + (i32.store + (get_local $i21) + (i32.add + (i32.load + (get_local $i21) ) + (get_local $i20) ) ) - ) - (i32.store - (get_local $i21) - (i32.add - (i32.load + (i32.store + (i32.add (get_local $i21) + (i32.const 4) + ) + (i32.sub + (get_local $i19) + (get_local $i20) ) - (get_local $i20) ) - ) - (i32.store - (i32.add + (set_local $i12 (get_local $i21) - (i32.const 4) ) - (i32.sub - (get_local $i19) - (get_local $i20) + (set_local $i7 + (get_local $i22) ) + (set_local $i13 + (get_local $i11) + ) + (br $while-in$1) ) - (set_local $i12 - (get_local $i21) - ) - (set_local $i7 - (get_local $i22) - ) - (set_local $i13 - (get_local $i11) - ) - (br $while-in$1) ) (if (i32.eq @@ -9762,54 +9802,56 @@ (set_local $i4 (get_local $i2) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $i4) - ) - (block - (set_local $i10 - (get_local $i2) - ) - (set_local $i11 - (get_local $i1) - ) - (set_local $i12 - (get_local $i9) - ) - (set_local $i13 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $i4) ) - (br $label$break$L10) - ) - ) - (set_local $i14 - (i32.add - (get_local $i4) - (i32.const -1) - ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add + (block + (set_local $i10 + (get_local $i2) + ) + (set_local $i11 (get_local $i1) - (get_local $i14) ) + (set_local $i12 + (get_local $i9) + ) + (set_local $i13 + (i32.const 0) + ) + (br $label$break$L10) ) - (i32.const 10) ) - (block - (set_local $i15 + (set_local $i14 + (i32.add (get_local $i4) + (i32.const -1) ) - (br $while-out$2) ) - (set_local $i4 - (get_local $i14) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $i1) + (get_local $i14) + ) + ) + (i32.const 10) + ) + (block + (set_local $i15 + (get_local $i4) + ) + (br $while-out$2) + ) + (set_local $i4 + (get_local $i14) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -10004,82 +10046,84 @@ (set_local $i4 (get_local $i5) ) - (loop $while-out$2 $while-in$3 - (if - (i32.gt_s - (i32.load - (i32.add + (loop $while-in$3 + (block $while-out$2 + (if + (i32.gt_s + (i32.load + (i32.add + (get_local $i3) + (i32.const 76) + ) + ) + (i32.const -1) + ) + (set_local $i7 + (call $___lockfile (get_local $i3) - (i32.const 76) ) ) - (i32.const -1) - ) - (set_local $i7 - (call $___lockfile - (get_local $i3) + (set_local $i7 + (i32.const 0) ) ) - (set_local $i7 - (i32.const 0) - ) - ) - (if - (i32.gt_u - (i32.load - (i32.add - (get_local $i3) - (i32.const 20) + (if + (i32.gt_u + (i32.load + (i32.add + (get_local $i3) + (i32.const 20) + ) ) - ) - (i32.load - (i32.add - (get_local $i3) - (i32.const 28) + (i32.load + (i32.add + (get_local $i3) + (i32.const 28) + ) ) ) - ) - (set_local $i8 - (i32.or - (call $___fflush_unlocked - (get_local $i3) + (set_local $i8 + (i32.or + (call $___fflush_unlocked + (get_local $i3) + ) + (get_local $i4) ) + ) + (set_local $i8 (get_local $i4) ) ) - (set_local $i8 - (get_local $i4) - ) - ) - (if - (get_local $i7) - (call $___unlockfile - (get_local $i3) - ) - ) - (set_local $i3 - (i32.load - (i32.add + (if + (get_local $i7) + (call $___unlockfile (get_local $i3) - (i32.const 56) ) ) - ) - (if - (i32.eqz - (get_local $i3) + (set_local $i3 + (i32.load + (i32.add + (get_local $i3) + (i32.const 56) + ) + ) ) - (block - (set_local $i6 + (if + (i32.eqz + (get_local $i3) + ) + (block + (set_local $i6 + (get_local $i8) + ) + (br $while-out$2) + ) + (set_local $i4 (get_local $i8) ) - (br $while-out$2) - ) - (set_local $i4 - (get_local $i8) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -10133,50 +10177,52 @@ (set_local $i6 (get_local $i2) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $i5) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (i32.load8_s + (get_local $i5) + ) + ) + (block + (set_local $i7 + (get_local $i6) + ) + (br $label$break$L1) ) ) - (block - (set_local $i7 - (get_local $i6) + (set_local $i8 + (i32.add + (get_local $i5) + (i32.const 1) ) - (br $label$break$L1) ) - ) - (set_local $i8 - (i32.add - (get_local $i5) - (i32.const 1) + (set_local $i6 + (get_local $i8) ) - ) - (set_local $i6 - (get_local $i8) - ) - (if - (i32.eqz - (i32.and - (get_local $i6) - (i32.const 3) + (if + (i32.eqz + (i32.and + (get_local $i6) + (i32.const 3) + ) ) - ) - (block - (set_local $i3 - (get_local $i8) + (block + (set_local $i3 + (get_local $i8) + ) + (set_local $i4 + (i32.const 4) + ) + (br $while-out$1) ) - (set_local $i4 - (i32.const 4) + (set_local $i5 + (get_local $i8) ) - (br $while-out$1) - ) - (set_local $i5 - (get_local $i8) ) + (br $while-in$2) ) - (br $while-in$2) ) ) ) @@ -10190,45 +10236,47 @@ (set_local $i4 (get_local $i3) ) - (loop $while-out$3 $while-in$4 - (set_local $i3 - (i32.load - (get_local $i4) + (loop $while-in$4 + (block $while-out$3 + (set_local $i3 + (i32.load + (get_local $i4) + ) ) - ) - (if - (i32.eqz - (i32.and - (i32.xor - (i32.and - (get_local $i3) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (get_local $i3) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (i32.add + (get_local $i3) + (i32.const -16843009) + ) ) + ) + (set_local $i4 (i32.add - (get_local $i3) - (i32.const -16843009) + (get_local $i4) + (i32.const 4) ) ) - ) - (set_local $i4 - (i32.add - (get_local $i4) - (i32.const 4) - ) - ) - (block - (set_local $i9 - (get_local $i3) - ) - (set_local $i10 - (get_local $i4) + (block + (set_local $i9 + (get_local $i3) + ) + (set_local $i10 + (get_local $i4) + ) + (br $while-out$3) ) - (br $while-out$3) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.eqz @@ -10250,30 +10298,32 @@ (set_local $i9 (get_local $i10) ) - (loop $while-out$5 $while-in$6 - (set_local $i10 - (i32.add - (get_local $i9) - (i32.const 1) - ) - ) - (if - (i32.eqz - (i32.load8_s - (get_local $i10) + (loop $while-in$6 + (block $while-out$5 + (set_local $i10 + (i32.add + (get_local $i9) + (i32.const 1) ) ) - (block - (set_local $i11 + (if + (i32.eqz + (i32.load8_s + (get_local $i10) + ) + ) + (block + (set_local $i11 + (get_local $i10) + ) + (br $while-out$5) + ) + (set_local $i9 (get_local $i10) ) - (br $while-out$5) - ) - (set_local $i9 - (get_local $i10) ) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -10645,129 +10695,135 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $i1) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if (i32.eqz - (get_local $i3) - ) - (return - (get_local $i4) + (i32.and + (get_local $i1) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (block + (if + (i32.eqz + (get_local $i3) + ) + (return + (get_local $i4) + ) ) - ) - (set_local $i1 - (i32.add + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $i3) - (i32.const 4) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $i1) - (i32.load - (get_local $i2) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $i3) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $i1 - (i32.add + (block + (i32.store (get_local $i1) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 4) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 4) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $i3) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $i3) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $i4) @@ -10847,81 +10903,87 @@ (get_local $i5) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i5) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i5) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $i1) - (get_local $i2) - ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (get_local $i2) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i7) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i7) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $i1) - (get_local $i6) - ) - (set_local $i1 - (i32.add + (block + (i32.store (get_local $i1) - (i32.const 4) + (get_local $i6) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $i1) - (get_local $i4) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $i1) + (get_local $i4) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $i1) - (get_local $i2) - ) - (set_local $i1 - (i32.add + (block + (i32.store8 (get_local $i1) - (i32.const 1) + (get_local $i2) + ) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 3187c00a7..1475e4676 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -416,51 +416,53 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (i32.and - (i32.load8_s offset=687 - (get_local $1) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (i32.and + (i32.load8_s offset=687 + (get_local $1) + ) + (i32.const 255) ) - (i32.const 255) - ) - (get_local $0) - ) - (block - (set_local $4 - (get_local $1) - ) - (set_local $0 - (i32.const 2) + (get_local $0) ) - (br $while-out$0) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.add + (block + (set_local $4 (get_local $1) - (i32.const 1) ) + (set_local $0 + (i32.const 2) + ) + (br $while-out$0) ) - (i32.const 87) ) - (block - (set_local $3 + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) (i32.const 87) ) - (set_local $2 - (i32.const 775) - ) - (set_local $0 - (i32.const 5) + (block + (set_local $3 + (i32.const 87) + ) + (set_local $2 + (i32.const 775) + ) + (set_local $0 + (i32.const 5) + ) + (br $while-out$0) ) - (br $while-out$0) ) + (br $while-in$1) ) - (br $while-in$1) ) (if (i32.eq @@ -493,65 +495,69 @@ (get_local $0) (i32.const 5) ) - (loop $while-out$2 $while-in$3 - (loop $while-out$4 $while-in$5 - (set_local $0 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (loop $while-in$5 + (block $while-out$4 + (set_local $0 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $2) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + (block + (set_local $1 + (get_local $0) + ) + (br $while-out$4) + ) + (set_local $2 + (get_local $0) + ) + ) + (br $while-in$5) ) ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) - ) - (i32.const 24) + (tee_local $0 + (i32.add + (get_local $3) + (i32.const -1) ) - (i32.const 24) ) (i32.const 0) ) (block - (set_local $1 - (get_local $0) + (set_local $5 + (get_local $1) ) - (br $while-out$4) - ) - (set_local $2 - (get_local $0) + (br $while-out$2) ) - ) - (br $while-in$5) - ) - (if - (i32.eq - (tee_local $0 - (i32.add - (get_local $3) - (i32.const -1) + (block + (set_local $3 + (get_local $0) + ) + (set_local $2 + (get_local $1) ) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $1) - ) - (br $while-out$2) - ) - (block - (set_local $3 - (get_local $0) - ) - (set_local $2 - (get_local $1) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) (get_local $5) @@ -843,69 +849,71 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $___lockfile (get_local $1) ) - (i32.const -1) - ) - (call $___lockfile - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $___fflush_unlocked - (get_local $1) + (i32.or + (call $___fflush_unlocked + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) - ) - ) - (if - (i32.ne - (get_local $0) - (i32.const 0) ) - (call $___unlockfile - (get_local $1) + (if + (i32.ne + (get_local $0) + (i32.const 0) + ) + (call $___unlockfile + (get_local $1) + ) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load offset=56 - (get_local $1) + (if + (i32.eq + (tee_local $0 + (i32.load offset=56 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) + ) + (set_local $1 + (get_local $0) ) - (br $while-out$2) - ) - (set_local $1 - (get_local $0) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -1123,206 +1131,208 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $3) - (tee_local $5 - (if - (i32.eq - (i32.load - (i32.const 16) - ) - (i32.const 0) - ) - (block - (i32.store - (get_local $9) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $3) + (tee_local $5 + (if + (i32.eq (i32.load - (get_local $12) + (i32.const 16) ) + (i32.const 0) ) - (i32.store offset=4 - (get_local $9) - (get_local $4) - ) - (i32.store offset=8 - (get_local $9) - (get_local $6) - ) - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (block + (i32.store (get_local $9) + (i32.load + (get_local $12) + ) + ) + (i32.store offset=4 + (get_local $9) + (get_local $4) + ) + (i32.store offset=8 + (get_local $9) + (get_local $6) ) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 5) - (get_local $0) - ) - (i32.store - (get_local $10) - (i32.load - (get_local $12) - ) - ) - (i32.store offset=4 - (get_local $10) - (get_local $4) - ) - (i32.store offset=8 - (get_local $10) - (get_local $6) - ) - (set_local $1 (call $___syscall_ret (call_import $___syscall146 (i32.const 146) - (get_local $10) + (get_local $9) ) ) ) - (call_import $_pthread_cleanup_pop - (i32.const 0) + (block + (call_import $_pthread_cleanup_push + (i32.const 5) + (get_local $0) + ) + (i32.store + (get_local $10) + (i32.load + (get_local $12) + ) + ) + (i32.store offset=4 + (get_local $10) + (get_local $4) + ) + (i32.store offset=8 + (get_local $10) + (get_local $6) + ) + (set_local $1 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $10) + ) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (get_local $1) ) - (get_local $1) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $15 - (get_local $4) - ) - (set_local $16 - (get_local $6) - ) - (set_local $1 - (i32.const 8) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) - ) - ) - (set_local $17 - (i32.sub - (get_local $3) - (get_local $5) ) - ) - (set_local $1 (if - (i32.gt_u + (i32.lt_s (get_local $5) - (tee_local $1 - (i32.load offset=4 - (get_local $4) - ) - ) + (i32.const 0) ) (block - (i32.store - (get_local $7) - (tee_local $3 - (i32.load - (get_local $13) - ) - ) - ) - (i32.store - (get_local $11) - (get_local $3) - ) - (set_local $5 - (i32.sub - (get_local $5) - (get_local $1) - ) - ) - (set_local $3 - (i32.add - (get_local $4) - (i32.const 8) - ) + (set_local $15 + (get_local $4) ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const -1) - ) + (set_local $16 + (get_local $6) ) - (i32.load offset=12 - (get_local $4) + (set_local $1 + (i32.const 8) ) + (br $while-out$0) + ) + ) + (set_local $17 + (i32.sub + (get_local $3) + (get_local $5) ) + ) + (set_local $1 (if - (i32.eq - (get_local $6) - (i32.const 2) + (i32.gt_u + (get_local $5) + (tee_local $1 + (i32.load offset=4 + (get_local $4) + ) + ) ) (block (i32.store (get_local $7) - (i32.add + (tee_local $3 (i32.load - (get_local $7) + (get_local $13) ) + ) + ) + (i32.store + (get_local $11) + (get_local $3) + ) + (set_local $5 + (i32.sub (get_local $5) + (get_local $1) ) ) (set_local $3 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $6 - (i32.const 2) + (i32.add + (get_local $6) + (i32.const -1) + ) ) - (get_local $1) - ) - (block - (set_local $3 + (i32.load offset=12 (get_local $4) ) - (get_local $1) + ) + (if + (i32.eq + (get_local $6) + (i32.const 2) + ) + (block + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) + ) + (get_local $5) + ) + ) + (set_local $3 + (get_local $4) + ) + (set_local $6 + (i32.const 2) + ) + (get_local $1) + ) + (block + (set_local $3 + (get_local $4) + ) + (get_local $1) + ) ) ) ) - ) - (i32.store - (get_local $3) - (i32.add - (i32.load - (get_local $3) + (i32.store + (get_local $3) + (i32.add + (i32.load + (get_local $3) + ) + (get_local $5) ) - (get_local $5) ) - ) - (i32.store offset=4 - (get_local $3) - (i32.sub - (get_local $1) - (get_local $5) + (i32.store offset=4 + (get_local $3) + (i32.sub + (get_local $1) + (get_local $5) + ) ) + (set_local $4 + (get_local $3) + ) + (set_local $3 + (get_local $17) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $3) - ) - (set_local $3 - (get_local $17) - ) - (br $while-in$1) ) (if (i32.eq @@ -1850,48 +1860,50 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eq - (get_local $3) - (i32.const 0) - ) - (block - (set_local $2 + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eq + (get_local $3) (i32.const 0) ) - (br $label$break$L10 - (get_local $6) + (block + (set_local $2 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $6) + ) ) ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $4 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $4 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) + ) + (br $while-out$2) + (set_local $3 + (get_local $4) ) - (i32.const 10) - ) - (br $while-out$2) - (set_local $3 - (get_local $4) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -2331,85 +2343,87 @@ (set_local $2 (get_local $0) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $2) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $6) + (i32.shr_s + (i32.shl + (get_local $6) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (block - (set_local $4 - (get_local $3) - ) - (set_local $5 - (get_local $2) ) - (set_local $3 - (i32.const 6) + (block + (set_local $4 + (get_local $3) + ) + (set_local $5 + (get_local $2) + ) + (set_local $3 + (i32.const 6) + ) + (br $label$break$L1) ) - (br $label$break$L1) ) - ) - (if - (i32.and - (tee_local $3 - (i32.ne - (tee_local $0 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.and + (tee_local $3 + (i32.ne + (tee_local $0 + (i32.add + (get_local $3) + (i32.const -1) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (i32.ne - (i32.and - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) + (i32.ne + (i32.and + (tee_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) ) + (i32.const 3) ) - (i32.const 3) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $3 - (get_local $0) - ) - (block - (set_local $14 + (set_local $3 (get_local $0) ) - (set_local $11 - (get_local $2) - ) - (set_local $15 - (get_local $3) - ) - (set_local $3 - (i32.const 5) + (block + (set_local $14 + (get_local $0) + ) + (set_local $11 + (get_local $2) + ) + (set_local $15 + (get_local $3) + ) + (set_local $3 + (i32.const 5) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -2508,69 +2522,71 @@ (i32.const 3) ) (block - (loop $while-out$5 $while-in$6 - (set_local $1 - (i32.add - (tee_local $6 - (i32.xor - (i32.load - (get_local $5) + (loop $while-in$6 + (block $while-out$5 + (set_local $1 + (i32.add + (tee_local $6 + (i32.xor + (i32.load + (get_local $5) + ) + (get_local $2) ) - (get_local $2) ) + (i32.const -16843009) ) - (i32.const -16843009) ) - ) - (if - (i32.ne - (i32.and - (i32.xor - (i32.and - (get_local $6) + (if + (i32.ne + (i32.and + (i32.xor + (i32.and + (get_local $6) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (get_local $1) ) - (get_local $1) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$5) - ) - (set_local $1 - (i32.add - (get_local $5) - (i32.const 4) + (br $while-out$5) ) - ) - (if - (i32.gt_u - (tee_local $4 - (i32.add - (get_local $4) - (i32.const -4) - ) + (set_local $1 + (i32.add + (get_local $5) + (i32.const 4) ) - (i32.const 3) ) - (set_local $5 - (get_local $1) - ) - (block - (set_local $12 - (get_local $4) + (if + (i32.gt_u + (tee_local $4 + (i32.add + (get_local $4) + (i32.const -4) + ) + ) + (i32.const 3) ) - (set_local $13 + (set_local $5 (get_local $1) ) - (set_local $3 - (i32.const 11) + (block + (set_local $12 + (get_local $4) + ) + (set_local $13 + (get_local $1) + ) + (set_local $3 + (i32.const 11) + ) + (br $label$break$L11) ) - (br $label$break$L11) ) + (br $while-in$6) ) - (br $while-in$6) ) (set_local $10 (get_local $4) @@ -2621,71 +2637,73 @@ ) ) ) - (loop $while-out$7 $while-in$8 - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) + (loop $while-in$8 + (block $while-out$7 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $0) + (i32.shr_s + (i32.shl + (get_local $0) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (block - (set_local $7 - (get_local $10) - ) - (set_local $8 - (get_local $9) ) - (br $label$break$L8) - ) - ) - (set_local $2 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.add + (block + (set_local $7 (get_local $10) - (i32.const -1) ) + (set_local $8 + (get_local $9) + ) + (br $label$break$L8) ) - (i32.const 0) ) - (block - (set_local $7 - (i32.const 0) - ) - (set_local $8 - (get_local $2) + (set_local $2 + (i32.add + (get_local $9) + (i32.const 1) ) - (br $while-out$7) ) - (block - (set_local $10 - (get_local $1) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $10) + (i32.const -1) + ) + ) + (i32.const 0) ) - (set_local $9 - (get_local $2) + (block + (set_local $7 + (i32.const 0) + ) + (set_local $8 + (get_local $2) + ) + (br $while-out$7) + ) + (block + (set_local $10 + (get_local $1) + ) + (set_local $9 + (get_local $2) + ) ) ) + (br $while-in$8) ) - (br $while-in$8) ) ) ) @@ -3105,631 +3123,325 @@ (set_local $8 (i32.const 0) ) - (loop $label$break$L1 $label$continue$L1 - (set_local $22 - (if - (i32.gt_s - (get_local $22) - (i32.const -1) - ) + (loop $label$continue$L1 + (block $label$break$L1 + (set_local $22 (if (i32.gt_s - (get_local $1) - (i32.sub - (i32.const 2147483647) - (get_local $22) - ) - ) - (block - (i32.store - (call $___errno_location) - (i32.const 75) - ) - (i32.const -1) - ) - (i32.add - (get_local $1) (get_local $22) + (i32.const -1) ) - ) - (get_local $22) - ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (get_local $20) + (if + (i32.gt_s + (get_local $1) + (i32.sub + (i32.const 2147483647) + (get_local $22) ) ) - (i32.const 24) + (block + (i32.store + (call $___errno_location) + (i32.const 75) + ) + (i32.const -1) + ) + (i32.add + (get_local $1) + (get_local $22) + ) ) - (i32.const 24) - ) - (i32.const 0) - ) - (block - (set_local $82 (get_local $22) ) - (set_local $83 - (get_local $8) - ) - (set_local $12 - (i32.const 242) - ) - (br $label$break$L1) ) - (set_local $5 - (get_local $20) - ) - ) - (loop $label$break$L9 $label$continue$L9 - (block $switch-default$5 - (block $switch-case$4 - (block $switch-case$3 - (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 - (i32.sub - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) + (if + (i32.eq + (i32.shr_s + (i32.shl + (tee_local $1 + (i32.load8_s + (get_local $20) ) - (i32.const 0) ) + (i32.const 24) ) + (i32.const 24) ) - (set_local $54 - (get_local $5) + (i32.const 0) + ) + (block + (set_local $82 + (get_local $22) ) - (set_local $65 - (get_local $5) + (set_local $83 + (get_local $8) ) (set_local $12 - (i32.const 9) + (i32.const 242) ) - (br $label$break$L9) - ) - (set_local $41 - (get_local $5) - ) - (set_local $55 - (get_local $5) + (br $label$break$L1) ) - (br $label$break$L9) - ) - (set_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) + (set_local $5 + (get_local $20) ) ) - (br $label$continue$L9) - ) - (block $label$break$L12 - (if - (i32.eq - (get_local $12) - (i32.const 9) - ) - (loop $while-out$7 $while-in$8 - (set_local $12 - (i32.const 0) - ) - (if - (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s offset=1 - (get_local $54) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 37) - ) - (block - (set_local $41 - (get_local $54) - ) - (set_local $55 - (get_local $65) - ) - (br $label$break$L12) - ) - ) - (set_local $5 - (i32.add - (get_local $65) - (i32.const 1) - ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $54) - (i32.const 2) + (loop $label$continue$L9 + (block $label$break$L9 + (block $switch-default$5 + (block $switch-case$4 + (block $switch-case$3 + (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 + (i32.sub + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) ) + (i32.const 24) ) + (i32.const 0) ) - (i32.const 24) ) - (i32.const 24) ) - (i32.const 37) - ) - (block (set_local $54 - (get_local $1) + (get_local $5) ) (set_local $65 (get_local $5) ) - ) - (block - (set_local $41 - (get_local $1) - ) - (set_local $55 - (get_local $5) + (set_local $12 + (i32.const 9) ) - (br $while-out$7) + (br $label$break$L9) ) - ) - (br $while-in$8) - ) - ) - ) - (set_local $17 - (i32.sub - (get_local $55) - (get_local $20) - ) - ) - (if - (get_local $44) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (set_local $41 + (get_local $5) ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $20) - (get_local $17) - (get_local $0) - ) - ) - ) - (if - (i32.ne - (get_local $55) - (get_local $20) - ) - (block - (set_local $20 - (get_local $41) - ) - (set_local $1 - (get_local $17) - ) - (br $label$continue$L1) - ) - ) - (set_local $7 - (if - (i32.lt_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $41) - (i32.const 1) - ) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) + (set_local $55 + (get_local $5) ) + (br $label$break$L9) ) - (i32.const 10) - ) - (block (set_local $1 (i32.load8_s (tee_local $5 - (select - (i32.add - (get_local $41) - (i32.const 3) - ) + (i32.add (get_local $5) - (tee_local $7 - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $41) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 36) - ) - ) + (i32.const 1) ) ) ) ) - (set_local $11 - (select - (i32.const 1) - (get_local $8) - (get_local $7) - ) - ) - (set_local $9 - (get_local $5) - ) - (select - (get_local $6) - (i32.const -1) - (get_local $7) - ) - ) - (block - (set_local $11 - (get_local $8) - ) - (set_local $9 - (get_local $5) - ) - (i32.const -1) + (br $label$continue$L9) ) ) - ) - (block $label$break$L25 - (if - (i32.eq - (i32.and - (tee_local $5 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) - (i32.const -32) - ) - (i32.const 32) - ) - (block - (set_local $8 - (i32.const 0) + (block $label$break$L12 + (if + (i32.eq + (get_local $12) + (i32.const 9) ) - (loop $while-out$10 $while-in$11 - (if - (i32.eq - (i32.and - (i32.shl - (i32.const 1) - (i32.add - (get_local $5) - (i32.const -32) - ) - ) - (i32.const 75913) - ) + (loop $while-in$8 + (block $while-out$7 + (set_local $12 (i32.const 0) ) - (br $label$break$L25) - ) - (set_local $8 - (i32.or - (i32.shl - (i32.const 1) - (i32.add - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) + (if + (i32.ne + (i32.shr_s + (i32.shl + (i32.load8_s offset=1 + (get_local $54) ) (i32.const 24) ) - (i32.const -32) + (i32.const 24) ) + (i32.const 37) + ) + (block + (set_local $41 + (get_local $54) + ) + (set_local $55 + (get_local $65) + ) + (br $label$break$L12) ) - (get_local $8) ) - ) - (if - (i32.eq - (i32.and - (tee_local $5 - (i32.shr_s - (i32.shl + (set_local $5 + (i32.add + (get_local $65) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s (tee_local $1 - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) + (i32.add + (get_local $54) + (i32.const 2) ) ) - (i32.const 24) ) (i32.const 24) ) + (i32.const 24) ) - (i32.const -32) + (i32.const 37) ) - (i32.const 32) - ) - (set_local $9 - (get_local $6) - ) - (block - (set_local $9 - (get_local $6) + (block + (set_local $54 + (get_local $1) + ) + (set_local $65 + (get_local $5) + ) + ) + (block + (set_local $41 + (get_local $1) + ) + (set_local $55 + (get_local $5) + ) + (br $while-out$7) ) - (br $while-out$10) ) + (br $while-in$8) ) - (br $while-in$11) ) ) - (set_local $8 - (i32.const 0) + ) + (set_local $17 + (i32.sub + (get_local $55) + (get_local $20) ) ) - ) - (block $do-once$12 (if - (i32.eq - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) + (get_local $44) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 24) + (i32.const 0) + ) + (call $___fwritex + (get_local $20) + (get_local $17) + (get_local $0) ) - (i32.const 42) + ) + ) + (if + (i32.ne + (get_local $55) + (get_local $20) ) (block - (if - (i32.lt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl + (set_local $20 + (get_local $41) + ) + (set_local $1 + (get_local $17) + ) + (br $label$continue$L1) + ) + ) + (set_local $7 + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (tee_local $1 (i32.load8_s - (tee_local $6 + (tee_local $5 (i32.add - (get_local $9) + (get_local $41) (i32.const 1) ) ) ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $9) ) (i32.const 24) ) (i32.const 24) ) - (i32.const 36) + (i32.const -48) ) - (block - (i32.store - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) - ) - ) - (i32.const 10) - ) - (set_local $1 - (i32.load + ) + (i32.const 10) + ) + (block + (set_local $1 + (i32.load8_s + (tee_local $5 + (select (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (get_local $41) + (i32.const 3) + ) + (get_local $5) + (tee_local $7 + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s offset=2 + (get_local $41) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const 36) ) ) ) ) - (set_local $66 - (i32.const 1) - ) - (set_local $67 - (i32.add - (get_local $9) - (i32.const 3) - ) - ) - (set_local $56 - (get_local $1) - ) ) - (set_local $12 - (i32.const 24) + ) + (set_local $11 + (select + (i32.const 1) + (get_local $8) + (get_local $7) ) ) - (set_local $12 - (i32.const 24) + (set_local $9 + (get_local $5) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 24) - ) - (block - (set_local $12 - (i32.const 0) - ) - (if - (i32.ne - (get_local $11) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (if - (i32.eqz - (get_local $44) - ) - (block - (set_local $9 - (get_local $6) - ) - (set_local $21 - (i32.const 0) - ) - (set_local $16 - (i32.const 0) - ) - (br $do-once$12) - ) - ) - (set_local $5 - (i32.load - (tee_local $1 - (i32.and - (i32.add - (i32.load - (get_local $2) - ) - (i32.const 3) - ) - (i32.const -4) - ) - ) - ) - ) - (i32.store - (get_local $2) - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - (set_local $66 - (i32.const 0) - ) - (set_local $67 - (get_local $6) - ) - (set_local $56 - (get_local $5) - ) + (select + (get_local $6) + (i32.const -1) + (get_local $7) ) ) - (set_local $8 - (if - (i32.lt_s - (get_local $56) - (i32.const 0) - ) - (block - (set_local $9 - (get_local $67) - ) - (set_local $21 - (get_local $66) - ) - (set_local $16 - (i32.sub - (i32.const 0) - (get_local $56) - ) - ) - (i32.or - (get_local $8) - (i32.const 8192) - ) - ) - (block - (set_local $9 - (get_local $67) - ) - (set_local $21 - (get_local $66) - ) - (set_local $16 - (get_local $56) - ) - (get_local $8) - ) + (block + (set_local $11 + (get_local $8) + ) + (set_local $9 + (get_local $5) ) + (i32.const -1) ) ) + ) + (block $label$break$L25 (if - (i32.lt_u - (tee_local $6 - (i32.add + (i32.eq + (i32.and + (tee_local $5 (i32.shr_s (i32.shl (get_local $1) @@ -3737,234 +3449,136 @@ ) (i32.const 24) ) - (i32.const -48) ) + (i32.const -32) ) - (i32.const 10) + (i32.const 32) ) (block - (set_local $1 - (get_local $9) - ) - (set_local $5 + (set_local $8 (i32.const 0) ) - (loop $while-out$14 $while-in$15 - (set_local $5 - (i32.add - (i32.mul - (get_local $5) - (i32.const 10) + (loop $while-in$11 + (block $while-out$10 + (if + (i32.eq + (i32.and + (i32.shl + (i32.const 1) + (i32.add + (get_local $5) + (i32.const -32) + ) + ) + (i32.const 75913) + ) + (i32.const 0) ) - (get_local $6) + (br $label$break$L25) ) - ) - (if - (i32.ge_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s + (set_local $8 + (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 -32) + ) + ) + (get_local $8) + ) + ) + (if + (i32.eq + (i32.and + (tee_local $5 + (i32.shr_s + (i32.shl (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 1) + ) + ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) ) - (i32.const -48) + (i32.const -32) ) + (i32.const 32) + ) + (set_local $9 + (get_local $6) + ) + (block + (set_local $9 + (get_local $6) + ) + (br $while-out$10) ) - (i32.const 10) - ) - (br $while-out$14) - ) - (br $while-in$15) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - (block - (set_local $9 - (get_local $1) - ) - (set_local $21 - (get_local $11) - ) - (set_local $16 - (get_local $5) ) + (br $while-in$11) ) ) ) - (block - (set_local $21 - (get_local $11) - ) - (set_local $16 - (i32.const 0) - ) + (set_local $8 + (i32.const 0) ) ) ) - ) - (set_local $11 - (block $label$break$L46 + (block $do-once$12 (if (i32.eq (i32.shr_s (i32.shl - (i32.load8_s - (get_local $9) - ) + (get_local $1) (i32.const 24) ) (i32.const 24) ) - (i32.const 46) + (i32.const 42) ) (block (if - (i32.ne - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $9) - (i32.const 1) + (i32.lt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 1) + ) ) ) + (i32.const 24) ) + (i32.const 24) ) - (i32.const 24) + (i32.const -48) ) - (i32.const 24) ) - (i32.const 42) - ) - (block - (if - (i32.lt_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (block - (set_local $1 - (get_local $5) - ) - (set_local $5 - (i32.const 0) - ) - ) - (block - (set_local $10 - (i32.const 0) - ) - (br $label$break$L46 - (get_local $5) - ) - ) - ) - (loop $while-in$18 - (set_local $5 - (i32.add - (i32.mul - (get_local $5) - (i32.const 10) - ) - (get_local $6) - ) - ) - (if - (i32.ge_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (block - (set_local $10 - (get_local $5) - ) - (br $label$break$L46 - (get_local $1) - ) - ) - ) - (br $while-in$18) - ) - ) - ) - (if - (i32.lt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 2) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) + (i32.const 10) ) (if (i32.eq (i32.shr_s (i32.shl - (i32.load8_s offset=3 + (i32.load8_s offset=2 (get_local $9) ) (i32.const 24) @@ -4006,33 +3620,65 @@ ) ) ) - (set_local $10 - (get_local $1) + (set_local $66 + (i32.const 1) ) - (br $label$break$L46 + (set_local $67 (i32.add (get_local $9) - (i32.const 4) + (i32.const 3) ) ) + (set_local $56 + (get_local $1) + ) ) + (set_local $12 + (i32.const 24) + ) + ) + (set_local $12 + (i32.const 24) ) ) (if - (i32.ne - (get_local $21) - (i32.const 0) + (i32.eq + (get_local $12) + (i32.const 24) ) (block - (set_local $24 - (i32.const -1) + (set_local $12 + (i32.const 0) + ) + (if + (i32.ne + (get_local $11) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (i32.eqz + (get_local $44) + ) + (block + (set_local $9 + (get_local $6) + ) + (set_local $21 + (i32.const 0) + ) + (set_local $16 + (i32.const 0) + ) + (br $do-once$12) + ) ) - (br $label$break$L1) - ) - ) - (if - (get_local $44) - (block (set_local $5 (i32.load (tee_local $1 @@ -4055,131 +3701,489 @@ (i32.const 4) ) ) - (set_local $10 + (set_local $66 + (i32.const 0) + ) + (set_local $67 + (get_local $6) + ) + (set_local $56 (get_local $5) ) - (get_local $6) ) - (block - (set_local $10 + ) + (set_local $8 + (if + (i32.lt_s + (get_local $56) (i32.const 0) ) - (get_local $6) - ) - ) - ) - (block - (set_local $10 - (i32.const -1) - ) - (get_local $9) - ) - ) - ) - ) - (set_local $13 - (i32.const 0) - ) - (loop $while-out$19 $while-in$20 - (if - (i32.gt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) + (block + (set_local $9 + (get_local $67) + ) + (set_local $21 + (get_local $66) + ) + (set_local $16 + (i32.sub + (i32.const 0) + (get_local $56) + ) + ) + (i32.or + (get_local $8) + (i32.const 8192) ) - (i32.const 24) ) - (i32.const 24) + (block + (set_local $9 + (get_local $67) + ) + (set_local $21 + (get_local $66) + ) + (set_local $16 + (get_local $56) + ) + (get_local $8) + ) ) - (i32.const -65) ) ) - (i32.const 57) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (set_local $9 - (i32.add - (get_local $11) - (i32.const 1) - ) - ) - (if - (i32.lt_u - (i32.add - (tee_local $5 - (i32.and - (tee_local $1 - (i32.load8_s - (i32.add - (i32.add - (i32.const 3611) - (i32.mul - (get_local $13) - (i32.const 58) - ) - ) + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl (get_local $1) + (i32.const 24) ) + (i32.const 24) ) + (i32.const -48) ) - (i32.const 255) ) + (i32.const 10) + ) + (block + (set_local $1 + (get_local $9) + ) + (set_local $5 + (i32.const 0) + ) + (loop $while-in$15 + (block $while-out$14 + (set_local $5 + (i32.add + (i32.mul + (get_local $5) + (i32.const 10) + ) + (get_local $6) + ) + ) + (if + (i32.ge_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (br $while-out$14) + ) + (br $while-in$15) + ) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + (block + (set_local $9 + (get_local $1) + ) + (set_local $21 + (get_local $11) + ) + (set_local $16 + (get_local $5) + ) + ) + ) + ) + (block + (set_local $21 + (get_local $11) + ) + (set_local $16 + (i32.const 0) + ) + ) + ) + ) + ) + (set_local $11 + (block $label$break$L46 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 46) + ) + (block + (if + (i32.ne + (i32.shr_s + (i32.shl + (tee_local $1 + (i32.load8_s + (tee_local $5 + (i32.add + (get_local $9) + (i32.const 1) + ) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 42) + ) + (block + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (block + (set_local $1 + (get_local $5) + ) + (set_local $5 + (i32.const 0) + ) + ) + (block + (set_local $10 + (i32.const 0) + ) + (br $label$break$L46 + (get_local $5) + ) + ) + ) + (loop $while-in$18 + (set_local $5 + (i32.add + (i32.mul + (get_local $5) + (i32.const 10) + ) + (get_local $6) + ) + ) + (if + (i32.ge_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (block + (set_local $10 + (get_local $5) + ) + (br $label$break$L46 + (get_local $1) + ) + ) + ) + (br $while-in$18) + ) + ) + ) + (if + (i32.lt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 2) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s offset=3 + (get_local $9) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 36) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) + ) + (i32.const 10) + ) + (set_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + (i32.const 3) + ) + ) + ) + ) + (set_local $10 + (get_local $1) + ) + (br $label$break$L46 + (i32.add + (get_local $9) + (i32.const 4) + ) + ) + ) + ) + ) + (if + (i32.ne + (get_local $21) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (get_local $44) + (block + (set_local $5 + (i32.load + (tee_local $1 + (i32.and + (i32.add + (i32.load + (get_local $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (get_local $2) + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $10 + (get_local $5) + ) + (get_local $6) + ) + (block + (set_local $10 + (i32.const 0) + ) + (get_local $6) + ) + ) + ) + (block + (set_local $10 + (i32.const -1) + ) + (get_local $9) ) - (i32.const -1) - ) - (i32.const 8) - ) - (block - (set_local $11 - (get_local $9) - ) - (set_local $13 - (get_local $5) - ) - ) - (block - (set_local $6 - (get_local $5) - ) - (br $while-out$19) - ) - ) - (br $while-in$20) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) ) - (i32.const 24) ) + ) + (set_local $13 (i32.const 0) ) - (block - (set_local $24 - (i32.const -1) + (loop $while-in$20 + (block $while-out$19 + (if + (i32.gt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $11) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -65) + ) + ) + (i32.const 57) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (set_local $9 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (i32.add + (tee_local $5 + (i32.and + (tee_local $1 + (i32.load8_s + (i32.add + (i32.add + (i32.const 3611) + (i32.mul + (get_local $13) + (i32.const 58) + ) + ) + (get_local $1) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.const -1) + ) + (i32.const 8) + ) + (block + (set_local $11 + (get_local $9) + ) + (set_local $13 + (get_local $5) + ) + ) + (block + (set_local $6 + (get_local $5) + ) + (br $while-out$19) + ) + ) + (br $while-in$20) ) - (br $label$break$L1) - ) - ) - (set_local $5 - (i32.gt_s - (get_local $7) - (i32.const -1) ) - ) - (block $do-once$21 (if (i32.eq (i32.shr_s @@ -4189,202 +4193,244 @@ ) (i32.const 24) ) - (i32.const 19) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (set_local $5 + (i32.gt_s + (get_local $7) + (i32.const -1) ) + ) + (block $do-once$21 (if - (get_local $5) - (block - (set_local $24 - (i32.const -1) + (i32.eq + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) ) - (br $label$break$L1) + (i32.const 19) ) - (set_local $12 - (i32.const 52) - ) - ) - (block (if (get_local $5) (block - (i32.store - (i32.add - (get_local $4) - (i32.shl - (get_local $7) - (i32.const 2) + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + (set_local $12 + (i32.const 52) + ) + ) + (block + (if + (get_local $5) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (get_local $7) + (i32.const 2) + ) ) + (get_local $6) ) - (get_local $6) - ) - (set_local $5 - (i32.load - (tee_local $1 - (i32.add - (get_local $3) - (i32.shl - (get_local $7) - (i32.const 3) + (set_local $5 + (i32.load + (tee_local $1 + (i32.add + (get_local $3) + (i32.shl + (get_local $7) + (i32.const 3) + ) ) ) ) ) - ) - (set_local $1 - (i32.load offset=4 + (set_local $1 + (i32.load offset=4 + (get_local $1) + ) + ) + (i32.store + (tee_local $7 + (get_local $19) + ) + (get_local $5) + ) + (i32.store offset=4 + (get_local $7) (get_local $1) ) - ) - (i32.store - (tee_local $7 - (get_local $19) + (set_local $12 + (i32.const 52) ) - (get_local $5) - ) - (i32.store offset=4 - (get_local $7) - (get_local $1) - ) - (set_local $12 - (i32.const 52) + (br $do-once$21) ) - (br $do-once$21) ) - ) - (if - (i32.eqz - (get_local $44) - ) - (block - (set_local $24 - (i32.const 0) + (if + (i32.eqz + (get_local $44) + ) + (block + (set_local $24 + (i32.const 0) + ) + (br $label$break$L1) ) - (br $label$break$L1) ) - ) - (call $_pop_arg_336 - (get_local $19) - (get_local $6) - (get_local $2) + (call $_pop_arg_336 + (get_local $19) + (get_local $6) + (get_local $2) + ) ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 52) - ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 52) ) - (if - (i32.eqz - (get_local $44) + (block + (set_local $12 + (i32.const 0) ) - (block - (set_local $20 - (get_local $9) - ) - (set_local $1 - (get_local $17) + (if + (i32.eqz + (get_local $44) ) - (set_local $8 - (get_local $21) + (block + (set_local $20 + (get_local $9) + ) + (set_local $1 + (get_local $17) + ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) ) ) - ) - (set_local $5 - (i32.and - (i32.ne - (get_local $13) - (i32.const 0) - ) - (i32.eq - (i32.and - (tee_local $1 - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) + (set_local $5 + (i32.and + (i32.ne + (get_local $13) + (i32.const 0) + ) + (i32.eq + (i32.and + (tee_local $1 + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $11) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) ) + (i32.const 15) ) - (i32.const 15) + (i32.const 3) ) - (i32.const 3) ) ) - ) - (set_local $18 - (select - (get_local $8) - (tee_local $7 - (i32.and - (get_local $8) - (i32.const -65537) + (set_local $18 + (select + (get_local $8) + (tee_local $7 + (i32.and + (get_local $8) + (i32.const -65537) + ) ) - ) - (i32.eq - (i32.and - (get_local $8) - (i32.const 8192) + (i32.eq + (i32.and + (get_local $8) + (i32.const 8192) + ) + (i32.const 0) ) - (i32.const 0) ) ) - ) - (block $switch$24 - (block $switch-default$127 - (block $switch-case$49 - (block $switch-case$48 - (block $switch-case$47 - (block $switch-case$46 - (block $switch-case$45 - (block $switch-case$44 - (block $switch-case$43 - (block $switch-case$41 - (block $switch-case$40 - (block $switch-case$36 - (block $switch-case$35 - (block $switch-case$34 - (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 - (i32.sub - (tee_local $26 - (select - (i32.and + (block $switch$24 + (block $switch-default$127 + (block $switch-case$49 + (block $switch-case$48 + (block $switch-case$47 + (block $switch-case$46 + (block $switch-case$45 + (block $switch-case$44 + (block $switch-case$43 + (block $switch-case$41 + (block $switch-case$40 + (block $switch-case$36 + (block $switch-case$35 + (block $switch-case$34 + (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 + (i32.sub + (tee_local $26 + (select + (i32.and + (get_local $1) + (i32.const -33) + ) (get_local $1) - (i32.const -33) + (get_local $5) ) - (get_local $1) - (get_local $5) ) + (i32.const 65) ) - (i32.const 65) ) ) - ) - (block $switch-default$33 - (block $switch-case$32 - (block $switch-case$31 - (block $switch-case$30 - (block $switch-case$29 - (block $switch-case$28 - (block $switch-case$27 - (block $switch-case$26 - (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 - (i32.sub - (get_local $13) - (i32.const 0) + (block $switch-default$33 + (block $switch-case$32 + (block $switch-case$31 + (block $switch-case$30 + (block $switch-case$29 + (block $switch-case$28 + (block $switch-case$27 + (block $switch-case$26 + (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 + (i32.sub + (get_local $13) + (i32.const 0) + ) ) ) + (i32.store + (i32.load + (get_local $19) + ) + (get_local $22) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (get_local $17) + ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) (i32.store (i32.load @@ -4404,11 +4450,26 @@ (br $label$continue$L1) ) (i32.store - (i32.load - (get_local $19) + (tee_local $1 + (i32.load + (get_local $19) + ) ) (get_local $22) ) + (i32.store offset=4 + (get_local $1) + (i32.shr_s + (i32.shl + (i32.lt_s + (get_local $22) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) (set_local $20 (get_local $9) ) @@ -4420,25 +4481,13 @@ ) (br $label$continue$L1) ) - (i32.store - (tee_local $1 - (i32.load - (get_local $19) - ) + (i32.store16 + (i32.load + (get_local $19) ) - (get_local $22) - ) - (i32.store offset=4 - (get_local $1) - (i32.shr_s - (i32.shl - (i32.lt_s - (get_local $22) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.const 31) + (i32.and + (get_local $22) + (i32.const 65535) ) ) (set_local $20 @@ -4452,13 +4501,13 @@ ) (br $label$continue$L1) ) - (i32.store16 + (i32.store8 (i32.load (get_local $19) ) (i32.and (get_local $22) - (i32.const 65535) + (i32.const 255) ) ) (set_local $20 @@ -4472,14 +4521,11 @@ ) (br $label$continue$L1) ) - (i32.store8 + (i32.store (i32.load (get_local $19) ) - (i32.and - (get_local $22) - (i32.const 255) - ) + (get_local $22) ) (set_local $20 (get_local $9) @@ -4493,11 +4539,26 @@ (br $label$continue$L1) ) (i32.store - (i32.load - (get_local $19) + (tee_local $1 + (i32.load + (get_local $19) + ) ) (get_local $22) ) + (i32.store offset=4 + (get_local $1) + (i32.shr_s + (i32.shl + (i32.lt_s + (get_local $22) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) (set_local $20 (get_local $9) ) @@ -4509,27 +4570,6 @@ ) (br $label$continue$L1) ) - (i32.store - (tee_local $1 - (i32.load - (get_local $19) - ) - ) - (get_local $22) - ) - (i32.store offset=4 - (get_local $1) - (i32.shr_s - (i32.shl - (i32.lt_s - (get_local $22) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.const 31) - ) - ) (set_local $20 (get_local $9) ) @@ -4541,372 +4581,385 @@ ) (br $label$continue$L1) ) - (set_local $20 - (get_local $9) + (set_local $46 + (i32.or + (get_local $18) + (i32.const 8) + ) ) - (set_local $1 - (get_local $17) + (set_local $57 + (select + (get_local $10) + (i32.const 8) + (i32.gt_u + (get_local $10) + (i32.const 8) + ) + ) ) - (set_local $8 - (get_local $21) + (set_local $68 + (i32.const 120) + ) + (set_local $12 + (i32.const 64) ) - (br $label$continue$L1) + (br $switch$24) ) (set_local $46 - (i32.or - (get_local $18) - (i32.const 8) - ) + (get_local $18) ) (set_local $57 - (select - (get_local $10) - (i32.const 8) - (i32.gt_u - (get_local $10) - (i32.const 8) - ) - ) + (get_local $10) ) (set_local $68 - (i32.const 120) + (get_local $26) ) (set_local $12 (i32.const 64) ) (br $switch$24) ) - (set_local $46 - (get_local $18) - ) - (set_local $57 - (get_local $10) - ) - (set_local $68 - (get_local $26) - ) - (set_local $12 - (i32.const 64) - ) - (br $switch$24) - ) - (if - (i32.and - (i32.eq - (tee_local $5 - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - ) - (i32.const 0) - ) - (i32.eq - (tee_local $1 - (i32.load offset=4 - (get_local $1) - ) - ) - (i32.const 0) - ) - ) - (set_local $6 - (get_local $28) - ) - (block - (set_local $6 - (get_local $28) - ) - (loop $while-out$38 $while-in$39 - (i32.store8 - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -1) + (if + (i32.and + (i32.eq + (tee_local $5 + (i32.load + (tee_local $1 + (get_local $19) + ) ) ) - (i32.and - (i32.or - (i32.and - (get_local $5) - (i32.const 7) - ) - (i32.const 48) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load offset=4 + (get_local $1) ) - (i32.const 255) ) + (i32.const 0) ) - (if - (i32.and - (i32.eq - (tee_local $5 - (call $_bitshift64Lshr - (get_local $5) - (get_local $1) - (i32.const 3) + ) + (set_local $6 + (get_local $28) + ) + (block + (set_local $6 + (get_local $28) + ) + (loop $while-in$39 + (block $while-out$38 + (i32.store8 + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -1) ) ) - (i32.const 0) + (i32.and + (i32.or + (i32.and + (get_local $5) + (i32.const 7) + ) + (i32.const 48) + ) + (i32.const 255) + ) ) - (i32.eq - (tee_local $1 - (i32.load - (i32.const 168) + (if + (i32.and + (i32.eq + (tee_local $5 + (call $_bitshift64Lshr + (get_local $5) + (get_local $1) + (i32.const 3) + ) + ) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load + (i32.const 168) + ) + ) + (i32.const 0) ) ) - (i32.const 0) + (br $while-out$38) ) + (br $while-in$39) ) - (br $while-out$38) ) - (br $while-in$39) ) ) - ) - (set_local $58 - (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 8) - ) - (i32.const 0) - ) - (block - (set_local $34 - (get_local $18) - ) - (set_local $32 - (get_local $10) - ) - (set_local $35 + (set_local $58 + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 8) + ) (i32.const 0) ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - (block - (set_local $5 - (i32.lt_s + (block + (set_local $34 + (get_local $18) + ) + (set_local $32 (get_local $10) - (tee_local $1 - (i32.add - (i32.sub - (get_local $71) - (get_local $6) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) + ) + (block + (set_local $5 + (i32.lt_s + (get_local $10) + (tee_local $1 + (i32.add + (i32.sub + (get_local $71) + (get_local $6) + ) + (i32.const 1) ) - (i32.const 1) ) ) ) - ) - (set_local $34 - (get_local $18) - ) - (set_local $32 - (select - (get_local $1) - (get_local $10) - (get_local $5) + (set_local $34 + (get_local $18) ) + (set_local $32 + (select + (get_local $1) + (get_local $10) + (get_local $5) + ) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - ) - ) - (br $switch$24) - ) - (set_local $5 - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - ) - (if - (i32.lt_s - (tee_local $33 - (i32.load offset=4 - (get_local $1) ) ) - (i32.const 0) + (br $switch$24) ) - (block - (set_local $1 - (call $_i64Subtract - (i32.const 0) - (i32.const 0) - (get_local $5) - (get_local $33) - ) - ) - (set_local $5 - (i32.load - (i32.const 168) - ) - ) - (i32.store - (tee_local $33 + (set_local $5 + (i32.load + (tee_local $1 (get_local $19) ) - (get_local $1) - ) - (i32.store offset=4 - (get_local $33) - (get_local $5) - ) - (set_local $33 - (get_local $1) - ) - (set_local $59 - (get_local $5) - ) - (set_local $60 - (i32.const 1) - ) - (set_local $61 - (i32.const 4091) ) - (set_local $12 - (i32.const 76) - ) - (br $switch$24) ) - ) - (set_local $33 (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 2048) + (i32.lt_s + (tee_local $33 + (i32.load offset=4 + (get_local $1) + ) ) (i32.const 0) ) (block (set_local $1 - (select - (i32.const 4091) - (i32.const 4093) - (i32.eq - (tee_local $6 - (i32.and - (get_local $18) - (i32.const 1) - ) - ) - (i32.const 0) - ) + (call $_i64Subtract + (i32.const 0) + (i32.const 0) + (get_local $5) + (get_local $33) ) ) - (set_local $59 + (set_local $5 + (i32.load + (i32.const 168) + ) + ) + (i32.store + (tee_local $33 + (get_local $19) + ) + (get_local $1) + ) + (i32.store offset=4 (get_local $33) + (get_local $5) + ) + (set_local $33 + (get_local $1) + ) + (set_local $59 + (get_local $5) ) (set_local $60 - (get_local $6) + (i32.const 1) ) (set_local $61 - (get_local $1) + (i32.const 4091) + ) + (set_local $12 + (i32.const 76) + ) + (br $switch$24) + ) + ) + (set_local $33 + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 2048) + ) + (i32.const 0) + ) + (block + (set_local $1 + (select + (i32.const 4091) + (i32.const 4093) + (i32.eq + (tee_local $6 + (i32.and + (get_local $18) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + ) + (set_local $59 + (get_local $33) + ) + (set_local $60 + (get_local $6) + ) + (set_local $61 + (get_local $1) + ) + (set_local $12 + (i32.const 76) + ) + (get_local $5) ) - (set_local $12 - (i32.const 76) + (block + (set_local $59 + (get_local $33) + ) + (set_local $60 + (i32.const 1) + ) + (set_local $61 + (i32.const 4092) + ) + (set_local $12 + (i32.const 76) + ) + (get_local $5) ) - (get_local $5) ) - (block - (set_local $59 - (get_local $33) - ) - (set_local $60 - (i32.const 1) - ) - (set_local $61 - (i32.const 4092) - ) - (set_local $12 - (i32.const 76) - ) - (get_local $5) + ) + (br $switch$24) + ) + (set_local $33 + (i32.load + (tee_local $1 + (get_local $19) ) ) ) + (set_local $59 + (i32.load offset=4 + (get_local $1) + ) + ) + (set_local $60 + (i32.const 0) + ) + (set_local $61 + (i32.const 4091) + ) + (set_local $12 + (i32.const 76) + ) (br $switch$24) ) - (set_local $33 + (set_local $1 (i32.load - (tee_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (set_local $59 - (i32.load offset=4 + (i32.store8 + (get_local $72) + (i32.and (get_local $1) + (i32.const 255) ) ) - (set_local $60 + (set_local $47 + (get_local $72) + ) + (set_local $37 + (get_local $7) + ) + (set_local $42 + (i32.const 1) + ) + (set_local $43 (i32.const 0) ) - (set_local $61 + (set_local $48 (i32.const 4091) ) - (set_local $12 - (i32.const 76) + (set_local $49 + (get_local $28) ) (br $switch$24) ) - (set_local $1 - (i32.load - (get_local $19) - ) - ) - (i32.store8 - (get_local $72) - (i32.and - (get_local $1) - (i32.const 255) + (set_local $50 + (call $_strerror + (i32.load + (call $___errno_location) + ) ) ) - (set_local $47 - (get_local $72) - ) - (set_local $37 - (get_local $7) - ) - (set_local $42 - (i32.const 1) + (set_local $12 + (i32.const 82) ) - (set_local $43 + (br $switch$24) + ) + (set_local $5 + (i32.ne + (tee_local $1 + (i32.load + (get_local $19) + ) + ) (i32.const 0) ) - (set_local $48 - (i32.const 4091) - ) - (set_local $49 - (get_local $28) - ) - (br $switch$24) ) (set_local $50 - (call $_strerror - (i32.load - (call $___errno_location) - ) + (select + (get_local $1) + (i32.const 4101) + (get_local $5) ) ) (set_local $12 @@ -4914,1063 +4967,1091 @@ ) (br $switch$24) ) - (set_local $5 - (i32.ne - (tee_local $1 - (i32.load - (get_local $19) - ) - ) - (i32.const 0) + (set_local $1 + (i32.load + (get_local $19) ) ) - (set_local $50 - (select - (get_local $1) - (i32.const 4101) - (get_local $5) - ) + (i32.store + (get_local $73) + (get_local $1) ) - (set_local $12 - (i32.const 82) + (i32.store + (get_local $76) + (i32.const 0) ) - (br $switch$24) - ) - (set_local $1 - (i32.load + (i32.store (get_local $19) + (get_local $73) ) - ) - (i32.store - (get_local $73) - (get_local $1) - ) - (i32.store - (get_local $76) - (i32.const 0) - ) - (i32.store - (get_local $19) - (get_local $73) - ) - (set_local $69 - (i32.const -1) + (set_local $69 + (i32.const -1) + ) + (set_local $12 + (i32.const 86) + ) + (br $switch$24) ) (set_local $12 - (i32.const 86) - ) - (br $switch$24) - ) - (set_local $12 - (if - (i32.eq - (get_local $10) - (i32.const 0) - ) - (block - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) + (if + (i32.eq + (get_local $10) (i32.const 0) - (get_local $18) ) - (set_local $38 - (i32.const 0) + (block + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (i32.const 0) + (get_local $18) + ) + (set_local $38 + (i32.const 0) + ) + (i32.const 98) ) - (i32.const 98) - ) - (block - (set_local $69 - (get_local $10) + (block + (set_local $69 + (get_local $10) + ) + (i32.const 86) ) - (i32.const 86) ) ) + (br $switch$24) ) - (br $switch$24) - ) - (set_local $14 - (f64.load - (get_local $19) + (set_local $14 + (f64.load + (get_local $19) + ) ) - ) - (i32.store - (get_local $25) - (i32.const 0) - ) - (f64.store - (i32.load - (i32.const 24) + (i32.store + (get_local $25) + (i32.const 0) ) - (get_local $14) - ) - (set_local $51 - (if - (i32.lt_s - (i32.load offset=4 - (i32.load - (i32.const 24) - ) - ) - (i32.const 0) - ) - (block - (set_local $39 - (i32.const 4108) - ) - (set_local $14 - (f64.neg - (get_local $14) - ) - ) - (i32.const 1) + (f64.store + (i32.load + (i32.const 24) ) + (get_local $14) + ) + (set_local $51 (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 2048) - ) - (i32.const 0) - ) - (block - (set_local $39 - (select - (i32.const 4109) - (i32.const 4114) - (i32.eq - (tee_local $1 - (i32.and - (get_local $18) - (i32.const 1) - ) - ) - (i32.const 0) - ) + (i32.lt_s + (i32.load offset=4 + (i32.load + (i32.const 24) ) ) - (get_local $1) - ) - (block - (set_local $39 - (i32.const 4111) - ) - (i32.const 1) - ) - ) - ) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $14) - ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (block $do-once$56 - (if - (i32.or - (i32.lt_u - (tee_local $1 - (i32.and - (i32.load offset=4 - (i32.load - (i32.const 24) + (i32.const 0) + ) + (block + (set_local $39 + (i32.const 4108) + ) + (set_local $14 + (f64.neg + (get_local $14) + ) + ) + (i32.const 1) + ) + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 2048) + ) + (i32.const 0) + ) + (block + (set_local $39 + (select + (i32.const 4109) + (i32.const 4114) + (i32.eq + (tee_local $1 + (i32.and + (get_local $18) + (i32.const 1) + ) ) + (i32.const 0) ) - (i32.const 2146435072) ) ) - (i32.const 2146435072) + (get_local $1) ) - (i32.and - (i32.eq - (get_local $1) - (i32.const 2146435072) + (block + (set_local $39 + (i32.const 4111) ) - (i32.const 0) + (i32.const 1) ) ) - (block - (if - (tee_local $5 - (f64.ne - (tee_local $14 - (f64.mul - (call $_frexpl - (get_local $14) - (get_local $25) + ) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $14) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (block $do-once$56 + (if + (i32.or + (i32.lt_u + (tee_local $1 + (i32.and + (i32.load offset=4 + (i32.load + (i32.const 24) ) - (f64.const 2) ) + (i32.const 2146435072) ) - (f64.const 0) ) + (i32.const 2146435072) ) - (i32.store - (get_local $25) - (i32.add - (i32.load - (get_local $25) - ) - (i32.const -1) + (i32.and + (i32.eq + (get_local $1) + (i32.const 2146435072) ) + (i32.const 0) ) ) - (if - (i32.eq - (tee_local $15 - (i32.or - (get_local $26) - (i32.const 32) - ) - ) - (i32.const 97) - ) - (block - (set_local $9 - (select - (get_local $39) - (i32.add - (get_local $39) - (i32.const 9) - ) - (i32.eq - (tee_local $6 - (i32.and - (get_local $26) - (i32.const 32) + (block + (if + (tee_local $5 + (f64.ne + (tee_local $14 + (f64.mul + (call $_frexpl + (get_local $14) + (get_local $25) ) + (f64.const 2) ) - (i32.const 0) ) + (f64.const 0) ) ) - (set_local $7 - (i32.or - (get_local $51) - (i32.const 2) + (i32.store + (get_local $25) + (i32.add + (i32.load + (get_local $25) + ) + (i32.const -1) ) ) - (set_local $14 - (if + ) + (if + (i32.eq + (tee_local $15 (i32.or - (i32.gt_u - (get_local $10) - (i32.const 11) + (get_local $26) + (i32.const 32) + ) + ) + (i32.const 97) + ) + (block + (set_local $9 + (select + (get_local $39) + (i32.add + (get_local $39) + (i32.const 9) ) (i32.eq - (tee_local $1 - (i32.sub - (i32.const 12) - (get_local $10) + (tee_local $6 + (i32.and + (get_local $26) + (i32.const 32) ) ) (i32.const 0) ) ) - (get_local $14) - (block - (set_local $30 - (f64.const 8) - ) - (loop $while-out$60 $while-in$61 - (set_local $30 - (f64.mul - (get_local $30) - (f64.const 16) - ) + ) + (set_local $7 + (i32.or + (get_local $51) + (i32.const 2) + ) + ) + (set_local $14 + (if + (i32.or + (i32.gt_u + (get_local $10) + (i32.const 11) ) - (if - (i32.eq - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) - ) + (i32.eq + (tee_local $1 + (i32.sub + (i32.const 12) + (get_local $10) ) - (i32.const 0) ) - (br $while-out$60) + (i32.const 0) ) - (br $while-in$61) ) - (select - (f64.neg - (f64.add - (get_local $30) - (f64.sub - (f64.neg - (get_local $14) + (get_local $14) + (block + (set_local $30 + (f64.const 8) + ) + (loop $while-in$61 + (block $while-out$60 + (set_local $30 + (f64.mul + (get_local $30) + (f64.const 16) ) - (get_local $30) ) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 0) + ) + (br $while-out$60) + ) + (br $while-in$61) ) ) - (f64.sub - (f64.add - (get_local $14) + (select + (f64.neg + (f64.add + (get_local $30) + (f64.sub + (f64.neg + (get_local $14) + ) + (get_local $30) + ) + ) + ) + (f64.sub + (f64.add + (get_local $14) + (get_local $30) + ) (get_local $30) ) - (get_local $30) - ) - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 45) ) - (i32.const 45) ) ) ) ) - ) - (set_local $5 - (i32.lt_s - (tee_local $1 - (i32.load - (get_local $25) + (set_local $5 + (i32.lt_s + (tee_local $1 + (i32.load + (get_local $25) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.shr_s - (i32.shl - (i32.lt_s - (tee_local $8 - (select - (i32.sub - (i32.const 0) + (set_local $5 + (i32.shr_s + (i32.shl + (i32.lt_s + (tee_local $8 + (select + (i32.sub + (i32.const 0) + (get_local $1) + ) (get_local $1) + (get_local $5) ) - (get_local $1) - (get_local $5) ) + (i32.const 0) ) - (i32.const 0) + (i32.const 31) ) (i32.const 31) ) - (i32.const 31) ) - ) - (i32.store8 - (i32.add - (tee_local $5 - (if - (i32.eq - (tee_local $5 - (call $_fmt_u - (get_local $8) - (get_local $5) - (get_local $52) + (i32.store8 + (i32.add + (tee_local $5 + (if + (i32.eq + (tee_local $5 + (call $_fmt_u + (get_local $8) + (get_local $5) + (get_local $52) + ) ) + (get_local $52) ) - (get_local $52) - ) - (block - (i32.store8 + (block + (i32.store8 + (get_local $74) + (i32.const 48) + ) (get_local $74) - (i32.const 48) ) - (get_local $74) + (get_local $5) ) - (get_local $5) ) + (i32.const -1) ) - (i32.const -1) - ) - (i32.and - (i32.add - (i32.and - (i32.shr_s - (get_local $1) - (i32.const 31) + (i32.and + (i32.add + (i32.and + (i32.shr_s + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 43) ) - (i32.const 43) + (i32.const 255) ) - (i32.const 255) ) - ) - (i32.store8 - (tee_local $8 - (i32.add - (get_local $5) - (i32.const -2) + (i32.store8 + (tee_local $8 + (i32.add + (get_local $5) + (i32.const -2) + ) ) - ) - (i32.and - (i32.add - (get_local $26) - (i32.const 15) + (i32.and + (i32.add + (get_local $26) + (i32.const 15) + ) + (i32.const 255) ) - (i32.const 255) ) - ) - (set_local $5 - (i32.lt_s - (get_local $10) - (i32.const 1) + (set_local $5 + (i32.lt_s + (get_local $10) + (i32.const 1) + ) ) - ) - (set_local $13 - (i32.eq - (i32.and - (get_local $18) - (i32.const 8) + (set_local $13 + (i32.eq + (i32.and + (get_local $18) + (i32.const 8) + ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $11 - (get_local $29) - ) - (loop $while-out$62 $while-in$63 - (i32.store8 - (get_local $11) - (i32.and - (i32.or + (set_local $11 + (get_local $29) + ) + (loop $while-in$63 + (block $while-out$62 + (i32.store8 + (get_local $11) (i32.and - (i32.load8_s - (i32.add - (tee_local $1 - (call_import $f64-to-int - (get_local $14) + (i32.or + (i32.and + (i32.load8_s + (i32.add + (tee_local $1 + (call_import $f64-to-int + (get_local $14) + ) + ) + (i32.const 4075) ) ) - (i32.const 4075) + (i32.const 255) ) + (get_local $6) ) (i32.const 255) ) - (get_local $6) ) - (i32.const 255) - ) - ) - (set_local $14 - (f64.mul - (f64.sub - (get_local $14) - (f64.convert_s/i32 - (get_local $1) + (set_local $14 + (f64.mul + (f64.sub + (get_local $14) + (f64.convert_s/i32 + (get_local $1) + ) + ) + (f64.const 16) ) ) - (f64.const 16) - ) - ) - (set_local $11 - (block $do-once$64 - (if - (i32.eq - (i32.sub - (tee_local $1 - (i32.add - (get_local $11) - (i32.const 1) + (set_local $11 + (block $do-once$64 + (if + (i32.eq + (i32.sub + (tee_local $1 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (get_local $64) ) + (i32.const 1) ) - (get_local $64) - ) - (i32.const 1) - ) - (block - (br_if $do-once$64 - (get_local $1) - (i32.and - (get_local $13) - (i32.and - (get_local $5) - (f64.eq - (get_local $14) - (f64.const 0) + (block + (br_if $do-once$64 + (get_local $1) + (i32.and + (get_local $13) + (i32.and + (get_local $5) + (f64.eq + (get_local $14) + (f64.const 0) + ) + ) ) ) + (i32.store8 + (get_local $1) + (i32.const 46) + ) + (i32.add + (get_local $11) + (i32.const 2) + ) ) - ) - (i32.store8 (get_local $1) - (i32.const 46) ) - (i32.add + ) + ) + (if + (f64.eq + (get_local $14) + (f64.const 0) + ) + (block + (set_local $1 (get_local $11) - (i32.const 2) ) + (br $while-out$62) ) - (get_local $1) ) + (br $while-in$63) ) ) - (if - (f64.eq - (get_local $14) - (f64.const 0) - ) - (block - (set_local $1 - (get_local $11) + (set_local $5 + (i32.and + (i32.ne + (get_local $10) + (i32.const 0) ) - (br $while-out$62) - ) - ) - (br $while-in$63) - ) - (set_local $5 - (i32.and - (i32.ne - (get_local $10) - (i32.const 0) - ) - (i32.lt_s - (i32.add - (get_local $78) - (get_local $1) + (i32.lt_s + (i32.add + (get_local $78) + (get_local $1) + ) + (get_local $10) ) - (get_local $10) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $5 - (i32.add - (tee_local $6 - (select - (i32.sub - (i32.add - (get_local $79) - (get_local $10) - ) - (get_local $8) - ) - (i32.add + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $5 + (i32.add + (tee_local $6 + (select (i32.sub - (get_local $77) + (i32.add + (get_local $79) + (get_local $10) + ) (get_local $8) ) - (get_local $1) + (i32.add + (i32.sub + (get_local $77) + (get_local $8) + ) + (get_local $1) + ) + (get_local $5) ) - (get_local $5) ) + (get_local $7) ) - (get_local $7) - ) - ) - (get_local $18) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) ) - (i32.const 0) - ) - (call $___fwritex - (get_local $9) - (get_local $7) - (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $16) - (get_local $5) - (i32.xor (get_local $18) - (i32.const 65536) - ) - ) - (set_local $1 - (i32.sub - (get_local $1) - (get_local $64) ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $9) + (get_local $7) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $29) - (get_local $1) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $16) + (get_local $5) + (i32.xor + (get_local $18) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.sub - (get_local $6) - (i32.add + (set_local $1 + (i32.sub (get_local $1) - (tee_local $1 - (i32.sub - (get_local $40) - (get_local $8) + (get_local $64) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) + (i32.const 0) + ) + (call $___fwritex + (get_local $29) + (get_local $1) + (get_local $0) ) ) - (i32.const 0) - (i32.const 0) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.sub + (get_local $6) + (i32.add + (get_local $1) + (tee_local $1 + (i32.sub + (get_local $40) + (get_local $8) + ) + ) ) - (i32.const 32) ) (i32.const 0) + (i32.const 0) ) - (call $___fwritex - (get_local $8) - (get_local $1) - (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $5) - (i32.xor - (get_local $18) - (i32.const 8192) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (get_local $1) + (get_local $0) + ) ) - ) - (br $do-once$56 - (select + (call $_pad + (get_local $0) + (i32.const 32) (get_local $16) (get_local $5) - (i32.lt_s - (get_local $5) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (br $do-once$56 + (select (get_local $16) + (get_local $5) + (i32.lt_s + (get_local $5) + (get_local $16) + ) ) ) ) ) - ) - (set_local $1 - (select - (i32.const 6) - (get_local $10) - (i32.lt_s + (set_local $1 + (select + (i32.const 6) (get_local $10) - (i32.const 0) + (i32.lt_s + (get_local $10) + (i32.const 0) + ) ) ) - ) - (set_local $62 - (tee_local $9 - (select - (get_local $80) - (get_local $81) - (i32.lt_s - (if - (get_local $5) - (block - (i32.store - (get_local $25) - (tee_local $5 - (i32.add - (i32.load - (get_local $25) + (set_local $62 + (tee_local $9 + (select + (get_local $80) + (get_local $81) + (i32.lt_s + (if + (get_local $5) + (block + (i32.store + (get_local $25) + (tee_local $5 + (i32.add + (i32.load + (get_local $25) + ) + (i32.const -28) ) - (i32.const -28) ) ) - ) - (set_local $14 - (f64.mul - (get_local $14) - (f64.const 268435456) + (set_local $14 + (f64.mul + (get_local $14) + (f64.const 268435456) + ) ) + (get_local $5) + ) + (i32.load + (get_local $25) ) - (get_local $5) - ) - (i32.load - (get_local $25) ) + (i32.const 0) ) - (i32.const 0) - ) - ) - ) - ) - (set_local $7 - (get_local $9) - ) - (loop $while-out$66 $while-in$67 - (i32.store - (get_local $7) - (tee_local $5 - (call_import $f64-to-int - (get_local $14) ) ) ) (set_local $7 - (i32.add - (get_local $7) - (i32.const 4) - ) + (get_local $9) ) - (if - (f64.eq - (tee_local $14 - (f64.mul - (f64.sub + (loop $while-in$67 + (block $while-out$66 + (i32.store + (get_local $7) + (tee_local $5 + (call_import $f64-to-int (get_local $14) - (f64.convert_u/i32 - (get_local $5) - ) ) - (f64.const 1e9) ) ) - (f64.const 0) - ) - (block - (set_local $6 - (get_local $7) - ) - (br $while-out$66) - ) - ) - (br $while-in$67) - ) - (if - (i32.gt_s - (tee_local $5 - (i32.load - (get_local $25) + (set_local $7 + (i32.add + (get_local $7) + (i32.const 4) + ) ) - ) - (i32.const 0) - ) - (block - (set_local $8 - (get_local $9) - ) - (set_local $13 - (get_local $6) - ) - (loop $while-out$68 $while-in$69 - (set_local $11 - (select - (i32.const 29) - (get_local $5) - (i32.gt_s - (get_local $5) - (i32.const 29) + (if + (f64.eq + (tee_local $14 + (f64.mul + (f64.sub + (get_local $14) + (f64.convert_u/i32 + (get_local $5) + ) + ) + (f64.const 1e9) + ) ) + (f64.const 0) + ) + (block + (set_local $6 + (get_local $7) + ) + (br $while-out$66) + ) + ) + (br $while-in$67) + ) + ) + (if + (i32.gt_s + (tee_local $5 + (i32.load + (get_local $25) ) ) - (set_local $7 - (block $do-once$70 - (if - (i32.lt_u - (tee_local $7 - (i32.add - (get_local $13) - (i32.const -4) - ) + (i32.const 0) + ) + (block + (set_local $8 + (get_local $9) + ) + (set_local $13 + (get_local $6) + ) + (loop $while-in$69 + (block $while-out$68 + (set_local $11 + (select + (i32.const 29) + (get_local $5) + (i32.gt_s + (get_local $5) + (i32.const 29) ) - (get_local $8) ) - (get_local $8) - (block - (set_local $5 - (i32.const 0) - ) - (set_local $10 - (get_local $7) - ) - (loop $while-out$72 $while-in$73 - (set_local $6 - (call $___uremdi3 - (tee_local $5 - (call $_i64Add - (call $_bitshift64Shl - (i32.load - (get_local $10) + ) + (set_local $7 + (block $do-once$70 + (if + (i32.lt_u + (tee_local $7 + (i32.add + (get_local $13) + (i32.const -4) + ) + ) + (get_local $8) + ) + (get_local $8) + (block + (set_local $5 + (i32.const 0) + ) + (set_local $10 + (get_local $7) + ) + (loop $while-in$73 + (block $while-out$72 + (set_local $6 + (call $___uremdi3 + (tee_local $5 + (call $_i64Add + (call $_bitshift64Shl + (i32.load + (get_local $10) + ) + (i32.const 0) + (get_local $11) + ) + (i32.load + (i32.const 168) + ) + (get_local $5) + (i32.const 0) + ) ) + (tee_local $7 + (i32.load + (i32.const 168) + ) + ) + (i32.const 1000000000) (i32.const 0) - (get_local $11) ) - (i32.load - (i32.const 168) + ) + (i32.store + (get_local $10) + (get_local $6) + ) + (set_local $5 + (call $___udivdi3 + (get_local $5) + (get_local $7) + (i32.const 1000000000) + (i32.const 0) ) - (get_local $5) - (i32.const 0) ) - ) - (tee_local $7 - (i32.load - (i32.const 168) + (if + (i32.lt_u + (tee_local $7 + (i32.add + (get_local $10) + (i32.const -4) + ) + ) + (get_local $8) + ) + (br $while-out$72) + (set_local $10 + (get_local $7) + ) ) + (br $while-in$73) ) - (i32.const 1000000000) - (i32.const 0) ) - ) - (i32.store - (get_local $10) - (get_local $6) - ) - (set_local $5 - (call $___udivdi3 - (get_local $5) - (get_local $7) - (i32.const 1000000000) - (i32.const 0) + (br_if $do-once$70 + (get_local $8) + (i32.eq + (get_local $5) + (i32.const 0) + ) ) - ) - (if - (i32.lt_u + (i32.store (tee_local $7 (i32.add - (get_local $10) + (get_local $8) (i32.const -4) ) ) - (get_local $8) - ) - (br $while-out$72) - (set_local $10 - (get_local $7) + (get_local $5) ) + (get_local $7) ) - (br $while-in$73) ) - (br_if $do-once$70 - (get_local $8) - (i32.eq - (get_local $5) - (i32.const 0) + ) + ) + (loop $while-in$75 + (block $while-out$74 + (if + (i32.le_u + (get_local $13) + (get_local $7) ) + (br $while-out$74) ) - (i32.store - (tee_local $7 - (i32.add - (get_local $8) - (i32.const -4) + (if + (i32.eq + (i32.load + (tee_local $5 + (i32.add + (get_local $13) + (i32.const -4) + ) + ) ) + (i32.const 0) ) - (get_local $5) + (set_local $13 + (get_local $5) + ) + (br $while-out$74) ) - (get_local $7) + (br $while-in$75) ) ) - ) - ) - (loop $while-out$74 $while-in$75 - (if - (i32.le_u - (get_local $13) - (get_local $7) - ) - (br $while-out$74) - ) - (if - (i32.eq - (i32.load - (tee_local $5 - (i32.add - (get_local $13) - (i32.const -4) + (i32.store + (get_local $25) + (tee_local $5 + (i32.sub + (i32.load + (get_local $25) ) + (get_local $11) ) ) - (i32.const 0) ) - (set_local $13 - (get_local $5) - ) - (br $while-out$74) - ) - (br $while-in$75) - ) - (i32.store - (get_local $25) - (tee_local $5 - (i32.sub - (i32.load - (get_local $25) + (if + (i32.gt_s + (get_local $5) + (i32.const 0) ) - (get_local $11) - ) - ) - ) - (if - (i32.gt_s - (get_local $5) - (i32.const 0) - ) - (set_local $8 - (get_local $7) - ) - (block - (set_local $6 - (get_local $13) - ) - (br $while-out$68) - ) - ) - (br $while-in$69) - ) - ) - (set_local $7 - (get_local $9) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $8 - (i32.add - (i32.and - (call_import $i32s-div - (i32.add - (get_local $1) - (i32.const 25) + (set_local $8 + (get_local $7) + ) + (block + (set_local $6 + (get_local $13) + ) + (br $while-out$68) ) - (i32.const 9) ) - (i32.const -1) + (br $while-in$69) ) - (i32.const 1) ) ) - (set_local $10 - (i32.eq - (get_local $15) - (i32.const 102) - ) + (set_local $7 + (get_local $9) ) - (set_local $23 - (get_local $6) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) ) - (loop $while-out$76 $while-in$77 - (set_local $5 - (i32.gt_s - (tee_local $6 - (i32.sub - (i32.const 0) - (get_local $5) + (block + (set_local $8 + (i32.add + (i32.and + (call_import $i32s-div + (i32.add + (get_local $1) + (i32.const 25) + ) + (i32.const 9) ) + (i32.const -1) ) - (i32.const 9) + (i32.const 1) ) ) - (set_local $13 - (select - (i32.const 9) - (get_local $6) - (get_local $5) + (set_local $10 + (i32.eq + (get_local $15) + (i32.const 102) ) ) - (set_local $11 - (block $do-once$78 - (if - (i32.lt_u - (get_local $7) - (get_local $23) - ) - (block - (set_local $70 - (i32.add - (i32.shl - (i32.const 1) - (get_local $13) - ) - (i32.const -1) + (set_local $23 + (get_local $6) + ) + (loop $while-in$77 + (block $while-out$76 + (set_local $5 + (i32.gt_s + (tee_local $6 + (i32.sub + (i32.const 0) + (get_local $5) ) ) - (set_local $27 - (i32.shr_u - (i32.const 1000000000) - (get_local $13) + (i32.const 9) + ) + ) + (set_local $13 + (select + (i32.const 9) + (get_local $6) + (get_local $5) + ) + ) + (set_local $11 + (block $do-once$78 + (if + (i32.lt_u + (get_local $7) + (get_local $23) ) - ) - (set_local $11 - (i32.const 0) - ) - (set_local $17 - (get_local $7) - ) - (loop $while-out$80 $while-in$81 - (set_local $6 - (i32.and - (tee_local $5 - (i32.load - (get_local $17) + (block + (set_local $70 + (i32.add + (i32.shl + (i32.const 1) + (get_local $13) ) + (i32.const -1) ) - (get_local $70) ) - ) - (i32.store - (get_local $17) - (i32.add + (set_local $27 (i32.shr_u - (get_local $5) + (i32.const 1000000000) (get_local $13) ) - (get_local $11) ) - ) - (set_local $11 - (i32.mul - (get_local $6) - (get_local $27) + (set_local $11 + (i32.const 0) ) - ) - (if - (i32.ge_u - (tee_local $17 - (i32.add + (set_local $17 + (get_local $7) + ) + (loop $while-in$81 + (block $while-out$80 + (set_local $6 + (i32.and + (tee_local $5 + (i32.load + (get_local $17) + ) + ) + (get_local $70) + ) + ) + (i32.store (get_local $17) + (i32.add + (i32.shr_u + (get_local $5) + (get_local $13) + ) + (get_local $11) + ) + ) + (set_local $11 + (i32.mul + (get_local $6) + (get_local $27) + ) + ) + (if + (i32.ge_u + (tee_local $17 + (i32.add + (get_local $17) + (i32.const 4) + ) + ) + (get_local $23) + ) + (br $while-out$80) + ) + (br $while-in$81) + ) + ) + (set_local $5 + (select + (i32.add + (get_local $7) (i32.const 4) ) + (get_local $7) + (i32.eq + (i32.load + (get_local $7) + ) + (i32.const 0) + ) + ) + ) + (if + (i32.eq + (get_local $11) + (i32.const 0) + ) + (br $do-once$78 + (get_local $5) ) + ) + (i32.store (get_local $23) + (get_local $11) ) - (br $while-out$80) + (set_local $23 + (i32.add + (get_local $23) + (i32.const 4) + ) + ) + (get_local $5) ) - (br $while-in$81) - ) - (set_local $5 (select (i32.add (get_local $7) @@ -5985,1237 +6066,1175 @@ ) ) ) - (if - (i32.eq - (get_local $11) - (i32.const 0) - ) - (br $do-once$78 - (get_local $5) - ) - ) - (i32.store - (get_local $23) - (get_local $11) - ) - (set_local $23 - (i32.add + ) + ) + (set_local $5 + (i32.gt_s + (i32.shr_s + (i32.sub (get_local $23) - (i32.const 4) + (tee_local $7 + (select + (get_local $9) + (get_local $11) + (get_local $10) + ) + ) ) + (i32.const 2) ) - (get_local $5) + (get_local $8) ) + ) + (set_local $6 (select (i32.add (get_local $7) - (i32.const 4) - ) - (get_local $7) - (i32.eq - (i32.load - (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) ) - (i32.const 0) ) + (get_local $23) + (get_local $5) ) ) - ) - ) - (set_local $5 - (i32.gt_s - (i32.shr_s - (i32.sub - (get_local $23) - (tee_local $7 - (select - (get_local $9) - (get_local $11) - (get_local $10) + (i32.store + (get_local $25) + (tee_local $5 + (i32.add + (i32.load + (get_local $25) ) + (get_local $13) ) ) - (i32.const 2) ) - (get_local $8) - ) - ) - (set_local $6 - (select - (i32.add - (get_local $7) - (i32.shl - (get_local $8) - (i32.const 2) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) ) - ) - (get_local $23) - (get_local $5) - ) - ) - (i32.store - (get_local $25) - (tee_local $5 - (i32.add - (i32.load - (get_local $25) + (block + (set_local $7 + (get_local $11) + ) + (set_local $23 + (get_local $6) + ) ) - (get_local $13) - ) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $7 - (get_local $11) - ) - (set_local $23 - (get_local $6) - ) - ) - (block - (set_local $7 - (get_local $11) - ) - (set_local $27 - (get_local $6) - ) - (br $while-out$76) - ) - ) - (br $while-in$77) - ) - ) - (set_local $27 - (get_local $6) - ) - ) - (block $do-once$82 - (if - (i32.lt_u - (get_local $7) - (get_local $27) - ) - (block - (set_local $6 - (i32.mul - (i32.shr_s - (i32.sub - (get_local $62) - (get_local $7) + (block + (set_local $7 + (get_local $11) + ) + (set_local $27 + (get_local $6) + ) + (br $while-out$76) ) - (i32.const 2) ) - (i32.const 9) + (br $while-in$77) ) ) - (if - (i32.lt_u - (tee_local $5 - (i32.load - (get_local $7) - ) - ) - (i32.const 10) - ) - (block - (set_local $13 - (get_local $6) - ) - (br $do-once$82) - ) - (set_local $8 - (i32.const 10) - ) + ) + (set_local $27 + (get_local $6) + ) + ) + (block $do-once$82 + (if + (i32.lt_u + (get_local $7) + (get_local $27) ) - (loop $while-out$84 $while-in$85 + (block (set_local $6 - (i32.add - (get_local $6) - (i32.const 1) + (i32.mul + (i32.shr_s + (i32.sub + (get_local $62) + (get_local $7) + ) + (i32.const 2) + ) + (i32.const 9) ) ) (if (i32.lt_u - (get_local $5) - (tee_local $8 - (i32.mul - (get_local $8) - (i32.const 10) + (tee_local $5 + (i32.load + (get_local $7) ) ) + (i32.const 10) ) (block (set_local $13 (get_local $6) ) - (br $while-out$84) + (br $do-once$82) + ) + (set_local $8 + (i32.const 10) + ) + ) + (loop $while-in$85 + (block $while-out$84 + (set_local $6 + (i32.add + (get_local $6) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (get_local $5) + (tee_local $8 + (i32.mul + (get_local $8) + (i32.const 10) + ) + ) + ) + (block + (set_local $13 + (get_local $6) + ) + (br $while-out$84) + ) + ) + (br $while-in$85) ) ) - (br $while-in$85) ) - ) - (set_local $13 - (i32.const 0) + (set_local $13 + (i32.const 0) + ) ) ) - ) - (set_local $7 - (if - (i32.lt_s - (tee_local $5 - (i32.add - (i32.sub - (get_local $1) - (select - (get_local $13) - (i32.const 0) - (i32.ne - (get_local $15) - (i32.const 102) + (set_local $7 + (if + (i32.lt_s + (tee_local $5 + (i32.add + (i32.sub + (get_local $1) + (select + (get_local $13) + (i32.const 0) + (i32.ne + (get_local $15) + (i32.const 102) + ) ) ) - ) - (i32.shr_s - (i32.shl - (i32.and - (tee_local $70 - (i32.ne - (get_local $1) - (i32.const 0) + (i32.shr_s + (i32.shl + (i32.and + (tee_local $70 + (i32.ne + (get_local $1) + (i32.const 0) + ) ) - ) - (tee_local $8 - (i32.eq - (get_local $15) - (i32.const 103) + (tee_local $8 + (i32.eq + (get_local $15) + (i32.const 103) + ) ) ) + (i32.const 31) ) (i32.const 31) ) - (i32.const 31) ) ) - ) - (i32.add - (i32.mul - (i32.shr_s - (i32.sub - (get_local $27) - (get_local $62) + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (get_local $27) + (get_local $62) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 9) ) - (i32.const 9) + (i32.const -9) ) - (i32.const -9) ) - ) - (block - (set_local $6 - (i32.add + (block + (set_local $6 (i32.add - (get_local $9) - (i32.const 4) - ) - (i32.shl (i32.add - (i32.and - (call_import $i32s-div - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 9216) + (get_local $9) + (i32.const 4) + ) + (i32.shl + (i32.add + (i32.and + (call_import $i32s-div + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 9216) + ) ) + (i32.const 9) ) - (i32.const 9) + (i32.const -1) ) - (i32.const -1) + (i32.const -1024) ) - (i32.const -1024) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (if - (i32.lt_s - (tee_local $11 - (i32.add - (i32.and - (call_import $i32s-rem - (get_local $5) - (i32.const 9) + (if + (i32.lt_s + (tee_local $11 + (i32.add + (i32.and + (call_import $i32s-rem + (get_local $5) + (i32.const 9) + ) + (i32.const -1) ) - (i32.const -1) + (i32.const 1) ) - (i32.const 1) ) + (i32.const 9) ) - (i32.const 9) - ) - (block - (set_local $5 - (i32.const 10) - ) - (loop $while-out$86 $while-in$87 + (block (set_local $5 - (i32.mul - (get_local $5) - (i32.const 10) - ) + (i32.const 10) ) - (if - (i32.eq - (tee_local $11 - (i32.add - (get_local $11) - (i32.const 1) + (loop $while-in$87 + (block $while-out$86 + (set_local $5 + (i32.mul + (get_local $5) + (i32.const 10) ) ) - (i32.const 9) - ) - (block - (set_local $17 - (get_local $5) + (if + (i32.eq + (tee_local $11 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (i32.const 9) + ) + (block + (set_local $17 + (get_local $5) + ) + (br $while-out$86) + ) ) - (br $while-out$86) + (br $while-in$87) ) ) - (br $while-in$87) + ) + (set_local $17 + (i32.const 10) ) ) - (set_local $17 - (i32.const 10) - ) - ) - (block $do-once$88 - (if - (i32.eqz - (i32.and - (tee_local $11 - (i32.eq - (i32.add - (get_local $6) - (i32.const 4) - ) - (get_local $27) - ) - ) - (i32.eq - (tee_local $15 - (i32.and - (call_import $i32u-rem - (tee_local $5 - (i32.load - (get_local $6) - ) - ) - (get_local $17) + (block $do-once$88 + (if + (i32.eqz + (i32.and + (tee_local $11 + (i32.eq + (i32.add + (get_local $6) + (i32.const 4) ) - (i32.const -1) + (get_local $27) ) ) - (i32.const 0) - ) - ) - ) - (block - (set_local $14 - (select - (f64.const 9007199254740992) - (f64.const 9007199254740994) (i32.eq - (i32.and + (tee_local $15 (i32.and - (call_import $i32u-div - (get_local $5) + (call_import $i32u-rem + (tee_local $5 + (i32.load + (get_local $6) + ) + ) (get_local $17) ) (i32.const -1) ) - (i32.const 1) ) (i32.const 0) ) ) ) - (set_local $30 - (if - (i32.lt_u - (get_local $15) - (tee_local $10 + (block + (set_local $14 + (select + (f64.const 9007199254740992) + (f64.const 9007199254740994) + (i32.eq (i32.and - (call_import $i32s-div - (get_local $17) - (i32.const 2) + (i32.and + (call_import $i32u-div + (get_local $5) + (get_local $17) + ) + (i32.const -1) ) - (i32.const -1) + (i32.const 1) ) + (i32.const 0) ) ) - (f64.const 0.5) - (select - (f64.const 1) - (f64.const 1.5) - (i32.and - (get_local $11) - (i32.eq - (get_local $15) - (get_local $10) + ) + (set_local $30 + (if + (i32.lt_u + (get_local $15) + (tee_local $10 + (i32.and + (call_import $i32s-div + (get_local $17) + (i32.const 2) + ) + (i32.const -1) + ) + ) + ) + (f64.const 0.5) + (select + (f64.const 1) + (f64.const 1.5) + (i32.and + (get_local $11) + (i32.eq + (get_local $15) + (get_local $10) + ) ) ) ) ) - ) - (set_local $14 - (block $do-once$90 - (if - (i32.eq - (get_local $51) - (i32.const 0) - ) - (get_local $14) - (block - (if - (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $39) + (set_local $14 + (block $do-once$90 + (if + (i32.eq + (get_local $51) + (i32.const 0) + ) + (get_local $14) + (block + (if + (i32.ne + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $39) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 45) + ) + (br $do-once$90 + (get_local $14) ) - (i32.const 45) ) - (br $do-once$90 - (get_local $14) + (set_local $30 + (f64.neg + (get_local $30) + ) ) - ) - (set_local $30 (f64.neg - (get_local $30) + (get_local $14) ) ) - (f64.neg - (get_local $14) - ) ) ) ) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.sub - (get_local $5) - (get_local $15) + (i32.store + (get_local $6) + (tee_local $5 + (i32.sub + (get_local $5) + (get_local $15) + ) ) ) - ) - (if - (f64.eq - (f64.add + (if + (f64.eq + (f64.add + (get_local $14) + (get_local $30) + ) (get_local $14) - (get_local $30) ) - (get_local $14) + (br $do-once$88) ) - (br $do-once$88) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.add - (get_local $5) - (get_local $17) + (i32.store + (get_local $6) + (tee_local $5 + (i32.add + (get_local $5) + (get_local $17) + ) ) ) - ) - (if - (i32.gt_u - (get_local $5) - (i32.const 999999999) - ) - (loop $while-out$92 $while-in$93 - (i32.store - (get_local $6) - (i32.const 0) + (if + (i32.gt_u + (get_local $5) + (i32.const 999999999) ) - (set_local $7 - (if - (i32.lt_u - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -4) + (loop $while-in$93 + (block $while-out$92 + (i32.store + (get_local $6) + (i32.const 0) + ) + (set_local $7 + (if + (i32.lt_u + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -4) + ) + ) + (get_local $7) + ) + (block + (i32.store + (tee_local $5 + (i32.add + (get_local $7) + (i32.const -4) + ) + ) + (i32.const 0) + ) + (get_local $5) ) + (get_local $7) ) - (get_local $7) ) - (block - (i32.store - (tee_local $5 - (i32.add - (get_local $7) - (i32.const -4) + (i32.store + (get_local $6) + (tee_local $5 + (i32.add + (i32.load + (get_local $6) ) + (i32.const 1) ) - (i32.const 0) ) - (get_local $5) ) - (get_local $7) - ) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.add - (i32.load - (get_local $6) + (if + (i32.le_u + (get_local $5) + (i32.const 999999999) ) - (i32.const 1) + (br $while-out$92) ) + (br $while-in$93) ) ) - (if - (i32.le_u - (get_local $5) - (i32.const 999999999) - ) - (br $while-out$92) - ) - (br $while-in$93) - ) - ) - (set_local $11 - (i32.mul - (i32.shr_s - (i32.sub - (get_local $62) - (get_local $7) - ) - (i32.const 2) - ) - (i32.const 9) - ) - ) - (if - (i32.lt_u - (tee_local $5 - (i32.load - (get_local $7) - ) - ) - (i32.const 10) - ) - (block - (set_local $13 - (get_local $11) - ) - (br $do-once$88) ) - (set_local $10 - (i32.const 10) - ) - ) - (loop $while-out$94 $while-in$95 (set_local $11 - (i32.add - (get_local $11) - (i32.const 1) + (i32.mul + (i32.shr_s + (i32.sub + (get_local $62) + (get_local $7) + ) + (i32.const 2) + ) + (i32.const 9) ) ) (if (i32.lt_u - (get_local $5) - (tee_local $10 - (i32.mul - (get_local $10) - (i32.const 10) + (tee_local $5 + (i32.load + (get_local $7) ) ) + (i32.const 10) ) (block (set_local $13 (get_local $11) ) - (br $while-out$94) + (br $do-once$88) + ) + (set_local $10 + (i32.const 10) + ) + ) + (loop $while-in$95 + (block $while-out$94 + (set_local $11 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (get_local $5) + (tee_local $10 + (i32.mul + (get_local $10) + (i32.const 10) + ) + ) + ) + (block + (set_local $13 + (get_local $11) + ) + (br $while-out$94) + ) + ) + (br $while-in$95) ) ) - (br $while-in$95) ) ) ) - ) - (set_local $6 - (i32.gt_u - (get_local $27) - (tee_local $5 - (i32.add - (get_local $6) - (i32.const 4) + (set_local $6 + (i32.gt_u + (get_local $27) + (tee_local $5 + (i32.add + (get_local $6) + (i32.const 4) + ) ) ) ) + (set_local $6 + (select + (get_local $5) + (get_local $27) + (get_local $6) + ) + ) + (get_local $7) ) - (set_local $6 - (select - (get_local $5) + (block + (set_local $6 (get_local $27) - (get_local $6) ) + (get_local $7) ) - (get_local $7) - ) - (block - (set_local $6 - (get_local $27) - ) - (get_local $7) ) ) - ) - (set_local $27 - (i32.sub - (i32.const 0) - (get_local $13) - ) - ) - (loop $while-out$96 $while-in$97 - (if - (i32.le_u - (get_local $6) - (get_local $7) - ) - (block - (set_local $11 - (i32.const 0) - ) - (set_local $23 - (get_local $6) - ) - (br $while-out$96) + (set_local $27 + (i32.sub + (i32.const 0) + (get_local $13) ) ) - (if - (i32.eq - (i32.load - (tee_local $5 - (i32.add + (loop $while-in$97 + (block $while-out$96 + (if + (i32.le_u + (get_local $6) + (get_local $7) + ) + (block + (set_local $11 + (i32.const 0) + ) + (set_local $23 (get_local $6) - (i32.const -4) ) + (br $while-out$96) ) ) - (i32.const 0) - ) - (set_local $6 - (get_local $5) - ) - (block - (set_local $11 - (i32.const 1) - ) - (set_local $23 - (get_local $6) + (if + (i32.eq + (i32.load + (tee_local $5 + (i32.add + (get_local $6) + (i32.const -4) + ) + ) + ) + (i32.const 0) + ) + (set_local $6 + (get_local $5) + ) + (block + (set_local $11 + (i32.const 1) + ) + (set_local $23 + (get_local $6) + ) + (br $while-out$96) + ) ) - (br $while-out$96) + (br $while-in$97) ) ) - (br $while-in$97) - ) - (set_local $8 - (block $do-once$98 - (if - (get_local $8) - (block - (set_local $8 - (if - (i32.and - (i32.gt_s - (tee_local $1 - (i32.add - (i32.xor - (i32.and - (get_local $70) + (set_local $8 + (block $do-once$98 + (if + (get_local $8) + (block + (set_local $8 + (if + (i32.and + (i32.gt_s + (tee_local $1 + (i32.add + (i32.xor + (i32.and + (get_local $70) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) + (get_local $1) ) - (get_local $1) ) + (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 - (set_local $10 - (i32.add - (get_local $26) - (i32.const -1) + (block + (set_local $10 + (i32.add + (get_local $26) + (i32.const -1) + ) + ) + (i32.sub + (i32.add + (get_local $1) + (i32.const -1) + ) + (get_local $13) ) ) - (i32.sub + (block + (set_local $10 + (i32.add + (get_local $26) + (i32.const -2) + ) + ) (i32.add (get_local $1) (i32.const -1) ) - (get_local $13) ) ) - (block - (set_local $10 - (i32.add - (get_local $26) - (i32.const -2) + ) + (if + (i32.ne + (tee_local $1 + (i32.and + (get_local $18) + (i32.const 8) ) ) - (i32.add - (get_local $1) - (i32.const -1) - ) + (i32.const 0) ) - ) - ) - (if - (i32.ne - (tee_local $1 - (i32.and - (get_local $18) - (i32.const 8) + (block + (set_local $15 + (get_local $8) + ) + (set_local $26 + (get_local $10) + ) + (br $do-once$98 + (get_local $1) ) - ) - (i32.const 0) - ) - (block - (set_local $15 - (get_local $8) - ) - (set_local $26 - (get_local $10) - ) - (br $do-once$98 - (get_local $1) ) ) - ) - (block $do-once$100 - (if - (get_local $11) - (block - (if - (i32.eq - (tee_local $1 - (i32.load - (i32.add - (get_local $23) - (i32.const -4) + (block $do-once$100 + (if + (get_local $11) + (block + (if + (i32.eq + (tee_local $1 + (i32.load + (i32.add + (get_local $23) + (i32.const -4) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $6 - (i32.const 9) - ) - (br $do-once$100) - ) - ) - (if - (i32.eq - (i32.and - (call_import $i32u-rem - (get_local $1) - (i32.const 10) + (block + (set_local $6 + (i32.const 9) ) - (i32.const -1) + (br $do-once$100) ) - (i32.const 0) ) - (block - (set_local $5 - (i32.const 10) - ) - (set_local $6 + (if + (i32.eq + (i32.and + (call_import $i32u-rem + (get_local $1) + (i32.const 10) + ) + (i32.const -1) + ) (i32.const 0) ) - ) - (block - (set_local $6 - (i32.const 0) + (block + (set_local $5 + (i32.const 10) + ) + (set_local $6 + (i32.const 0) + ) ) - (br $do-once$100) - ) - ) - (loop $while-out$102 $while-in$103 - (set_local $6 - (i32.add - (get_local $6) - (i32.const 1) + (block + (set_local $6 + (i32.const 0) + ) + (br $do-once$100) ) ) - (if - (i32.ne - (i32.and - (call_import $i32u-rem - (get_local $1) - (tee_local $5 - (i32.mul - (get_local $5) - (i32.const 10) + (loop $while-in$103 + (block $while-out$102 + (set_local $6 + (i32.add + (get_local $6) + (i32.const 1) + ) + ) + (if + (i32.ne + (i32.and + (call_import $i32u-rem + (get_local $1) + (tee_local $5 + (i32.mul + (get_local $5) + (i32.const 10) + ) + ) ) + (i32.const -1) ) + (i32.const 0) ) - (i32.const -1) + (br $while-out$102) ) - (i32.const 0) + (br $while-in$103) ) - (br $while-out$102) ) - (br $while-in$103) ) - ) - (set_local $6 - (i32.const 9) + (set_local $6 + (i32.const 9) + ) ) ) - ) - (set_local $1 - (i32.add - (i32.mul - (i32.shr_s - (i32.sub - (get_local $23) - (get_local $62) + (set_local $1 + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (get_local $23) + (get_local $62) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 9) ) - (i32.const 9) + (i32.const -9) ) - (i32.const -9) ) - ) - (if - (i32.eq - (i32.or - (get_local $10) - (i32.const 32) + (if + (i32.eq + (i32.or + (get_local $10) + (i32.const 32) + ) + (i32.const 102) ) - (i32.const 102) - ) - (block - (set_local $1 - (i32.lt_s - (tee_local $5 - (i32.sub - (get_local $1) - (get_local $6) + (block + (set_local $1 + (i32.lt_s + (tee_local $5 + (i32.sub + (get_local $1) + (get_local $6) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.lt_s - (get_local $8) - (tee_local $1 - (select - (i32.const 0) - (get_local $5) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $8) + (tee_local $1 + (select + (i32.const 0) + (get_local $5) + (get_local $1) + ) ) ) ) - ) - (set_local $15 - (select - (get_local $8) - (get_local $1) - (get_local $5) + (set_local $15 + (select + (get_local $8) + (get_local $1) + (get_local $5) + ) ) + (set_local $26 + (get_local $10) + ) + (i32.const 0) ) - (set_local $26 - (get_local $10) - ) - (i32.const 0) - ) - (block - (set_local $1 - (i32.lt_s - (tee_local $5 - (i32.sub - (i32.add - (get_local $1) - (get_local $13) + (block + (set_local $1 + (i32.lt_s + (tee_local $5 + (i32.sub + (i32.add + (get_local $1) + (get_local $13) + ) + (get_local $6) ) - (get_local $6) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.lt_s - (get_local $8) - (tee_local $1 - (select - (i32.const 0) - (get_local $5) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $8) + (tee_local $1 + (select + (i32.const 0) + (get_local $5) + (get_local $1) + ) ) ) ) - ) - (set_local $15 - (select - (get_local $8) - (get_local $1) - (get_local $5) + (set_local $15 + (select + (get_local $8) + (get_local $1) + (get_local $5) + ) ) + (set_local $26 + (get_local $10) + ) + (i32.const 0) ) - (set_local $26 - (get_local $10) - ) - (i32.const 0) ) ) - ) - (block - (set_local $15 - (get_local $1) - ) - (i32.and - (get_local $18) - (i32.const 8) + (block + (set_local $15 + (get_local $1) + ) + (i32.and + (get_local $18) + (i32.const 8) + ) ) ) ) ) - ) - (set_local $17 - (i32.and - (i32.ne - (tee_local $1 - (i32.or - (get_local $15) - (get_local $8) + (set_local $17 + (i32.and + (i32.ne + (tee_local $1 + (i32.or + (get_local $15) + (get_local $8) + ) ) + (i32.const 0) ) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) - ) - (set_local $13 - (if - (tee_local $10 - (i32.eq - (i32.or - (get_local $26) - (i32.const 32) + (set_local $13 + (if + (tee_local $10 + (i32.eq + (i32.or + (get_local $26) + (i32.const 32) + ) + (i32.const 102) ) - (i32.const 102) ) - ) - (block - (set_local $6 - (select - (get_local $13) - (i32.const 0) - (i32.gt_s + (block + (set_local $6 + (select (get_local $13) (i32.const 0) - ) - ) - ) - (i32.const 0) - ) - (block - (set_local $5 - (i32.shr_s - (i32.shl - (i32.lt_s - (tee_local $6 - (select - (get_local $27) - (get_local $13) - (i32.lt_s - (get_local $13) - (i32.const 0) - ) - ) - ) + (i32.gt_s + (get_local $13) (i32.const 0) ) - (i32.const 31) ) - (i32.const 31) ) + (i32.const 0) ) - (if - (i32.lt_s - (i32.sub - (get_local $40) - (tee_local $5 - (call $_fmt_u - (get_local $6) - (get_local $5) - (get_local $52) + (block + (set_local $5 + (i32.shr_s + (i32.shl + (i32.lt_s + (tee_local $6 + (select + (get_local $27) + (get_local $13) + (i32.lt_s + (get_local $13) + (i32.const 0) + ) + ) + ) + (i32.const 0) ) + (i32.const 31) ) + (i32.const 31) ) - (i32.const 2) ) - (loop $while-out$104 $while-in$105 - (i32.store8 - (tee_local $5 - (i32.add - (get_local $5) - (i32.const -1) + (if + (i32.lt_s + (i32.sub + (get_local $40) + (tee_local $5 + (call $_fmt_u + (get_local $6) + (get_local $5) + (get_local $52) + ) ) ) - (i32.const 48) + (i32.const 2) ) - (if - (i32.ge_s - (i32.sub - (get_local $40) - (get_local $5) + (loop $while-in$105 + (block $while-out$104 + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -1) + ) + ) + (i32.const 48) ) - (i32.const 2) + (if + (i32.ge_s + (i32.sub + (get_local $40) + (get_local $5) + ) + (i32.const 2) + ) + (br $while-out$104) + ) + (br $while-in$105) ) - (br $while-out$104) ) - (br $while-in$105) - ) - ) - (i32.store8 - (i32.add - (get_local $5) - (i32.const -1) ) - (i32.and + (i32.store8 (i32.add - (i32.and - (i32.shr_s - (get_local $13) - (i32.const 31) + (get_local $5) + (i32.const -1) + ) + (i32.and + (i32.add + (i32.and + (i32.shr_s + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 43) ) - (i32.const 43) + (i32.const 255) ) - (i32.const 255) ) - ) - (i32.store8 - (tee_local $5 - (i32.add - (get_local $5) - (i32.const -2) + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -2) + ) + ) + (i32.and + (get_local $26) + (i32.const 255) ) ) - (i32.and - (get_local $26) - (i32.const 255) - ) - ) - (set_local $6 - (i32.sub - (get_local $40) - (get_local $5) + (set_local $6 + (i32.sub + (get_local $40) + (get_local $5) + ) ) + (get_local $5) ) - (get_local $5) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $6 - (i32.add + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $6 (i32.add (i32.add (i32.add - (get_local $51) - (i32.const 1) + (i32.add + (get_local $51) + (i32.const 1) + ) + (get_local $15) ) - (get_local $15) + (get_local $17) ) - (get_local $17) + (get_local $6) ) - (get_local $6) ) + (get_local $18) ) - (get_local $18) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $39) + (get_local $51) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $39) - (get_local $51) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $16) + (get_local $6) + (i32.xor + (get_local $18) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $16) - (get_local $6) - (i32.xor - (get_local $18) - (i32.const 65536) - ) - ) - (block $do-once$106 - (if - (get_local $10) - (block - (set_local $7 - (tee_local $8 - (select - (get_local $9) - (get_local $7) - (i32.gt_u - (get_local $7) + (block $do-once$106 + (if + (get_local $10) + (block + (set_local $7 + (tee_local $8 + (select (get_local $9) - ) - ) - ) - ) - (loop $while-out$114 $while-in$115 - (set_local $5 - (call $_fmt_u - (i32.load (get_local $7) + (i32.gt_u + (get_local $7) + (get_local $9) + ) ) - (i32.const 0) - (get_local $45) ) ) - (block $do-once$116 - (if - (i32.eq - (get_local $7) - (get_local $8) - ) - (block - (if - (i32.ne - (get_local $5) - (get_local $45) + (loop $while-in$115 + (block $while-out$114 + (set_local $5 + (call $_fmt_u + (i32.load + (get_local $7) ) - (br $do-once$116) - ) - (i32.store8 - (get_local $53) - (i32.const 48) - ) - (set_local $5 - (get_local $53) + (i32.const 0) + (get_local $45) ) ) - (block + (block $do-once$116 (if - (i32.le_u - (get_local $5) - (get_local $29) + (i32.eq + (get_local $7) + (get_local $8) ) - (br $do-once$116) - ) - (loop $while-out$118 $while-in$119 - (i32.store8 - (tee_local $5 - (i32.add + (block + (if + (i32.ne (get_local $5) - (i32.const -1) + (get_local $45) ) + (br $do-once$116) ) - (i32.const 48) - ) - (if - (i32.le_u - (get_local $5) - (get_local $29) + (i32.store8 + (get_local $53) + (i32.const 48) + ) + (set_local $5 + (get_local $53) + ) + ) + (block + (if + (i32.le_u + (get_local $5) + (get_local $29) + ) + (br $do-once$116) + ) + (loop $while-in$119 + (block $while-out$118 + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $5) + (get_local $29) + ) + (br $while-out$118) + ) + (br $while-in$119) + ) ) - (br $while-out$118) ) - (br $while-in$119) - ) - ) - ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $5) - (i32.sub - (get_local $75) - (get_local $5) - ) - (get_local $0) - ) - ) - (if - (i32.gt_u - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 4) ) ) - (get_local $9) - ) - (block - (set_local $5 - (get_local $7) - ) - (br $while-out$114) - ) - ) - (br $while-in$115) - ) - (block $do-once$120 - (if - (i32.ne - (get_local $1) - (i32.const 0) - ) - (block - (br_if $do-once$120 - (i32.ne + (if + (i32.eq (i32.and (i32.load (get_local $0) @@ -7224,159 +7243,76 @@ ) (i32.const 0) ) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) - ) - ) - ) - ) - (if - (i32.and - (i32.gt_s - (get_local $15) - (i32.const 0) - ) - (i32.lt_u - (get_local $5) - (get_local $23) - ) - ) - (loop $while-out$122 $while-in$123 - (if - (i32.gt_u - (tee_local $1 - (call $_fmt_u - (i32.load - (get_local $5) - ) - (i32.const 0) - (get_local $45) + (call $___fwritex + (get_local $5) + (i32.sub + (get_local $75) + (get_local $5) ) + (get_local $0) ) - (get_local $29) ) - (loop $while-out$124 $while-in$125 - (i32.store8 - (tee_local $1 + (if + (i32.gt_u + (tee_local $7 (i32.add - (get_local $1) - (i32.const -1) + (get_local $7) + (i32.const 4) ) ) - (i32.const 48) + (get_local $9) ) - (if - (i32.le_u - (get_local $1) - (get_local $29) + (block + (set_local $5 + (get_local $7) ) - (br $while-out$124) + (br $while-out$114) ) - (br $while-in$125) ) + (br $while-in$115) ) + ) + (block $do-once$120 (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex + (i32.ne (get_local $1) - (select - (i32.const 9) - (get_local $15) - (i32.gt_s - (get_local $15) - (i32.const 9) - ) - ) - (get_local $0) - ) - ) - (set_local $1 - (i32.add - (get_local $15) - (i32.const -9) + (i32.const 0) ) - ) - (if - (i32.and - (i32.gt_s - (get_local $15) - (i32.const 9) - ) - (i32.lt_u - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 4) + (block + (br_if $do-once$120 + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) + (i32.const 0) ) - (get_local $23) ) - ) - (set_local $15 - (get_local $1) - ) - (block - (set_local $15 - (get_local $1) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) ) - (br $while-out$122) ) ) - (br $while-in$123) - ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.add - (get_local $15) - (i32.const 9) - ) - (i32.const 9) - (i32.const 0) - ) - ) - (block - (set_local $11 - (select - (get_local $23) - (i32.add - (get_local $7) - (i32.const 4) - ) - (get_local $11) ) - ) - (if - (i32.gt_s - (get_local $15) - (i32.const -1) - ) - (block - (set_local $9 - (i32.eq - (get_local $8) + (if + (i32.and + (i32.gt_s + (get_local $15) (i32.const 0) ) + (i32.lt_u + (get_local $5) + (get_local $23) + ) ) - (set_local $5 - (get_local $7) - ) - (loop $while-out$108 $while-in$109 - (set_local $8 + (loop $while-in$123 + (block $while-out$122 (if - (i32.eq + (i32.gt_u (tee_local $1 (call $_fmt_u (i32.load @@ -7386,834 +7322,978 @@ (get_local $45) ) ) - (get_local $45) + (get_local $29) + ) + (loop $while-in$125 + (block $while-out$124 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $1) + (get_local $29) + ) + (br $while-out$124) + ) + (br $while-in$125) + ) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $1) + (select + (i32.const 9) + (get_local $15) + (i32.gt_s + (get_local $15) + (i32.const 9) + ) + ) + (get_local $0) + ) + ) + (set_local $1 + (i32.add + (get_local $15) + (i32.const -9) + ) + ) + (if + (i32.and + (i32.gt_s + (get_local $15) + (i32.const 9) + ) + (i32.lt_u + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 4) + ) + ) + (get_local $23) + ) + ) + (set_local $15 + (get_local $1) ) (block - (i32.store8 - (get_local $53) - (i32.const 48) + (set_local $15 + (get_local $1) ) - (get_local $53) + (br $while-out$122) ) - (get_local $1) + ) + (br $while-in$123) + ) + ) + ) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.add + (get_local $15) + (i32.const 9) + ) + (i32.const 9) + (i32.const 0) + ) + ) + (block + (set_local $11 + (select + (get_local $23) + (i32.add + (get_local $7) + (i32.const 4) + ) + (get_local $11) + ) + ) + (if + (i32.gt_s + (get_local $15) + (i32.const -1) + ) + (block + (set_local $9 + (i32.eq + (get_local $8) + (i32.const 0) ) ) - (block $do-once$110 - (if - (i32.eq - (get_local $5) - (get_local $7) - ) - (block - (set_local $1 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) + (set_local $5 + (get_local $7) + ) + (loop $while-in$109 + (block $while-out$108 + (set_local $8 (if (i32.eq - (i32.and - (i32.load - (get_local $0) + (tee_local $1 + (call $_fmt_u + (i32.load + (get_local $5) + ) + (i32.const 0) + (get_local $45) ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $8) - (i32.const 1) - (get_local $0) - ) - ) - (if - (i32.and - (get_local $9) - (i32.lt_s - (get_local $15) - (i32.const 1) ) + (get_local $45) ) - (br $do-once$110) - ) - (if - (i32.ne - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) + (block + (i32.store8 + (get_local $53) + (i32.const 48) ) - (i32.const 0) + (get_local $53) ) - (br $do-once$110) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (get_local $1) ) ) - (block + (block $do-once$110 (if - (i32.gt_u - (get_local $8) - (get_local $29) - ) - (set_local $1 - (get_local $8) + (i32.eq + (get_local $5) + (get_local $7) ) (block (set_local $1 - (get_local $8) - ) - (br $do-once$110) - ) - ) - (loop $while-out$112 $while-in$113 - (i32.store8 - (tee_local $1 (i32.add - (get_local $1) - (i32.const -1) + (get_local $8) + (i32.const 1) ) ) - (i32.const 48) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (i32.const 1) + (get_local $0) + ) + ) + (if + (i32.and + (get_local $9) + (i32.lt_s + (get_local $15) + (i32.const 1) + ) + ) + (br $do-once$110) + ) + (if + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (br $do-once$110) + ) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) - (if - (i32.le_u - (get_local $1) - (get_local $29) + (block + (if + (i32.gt_u + (get_local $8) + (get_local $29) + ) + (set_local $1 + (get_local $8) + ) + (block + (set_local $1 + (get_local $8) + ) + (br $do-once$110) + ) + ) + (loop $while-in$113 + (block $while-out$112 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $1) + (get_local $29) + ) + (br $while-out$112) + ) + (br $while-in$113) + ) ) - (br $while-out$112) ) - (br $while-in$113) - ) - ) - ) - ) - (set_local $8 - (i32.sub - (get_local $75) - (get_local $1) - ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) ) - (i32.const 32) ) - (i32.const 0) - ) - (call $___fwritex - (get_local $1) - (select - (get_local $8) - (get_local $15) - (i32.gt_s - (get_local $15) - (get_local $8) + (set_local $8 + (i32.sub + (get_local $75) + (get_local $1) ) ) - (get_local $0) - ) - ) - (if - (i32.eqz - (i32.and - (i32.lt_u - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 4) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) - (get_local $11) + (i32.const 0) ) - (i32.gt_s - (tee_local $15 - (i32.sub + (call $___fwritex + (get_local $1) + (select + (get_local $8) + (get_local $15) + (i32.gt_s (get_local $15) (get_local $8) ) ) - (i32.const -1) + (get_local $0) ) ) + (if + (i32.eqz + (i32.and + (i32.lt_u + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 4) + ) + ) + (get_local $11) + ) + (i32.gt_s + (tee_local $15 + (i32.sub + (get_local $15) + (get_local $8) + ) + ) + (i32.const -1) + ) + ) + ) + (br $while-out$108) + ) + (br $while-in$109) ) - (br $while-out$108) ) - (br $while-in$109) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.add - (get_local $15) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.add + (get_local $15) + (i32.const 18) + ) (i32.const 18) + (i32.const 0) ) - (i32.const 18) - (i32.const 0) - ) - (br_if $do-once$106 - (i32.ne - (i32.and - (i32.load - (get_local $0) + (br_if $do-once$106 + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) ) - ) - (call $___fwritex - (get_local $13) - (i32.sub - (get_local $40) + (call $___fwritex (get_local $13) - ) - (get_local $0) - ) - ) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $6) - (i32.xor - (get_local $18) - (i32.const 8192) + (i32.sub + (get_local $40) + (get_local $13) + ) + (get_local $0) + ) + ) + ) ) - ) - (select - (get_local $16) - (get_local $6) - (i32.lt_s + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) (get_local $6) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (select (get_local $16) + (get_local $6) + (i32.lt_s + (get_local $6) + (get_local $16) + ) ) ) - ) - (block - (set_local $5 - (select - (i32.const 4127) - (i32.const 4131) - (tee_local $8 - (i32.ne - (i32.and - (get_local $26) - (i32.const 32) + (block + (set_local $5 + (select + (i32.const 4127) + (i32.const 4131) + (tee_local $8 + (i32.ne + (i32.and + (get_local $26) + (i32.const 32) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (set_local $6 - (select - (i32.const 0) - (get_local $51) - (tee_local $1 - (i32.or - (f64.ne - (get_local $14) - (get_local $14) + (set_local $6 + (select + (i32.const 0) + (get_local $51) + (tee_local $1 + (i32.or + (f64.ne + (get_local $14) + (get_local $14) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (set_local $8 - (select + (set_local $8 (select - (i32.const 4135) - (i32.const 4139) - (get_local $8) + (select + (i32.const 4135) + (i32.const 4139) + (get_local $8) + ) + (get_local $5) + (get_local $1) ) - (get_local $5) - (get_local $1) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $5 - (i32.add - (get_local $6) - (i32.const 3) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $5 + (i32.add + (get_local $6) + (i32.const 3) + ) ) + (get_local $7) ) - (get_local $7) - ) - (if - (i32.eq - (i32.and - (if - (i32.eq - (i32.and - (tee_local $1 - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (if + (i32.eq + (i32.and + (tee_local $1 + (i32.load + (get_local $0) + ) ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) - ) - (block - (drop - (call $___fwritex - (get_local $39) - (get_local $6) + (block + (drop + (call $___fwritex + (get_local $39) + (get_local $6) + (get_local $0) + ) + ) + (i32.load (get_local $0) ) ) - (i32.load - (get_local $0) - ) + (get_local $1) ) - (get_local $1) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (i32.const 3) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $8) - (i32.const 3) + (call $_pad (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $5) - (i32.xor - (get_local $18) - (i32.const 8192) - ) - ) - (select - (get_local $16) - (get_local $5) - (i32.lt_s + (i32.const 32) + (get_local $16) (get_local $5) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (select (get_local $16) + (get_local $5) + (i32.lt_s + (get_local $5) + (get_local $16) + ) ) ) ) ) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $8 - (get_local $21) + (set_local $47 + (get_local $20) ) - (br $label$continue$L1) - ) - (set_local $47 - (get_local $20) - ) - (set_local $37 - (get_local $18) - ) - (set_local $42 - (get_local $10) - ) - (set_local $43 - (i32.const 0) - ) - (set_local $48 - (i32.const 4091) - ) - (set_local $49 - (get_local $28) - ) - ) - (block $label$break$L308 - (if - (i32.eq - (get_local $12) - (i32.const 64) + (set_local $37 + (get_local $18) ) - (block - (set_local $7 - (i32.and - (get_local $68) - (i32.const 32) - ) + (set_local $42 + (get_local $10) + ) + (set_local $43 + (i32.const 0) + ) + (set_local $48 + (i32.const 4091) + ) + (set_local $49 + (get_local $28) + ) + ) + (block $label$break$L308 + (if + (i32.eq + (get_local $12) + (i32.const 64) ) - (set_local $58 - (if + (block + (set_local $7 (i32.and - (i32.eq - (tee_local $5 - (i32.load - (tee_local $1 - (get_local $19) + (get_local $68) + (i32.const 32) + ) + ) + (set_local $58 + (if + (i32.and + (i32.eq + (tee_local $5 + (i32.load + (tee_local $1 + (get_local $19) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (i32.eq - (tee_local $1 - (i32.load offset=4 - (get_local $1) + (i32.eq + (tee_local $1 + (i32.load offset=4 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $28) - ) - (block - (set_local $6 + (block + (set_local $34 + (get_local $46) + ) + (set_local $32 + (get_local $57) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) (get_local $28) - ) - (loop $while-out$133 $while-in$134 - (i32.store8 - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -1) + ) + (block + (set_local $6 + (get_local $28) + ) + (loop $while-in$134 + (block $while-out$133 + (i32.store8 + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (i32.and + (i32.load8_s + (i32.add + (i32.and + (get_local $5) + (i32.const 15) + ) + (i32.const 4075) + ) + ) + (i32.const 255) + ) + (get_local $7) + ) + (i32.const 255) + ) ) - ) - (i32.and - (i32.or + (if (i32.and - (i32.load8_s - (i32.add - (i32.and + (i32.eq + (tee_local $5 + (call $_bitshift64Lshr (get_local $5) - (i32.const 15) + (get_local $1) + (i32.const 4) ) - (i32.const 4075) ) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load + (i32.const 168) + ) + ) + (i32.const 0) ) - (i32.const 255) ) - (get_local $7) + (br $while-out$133) ) - (i32.const 255) + (br $while-in$134) ) ) (if - (i32.and + (i32.or (i32.eq - (tee_local $5 - (call $_bitshift64Lshr - (get_local $5) - (get_local $1) - (i32.const 4) - ) + (i32.and + (get_local $46) + (i32.const 8) ) (i32.const 0) ) - (i32.eq - (tee_local $1 + (i32.and + (i32.eq (i32.load - (i32.const 168) + (tee_local $1 + (get_local $19) + ) ) + (i32.const 0) + ) + (i32.eq + (i32.load offset=4 + (get_local $1) + ) + (i32.const 0) ) - (i32.const 0) ) ) - (br $while-out$133) - ) - (br $while-in$134) - ) - (if - (i32.or - (i32.eq - (i32.and + (block + (set_local $34 (get_local $46) - (i32.const 8) ) - (i32.const 0) - ) - (i32.and - (i32.eq - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - (i32.const 0) + (set_local $32 + (get_local $57) ) - (i32.eq - (i32.load offset=4 - (get_local $1) - ) + (set_local $35 (i32.const 0) ) - ) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) - ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) - ) - (set_local $35 - (i32.const 2) - ) - (set_local $36 - (i32.add + (set_local $36 (i32.const 4091) - (i32.shr_s - (get_local $68) - (i32.const 4) - ) ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (set_local $12 - (i32.const 77) + (block + (set_local $34 + (get_local $46) + ) + (set_local $32 + (get_local $57) + ) + (set_local $35 + (i32.const 2) + ) + (set_local $36 + (i32.add + (i32.const 4091) + (i32.shr_s + (get_local $68) + (i32.const 4) + ) + ) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (get_local $6) ) ) ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 76) - ) - (block - (set_local $58 - (call $_fmt_u - (get_local $33) - (get_local $59) - (get_local $28) - ) - ) - (set_local $34 - (get_local $18) - ) - (set_local $32 - (get_local $10) - ) - (set_local $35 - (get_local $60) - ) - (set_local $36 - (get_local $61) - ) - (set_local $12 - (i32.const 77) - ) - ) (if (i32.eq (get_local $12) - (i32.const 82) + (i32.const 76) ) (block - (set_local $12 - (i32.const 0) - ) - (set_local $5 - (i32.eq - (tee_local $1 - (call $_memchr - (get_local $50) - (i32.const 0) - (get_local $10) - ) - ) - (i32.const 0) + (set_local $58 + (call $_fmt_u + (get_local $33) + (get_local $59) + (get_local $28) ) ) - (set_local $47 - (get_local $50) - ) - (set_local $37 - (get_local $7) + (set_local $34 + (get_local $18) ) - (set_local $42 - (select - (get_local $10) - (i32.sub - (get_local $1) - (get_local $50) - ) - (get_local $5) - ) + (set_local $32 + (get_local $10) ) - (set_local $43 - (i32.const 0) + (set_local $35 + (get_local $60) ) - (set_local $48 - (i32.const 4091) + (set_local $36 + (get_local $61) ) - (set_local $49 - (select - (i32.add - (get_local $50) - (get_local $10) - ) - (get_local $1) - (get_local $5) - ) + (set_local $12 + (i32.const 77) ) ) (if (i32.eq (get_local $12) - (i32.const 86) + (i32.const 82) ) (block (set_local $12 (i32.const 0) ) - (set_local $7 - (i32.const 0) - ) (set_local $5 - (i32.const 0) - ) - (set_local $6 - (i32.load - (get_local $19) - ) - ) - (loop $while-out$129 $while-in$130 - (if - (i32.eq - (tee_local $1 - (i32.load - (get_local $6) - ) - ) - (i32.const 0) - ) - (br $while-out$129) - ) - (if - (i32.or - (i32.lt_s - (tee_local $5 - (call $_wctomb - (get_local $63) - (get_local $1) - ) - ) + (i32.eq + (tee_local $1 + (call $_memchr + (get_local $50) (i32.const 0) + (get_local $10) ) - (i32.gt_u - (get_local $5) - (i32.sub - (get_local $69) - (get_local $7) - ) - ) - ) - (br $while-out$129) - ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const 4) - ) - ) - (if - (i32.gt_u - (get_local $69) - (tee_local $1 - (i32.add - (get_local $5) - (get_local $7) - ) - ) - ) - (set_local $7 - (get_local $1) - ) - (block - (set_local $7 - (get_local $1) - ) - (br $while-out$129) ) + (i32.const 0) ) - (br $while-in$130) ) - (if - (i32.lt_s + (set_local $47 + (get_local $50) + ) + (set_local $37 + (get_local $7) + ) + (set_local $42 + (select + (get_local $10) + (i32.sub + (get_local $1) + (get_local $50) + ) (get_local $5) - (i32.const 0) ) - (block - (set_local $24 - (i32.const -1) + ) + (set_local $43 + (i32.const 0) + ) + (set_local $48 + (i32.const 4091) + ) + (set_local $49 + (select + (i32.add + (get_local $50) + (get_local $10) ) - (br $label$break$L1) + (get_local $1) + (get_local $5) ) ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $7) - (get_local $18) + ) + (if + (i32.eq + (get_local $12) + (i32.const 86) ) - (if - (i32.eq - (get_local $7) + (block + (set_local $12 (i32.const 0) ) - (block - (set_local $38 - (i32.const 0) - ) - (set_local $12 - (i32.const 98) - ) + (set_local $7 + (i32.const 0) ) - (block - (set_local $6 - (i32.const 0) - ) - (set_local $8 - (i32.load - (get_local $19) - ) + (set_local $5 + (i32.const 0) + ) + (set_local $6 + (i32.load + (get_local $19) ) - (loop $while-out$131 $while-in$132 + ) + (loop $while-in$130 + (block $while-out$129 (if (i32.eq (tee_local $1 (i32.load - (get_local $8) + (get_local $6) ) ) (i32.const 0) ) - (block - (set_local $38 - (get_local $7) + (br $while-out$129) + ) + (if + (i32.or + (i32.lt_s + (tee_local $5 + (call $_wctomb + (get_local $63) + (get_local $1) + ) + ) + (i32.const 0) ) - (set_local $12 - (i32.const 98) + (i32.gt_u + (get_local $5) + (i32.sub + (get_local $69) + (get_local $7) + ) ) - (br $label$break$L308) ) + (br $while-out$129) ) - (set_local $8 + (set_local $6 (i32.add - (get_local $8) + (get_local $6) (i32.const 4) ) ) (if - (i32.gt_s + (i32.gt_u + (get_local $69) (tee_local $1 (i32.add - (tee_local $5 - (call $_wctomb - (get_local $63) - (get_local $1) - ) - ) - (get_local $6) + (get_local $5) + (get_local $7) ) ) - (get_local $7) + ) + (set_local $7 + (get_local $1) ) (block - (set_local $38 - (get_local $7) - ) - (set_local $12 - (i32.const 98) + (set_local $7 + (get_local $1) ) - (br $label$break$L308) + (br $while-out$129) ) ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $63) - (get_local $5) - (get_local $0) - ) + (br $while-in$130) + ) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) ) - (if - (i32.lt_u - (get_local $1) - (get_local $7) - ) - (set_local $6 - (get_local $1) + (br $label$break$L1) + ) + ) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (get_local $7) + (get_local $18) + ) + (if + (i32.eq + (get_local $7) + (i32.const 0) + ) + (block + (set_local $38 + (i32.const 0) + ) + (set_local $12 + (i32.const 98) + ) + ) + (block + (set_local $6 + (i32.const 0) + ) + (set_local $8 + (i32.load + (get_local $19) ) - (block - (set_local $38 - (get_local $7) + ) + (loop $while-in$132 + (block $while-out$131 + (if + (i32.eq + (tee_local $1 + (i32.load + (get_local $8) + ) + ) + (i32.const 0) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $label$break$L308) + ) ) - (set_local $12 - (i32.const 98) + (set_local $8 + (i32.add + (get_local $8) + (i32.const 4) + ) + ) + (if + (i32.gt_s + (tee_local $1 + (i32.add + (tee_local $5 + (call $_wctomb + (get_local $63) + (get_local $1) + ) + ) + (get_local $6) + ) + ) + (get_local $7) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $label$break$L308) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $63) + (get_local $5) + (get_local $0) + ) + ) + (if + (i32.lt_u + (get_local $1) + (get_local $7) + ) + (set_local $6 + (get_local $1) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $while-out$131) + ) ) - (br $while-out$131) + (br $while-in$132) ) ) - (br $while-in$132) ) ) ) @@ -8222,267 +8302,267 @@ ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 98) - ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 98) ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $38) - (i32.xor - (get_local $18) - (i32.const 8192) + (block + (set_local $12 + (i32.const 0) ) - ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (select + (call $_pad + (get_local $0) + (i32.const 32) (get_local $16) (get_local $38) - (i32.gt_s + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (select (get_local $16) (get_local $38) + (i32.gt_s + (get_local $16) + (get_local $38) + ) ) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $8 - (get_local $21) - ) - (br $label$continue$L1) - ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 77) ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 77) ) - (set_local $5 - (select - (i32.and - (get_local $34) - (i32.const -65537) - ) - (get_local $34) - (i32.gt_s - (get_local $32) - (i32.const -1) - ) + (block + (set_local $12 + (i32.const 0) ) - ) - (set_local $47 - (if - (i32.or - (i32.ne + (set_local $5 + (select + (i32.and + (get_local $34) + (i32.const -65537) + ) + (get_local $34) + (i32.gt_s (get_local $32) - (i32.const 0) + (i32.const -1) ) - (tee_local $1 - (i32.or - (i32.ne - (i32.load - (tee_local $1 - (get_local $19) + ) + ) + (set_local $47 + (if + (i32.or + (i32.ne + (get_local $32) + (i32.const 0) + ) + (tee_local $1 + (i32.or + (i32.ne + (i32.load + (tee_local $1 + (get_local $19) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (i32.ne - (i32.load offset=4 - (get_local $1) + (i32.ne + (i32.load offset=4 + (get_local $1) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (block - (set_local $7 - (i32.gt_s - (get_local $32) - (tee_local $1 - (i32.add - (i32.xor - (i32.and - (get_local $1) + (block + (set_local $7 + (i32.gt_s + (get_local $32) + (tee_local $1 + (i32.add + (i32.xor + (i32.and + (get_local $1) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) - ) - (i32.sub - (get_local $71) - (get_local $58) + (i32.sub + (get_local $71) + (get_local $58) + ) ) ) ) ) - ) - (set_local $37 - (get_local $5) - ) - (set_local $42 - (select - (get_local $32) - (get_local $1) - (get_local $7) + (set_local $37 + (get_local $5) ) + (set_local $42 + (select + (get_local $32) + (get_local $1) + (get_local $7) + ) + ) + (set_local $43 + (get_local $35) + ) + (set_local $48 + (get_local $36) + ) + (set_local $49 + (get_local $28) + ) + (get_local $58) ) - (set_local $43 - (get_local $35) - ) - (set_local $48 - (get_local $36) - ) - (set_local $49 - (get_local $28) - ) - (get_local $58) - ) - (block - (set_local $37 - (get_local $5) - ) - (set_local $42 - (i32.const 0) - ) - (set_local $43 - (get_local $35) - ) - (set_local $48 - (get_local $36) - ) - (set_local $49 + (block + (set_local $37 + (get_local $5) + ) + (set_local $42 + (i32.const 0) + ) + (set_local $43 + (get_local $35) + ) + (set_local $48 + (get_local $36) + ) + (set_local $49 + (get_local $28) + ) (get_local $28) ) - (get_local $28) ) ) ) ) - ) - (set_local $1 - (i32.lt_s - (get_local $42) - (tee_local $7 - (i32.sub - (get_local $49) - (get_local $47) + (set_local $1 + (i32.lt_s + (get_local $42) + (tee_local $7 + (i32.sub + (get_local $49) + (get_local $47) + ) ) ) ) - ) - (set_local $5 - (i32.lt_s - (get_local $16) - (tee_local $1 - (i32.add - (get_local $43) - (tee_local $6 - (select - (get_local $7) - (get_local $42) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $16) + (tee_local $1 + (i32.add + (get_local $43) + (tee_local $6 + (select + (get_local $7) + (get_local $42) + (get_local $1) + ) ) ) ) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (tee_local $5 - (select - (get_local $1) - (get_local $16) - (get_local $5) + (call $_pad + (get_local $0) + (i32.const 32) + (tee_local $5 + (select + (get_local $1) + (get_local $16) + (get_local $5) + ) ) + (get_local $1) + (get_local $37) ) - (get_local $1) - (get_local $37) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $48) + (get_local $43) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $48) - (get_local $43) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $5) + (get_local $1) + (i32.xor + (get_local $37) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $5) - (get_local $1) - (i32.xor - (get_local $37) - (i32.const 65536) + (call $_pad + (get_local $0) + (i32.const 48) + (get_local $6) + (get_local $7) + (i32.const 0) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $6) - (get_local $7) - (i32.const 0) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $47) + (get_local $7) + (get_local $0) + ) + ) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $5) + (get_local $1) + (i32.xor + (get_local $37) + (i32.const 8192) ) - (i32.const 0) ) - (call $___fwritex - (get_local $47) - (get_local $7) - (get_local $0) + (set_local $20 + (get_local $9) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $5) - (get_local $1) - (i32.xor - (get_local $37) - (i32.const 8192) + (set_local $1 + (get_local $5) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (get_local $5) - ) - (set_local $8 - (get_local $21) - ) - (br $label$continue$L1) ) (block $label$break$L343 (if @@ -8507,102 +8587,106 @@ (set_local $1 (i32.const 1) ) - (loop $while-out$136 $while-in$137 - (if - (i32.eq - (tee_local $0 - (i32.load - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) + (loop $while-in$137 + (block $while-out$136 + (if + (i32.eq + (tee_local $0 + (i32.load + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$136) - ) - (call $_pop_arg_336 - (i32.add - (get_local $3) - (i32.shl - (get_local $1) - (i32.const 3) - ) + (br $while-out$136) ) - (get_local $0) - (get_local $2) - ) - (if - (i32.ge_s - (tee_local $1 - (i32.add + (call $_pop_arg_336 + (i32.add + (get_local $3) + (i32.shl (get_local $1) - (i32.const 1) + (i32.const 3) ) ) - (i32.const 10) + (get_local $0) + (get_local $2) ) - (block - (set_local $24 - (i32.const 1) + (if + (i32.ge_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (i32.const 10) + ) + (block + (set_local $24 + (i32.const 1) + ) + (br $label$break$L343) ) - (br $label$break$L343) ) + (br $while-in$137) ) - (br $while-in$137) ) (if (i32.lt_s (get_local $1) (i32.const 10) ) - (loop $while-out$138 $while-in$139 - (set_local $0 - (i32.add - (get_local $1) - (i32.const 1) + (loop $while-in$139 + (block $while-out$138 + (set_local $0 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (if - (i32.ne - (i32.load - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) + (if + (i32.ne + (i32.load + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L343) ) - (br $label$break$L343) - ) - ) - (if - (i32.lt_s - (get_local $0) - (i32.const 10) - ) - (set_local $1 - (get_local $0) ) - (block - (set_local $24 - (i32.const 1) + (if + (i32.lt_s + (get_local $0) + (i32.const 10) + ) + (set_local $1 + (get_local $0) + ) + (block + (set_local $24 + (i32.const 1) + ) + (br $while-out$138) ) - (br $while-out$138) ) + (br $while-in$139) ) - (br $while-in$139) ) (set_local $24 (i32.const 1) @@ -9056,71 +9140,73 @@ (set_local $4 (get_local $1) ) - (loop $while-out$0 $while-in$1 - (set_local $0 - (call $___uremdi3 - (get_local $3) - (get_local $4) - (i32.const 10) - (i32.const 0) - ) - ) - (i32.store8 - (tee_local $2 - (i32.add - (get_local $2) - (i32.const -1) + (loop $while-in$1 + (block $while-out$0 + (set_local $0 + (call $___uremdi3 + (get_local $3) + (get_local $4) + (i32.const 10) + (i32.const 0) ) ) - (i32.and - (i32.or - (get_local $0) - (i32.const 48) + (i32.store8 + (tee_local $2 + (i32.add + (get_local $2) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (get_local $0) + (i32.const 48) + ) + (i32.const 255) ) - (i32.const 255) - ) - ) - (set_local $0 - (call $___udivdi3 - (get_local $3) - (get_local $4) - (i32.const 10) - (i32.const 0) - ) - ) - (set_local $1 - (i32.load - (i32.const 168) ) - ) - (if - (i32.or - (i32.gt_u + (set_local $0 + (call $___udivdi3 + (get_local $3) (get_local $4) - (i32.const 9) + (i32.const 10) + (i32.const 0) ) - (i32.and - (i32.eq + ) + (set_local $1 + (i32.load + (i32.const 168) + ) + ) + (if + (i32.or + (i32.gt_u (get_local $4) (i32.const 9) ) - (i32.gt_u - (get_local $3) - (i32.const -1) + (i32.and + (i32.eq + (get_local $4) + (i32.const 9) + ) + (i32.gt_u + (get_local $3) + (i32.const -1) + ) ) ) - ) - (block - (set_local $3 - (get_local $0) - ) - (set_local $4 - (get_local $1) + (block + (set_local $3 + (get_local $0) + ) + (set_local $4 + (get_local $1) + ) ) + (br $while-out$0) ) - (br $while-out$0) + (br $while-in$1) ) - (br $while-in$1) ) (set_local $3 (get_local $0) @@ -9144,53 +9230,55 @@ (set_local $1 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (i32.store8 - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) + (loop $while-in$3 + (block $while-out$2 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (i32.and + (call_import $i32u-rem + (get_local $3) + (i32.const 10) + ) + (i32.const -1) + ) + (i32.const 48) + ) + (i32.const 255) ) ) - (i32.and - (i32.or - (i32.and - (call_import $i32u-rem - (get_local $3) - (i32.const 10) - ) - (i32.const -1) + (set_local $0 + (i32.and + (call_import $i32u-div + (get_local $3) + (i32.const 10) ) - (i32.const 48) + (i32.const -1) ) - (i32.const 255) ) - ) - (set_local $0 - (i32.and - (call_import $i32u-div + (if + (i32.lt_u (get_local $3) (i32.const 10) ) - (i32.const -1) - ) - ) - (if - (i32.lt_u - (get_local $3) - (i32.const 10) - ) - (block - (set_local $0 - (get_local $1) + (block + (set_local $0 + (get_local $1) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $0) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $0) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -9294,46 +9382,48 @@ (set_local $3 (get_local $5) ) - (loop $while-out$2 $while-in$3 - (set_local $4 - (i32.eq - (i32.and - (tee_local $1 - (if - (get_local $4) - (block - (drop - (call $___fwritex - (get_local $6) - (i32.const 256) + (loop $while-in$3 + (block $while-out$2 + (set_local $4 + (i32.eq + (i32.and + (tee_local $1 + (if + (get_local $4) + (block + (drop + (call $___fwritex + (get_local $6) + (i32.const 256) + (get_local $0) + ) + ) + (i32.load (get_local $0) ) ) - (i32.load - (get_local $0) - ) + (get_local $1) ) - (get_local $1) ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) ) - ) - (if - (i32.le_u - (tee_local $3 - (i32.add - (get_local $3) - (i32.const -256) + (if + (i32.le_u + (tee_local $3 + (i32.add + (get_local $3) + (i32.const -256) + ) ) + (i32.const 255) ) - (i32.const 255) + (br $while-out$2) ) - (br $while-out$2) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $1 (i32.and @@ -10099,76 +10189,78 @@ (set_local $8 (get_local $0) ) - (loop $while-out$23 $while-in$24 - (if - (i32.eq - (tee_local $0 - (i32.load offset=16 - (get_local $4) - ) - ) - (i32.const 0) - ) + (loop $while-in$24 + (block $while-out$23 (if (i32.eq (tee_local $0 - (i32.load offset=20 + (i32.load offset=16 (get_local $4) ) ) (i32.const 0) ) - (block - (set_local $7 - (get_local $2) + (if + (i32.eq + (tee_local $0 + (i32.load offset=20 + (get_local $4) + ) + ) + (i32.const 0) ) - (set_local $10 - (get_local $8) + (block + (set_local $7 + (get_local $2) + ) + (set_local $10 + (get_local $8) + ) + (br $while-out$23) + ) + (set_local $1 + (get_local $0) ) - (br $while-out$23) ) (set_local $1 (get_local $0) ) ) - (set_local $1 - (get_local $0) - ) - ) - (set_local $0 - (i32.lt_u - (tee_local $4 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $1) + (set_local $0 + (i32.lt_u + (tee_local $4 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $6) ) - (get_local $6) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $4) - (get_local $2) - (get_local $0) + (set_local $2 + (select + (get_local $4) + (get_local $2) + (get_local $0) + ) ) - ) - (set_local $4 - (get_local $1) - ) - (set_local $8 - (select + (set_local $4 (get_local $1) - (get_local $8) - (get_local $0) ) + (set_local $8 + (select + (get_local $1) + (get_local $8) + (get_local $0) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -10251,56 +10343,58 @@ (get_local $2) ) ) - (loop $while-out$27 $while-in$28 - (if - (i32.ne - (tee_local $2 - (i32.load - (tee_local $5 - (i32.add - (get_local $4) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (i32.ne + (tee_local $2 + (i32.load + (tee_local $5 + (i32.add + (get_local $4) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $4 - (get_local $2) - ) - (set_local $8 - (get_local $5) + (block + (set_local $4 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (i32.eq - (tee_local $2 - (i32.load - (tee_local $5 - (i32.add - (get_local $4) - (i32.const 16) + (if + (i32.eq + (tee_local $2 + (i32.load + (tee_local $5 + (i32.add + (get_local $4) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$27) - (block - (set_local $4 - (get_local $2) - ) - (set_local $8 - (get_local $5) + (br $while-out$27) + (block + (set_local $4 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -10940,83 +11034,85 @@ (set_local $36 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $16 - (i32.sub - (tee_local $3 - (i32.and - (i32.load offset=4 - (get_local $23) - ) - (i32.const -8) - ) - ) - (get_local $5) - ) - ) - (get_local $7) - ) + (loop $while-in$4 + (block $while-out$3 (if - (i32.eq - (get_local $3) - (get_local $5) + (i32.lt_u + (tee_local $16 + (i32.sub + (tee_local $3 + (i32.and + (i32.load offset=4 + (get_local $23) + ) + (i32.const -8) + ) + ) + (get_local $5) + ) + ) + (get_local $7) ) - (block - (set_local $26 - (get_local $16) + (if + (i32.eq + (get_local $3) + (get_local $5) ) - (set_local $24 - (get_local $23) + (block + (set_local $26 + (get_local $16) + ) + (set_local $24 + (get_local $23) + ) + (set_local $29 + (get_local $23) + ) + (set_local $11 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $29 + (set_local $36 (get_local $23) ) - (set_local $11 - (i32.const 90) - ) - (br $label$break$L123) ) - (set_local $36 - (get_local $23) + (set_local $16 + (get_local $7) ) ) - (set_local $16 - (get_local $7) - ) - ) - (set_local $7 - (i32.eq - (tee_local $3 - (i32.load offset=20 - (get_local $23) + (set_local $7 + (i32.eq + (tee_local $3 + (i32.load offset=20 + (get_local $23) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $15 - (select - (get_local $15) - (get_local $3) - (i32.or - (get_local $7) - (i32.eq - (get_local $3) - (tee_local $3 - (i32.load - (i32.add + (set_local $15 + (select + (get_local $15) + (get_local $3) + (i32.or + (get_local $7) + (i32.eq + (get_local $3) + (tee_local $3 + (i32.load (i32.add - (get_local $23) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $11) - (i32.const 31) + (i32.add + (get_local $23) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $11) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -11024,51 +11120,51 @@ ) ) ) - ) - (set_local $11 - (i32.shl - (get_local $11) - (i32.xor - (i32.and - (tee_local $7 - (i32.eq - (get_local $3) - (i32.const 0) + (set_local $11 + (i32.shl + (get_local $11) + (i32.xor + (i32.and + (tee_local $7 + (i32.eq + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) (i32.const 1) ) - (i32.const 1) - ) - ) - ) - (if - (get_local $7) - (block - (set_local $31 - (get_local $16) - ) - (set_local $32 - (get_local $15) - ) - (set_local $28 - (get_local $36) - ) - (set_local $11 - (i32.const 86) ) - (br $while-out$3) ) - (block - (set_local $7 - (get_local $16) + (if + (get_local $7) + (block + (set_local $31 + (get_local $16) + ) + (set_local $32 + (get_local $15) + ) + (set_local $28 + (get_local $36) + ) + (set_local $11 + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $23 - (get_local $3) + (block + (set_local $7 + (get_local $16) + ) + (set_local $23 + (get_local $3) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -11255,90 +11351,92 @@ (get_local $11) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $11 - (i32.const 0) - ) - (set_local $0 - (i32.lt_u - (tee_local $3 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $24) + (loop $while-in$6 + (block $while-out$5 + (set_local $11 + (i32.const 0) + ) + (set_local $0 + (i32.lt_u + (tee_local $3 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $24) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $5) ) - (get_local $5) ) + (get_local $26) ) - (get_local $26) - ) - ) - (set_local $17 - (select - (get_local $3) - (get_local $26) - (get_local $0) ) - ) - (set_local $3 - (select - (get_local $24) - (get_local $29) - (get_local $0) - ) - ) - (if - (i32.ne - (tee_local $0 - (i32.load offset=16 - (get_local $24) - ) + (set_local $17 + (select + (get_local $3) + (get_local $26) + (get_local $0) ) - (i32.const 0) ) - (block - (set_local $26 - (get_local $17) - ) - (set_local $24 + (set_local $3 + (select + (get_local $24) + (get_local $29) (get_local $0) ) - (set_local $29 - (get_local $3) - ) - (br $while-in$6) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load offset=20 - (get_local $24) + (if + (i32.ne + (tee_local $0 + (i32.load offset=16 + (get_local $24) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $13 - (get_local $3) + (block + (set_local $26 + (get_local $17) + ) + (set_local $24 + (get_local $0) + ) + (set_local $29 + (get_local $3) + ) + (br $while-in$6) ) - (br $while-out$5) ) - (block - (set_local $26 - (get_local $17) + (if + (i32.eq + (tee_local $0 + (i32.load offset=20 + (get_local $24) + ) + ) + (i32.const 0) ) - (set_local $24 - (get_local $0) + (block + (set_local $13 + (get_local $3) + ) + (br $while-out$5) ) - (set_local $29 - (get_local $3) + (block + (set_local $26 + (get_local $17) + ) + (set_local $24 + (get_local $0) + ) + (set_local $29 + (get_local $3) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -11440,57 +11538,59 @@ (set_local $8 (get_local $2) ) - ) - (loop $while-out$9 $while-in$10 - (if - (i32.ne - (tee_local $2 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 20) - ) - ) - ) - ) - (i32.const 0) - ) - (block - (set_local $8 - (get_local $2) - ) - (set_local $9 - (get_local $7) - ) - (br $while-in$10) - ) - ) - (if - (i32.eq - (tee_local $2 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 16) + ) + (loop $while-in$10 + (block $while-out$9 + (if + (i32.ne + (tee_local $2 + (i32.load + (tee_local $7 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) + (i32.const 0) + ) + (block + (set_local $8 + (get_local $2) + ) + (set_local $9 + (get_local $7) + ) + (br $while-in$10) ) - (i32.const 0) ) - (br $while-out$9) - (block - (set_local $8 - (get_local $2) + (if + (i32.eq + (tee_local $2 + (i32.load + (tee_local $7 + (i32.add + (get_local $8) + (i32.const 16) + ) + ) + ) + ) + (i32.const 0) ) - (set_local $9 - (get_local $7) + (br $while-out$9) + (block + (set_local $8 + (get_local $2) + ) + (set_local $9 + (get_local $7) + ) ) ) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -12099,78 +12199,80 @@ (get_local $2) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $2) + ) + (i32.const -8) + ) + (get_local $17) + ) + (block + (set_local $22 (get_local $2) ) - (i32.const -8) + (set_local $11 + (i32.const 148) + ) + (br $while-out$17) ) - (get_local $17) ) - (block - (set_local $22 - (get_local $2) - ) - (set_local $11 - (i32.const 148) + (set_local $4 + (i32.shl + (get_local $1) + (i32.const 1) ) - (br $while-out$17) - ) - ) - (set_local $4 - (i32.shl - (get_local $1) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $1 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $1 (i32.add - (get_local $2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) + (i32.add + (get_local $2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $25 - (get_local $2) - ) - (set_local $37 - (get_local $1) - ) - (set_local $11 - (i32.const 145) - ) - (br $while-out$17) - ) - (block - (set_local $1 - (get_local $4) + (block + (set_local $25 + (get_local $2) + ) + (set_local $37 + (get_local $1) + ) + (set_local $11 + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $2 - (get_local $0) + (block + (set_local $1 + (get_local $4) + ) + (set_local $2 + (get_local $0) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -12609,62 +12711,64 @@ (set_local $16 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (if - (i32.le_u - (tee_local $4 - (i32.load - (get_local $16) - ) - ) - (get_local $0) - ) + (loop $while-in$38 + (block $while-out$37 (if - (i32.gt_u - (i32.add - (get_local $4) + (i32.le_u + (tee_local $4 (i32.load - (tee_local $3 - (i32.add - (get_local $16) - (i32.const 4) - ) - ) + (get_local $16) ) ) (get_local $0) ) - (block - (set_local $4 - (get_local $16) + (if + (i32.gt_u + (i32.add + (get_local $4) + (i32.load + (tee_local $3 + (i32.add + (get_local $16) + (i32.const 4) + ) + ) + ) + ) + (get_local $0) ) - (set_local $16 - (get_local $3) + (block + (set_local $4 + (get_local $16) + ) + (set_local $16 + (get_local $3) + ) + (br $while-out$37) ) - (br $while-out$37) ) ) - ) - (if - (i32.eq - (tee_local $4 - (i32.load offset=8 - (get_local $16) + (if + (i32.eq + (tee_local $4 + (i32.load offset=8 + (get_local $16) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $11 - (i32.const 173) + (block + (set_local $11 + (i32.const 173) + ) + (br $label$break$L259) + ) + (set_local $16 + (get_local $4) ) - (br $label$break$L259) - ) - (set_local $16 - (get_local $4) ) + (br $while-in$38) ) - (br $while-in$38) ) (if (i32.lt_u @@ -13125,39 +13229,41 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$77 $while-in$78 - (i32.store offset=12 - (tee_local $0 - (i32.add - (i32.const 216) - (i32.shl + (loop $while-in$78 + (block $while-out$77 + (i32.store offset=12 + (tee_local $0 + (i32.add + (i32.const 216) (i32.shl - (get_local $1) - (i32.const 1) + (i32.shl + (get_local $1) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) + (get_local $0) ) - (get_local $0) - ) - (i32.store offset=8 - (get_local $0) - (get_local $0) - ) - (if - (i32.eq - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (i32.store offset=8 + (get_local $0) + (get_local $0) + ) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (i32.const 32) ) - (i32.const 32) + (br $while-out$77) ) - (br $while-out$77) + (br $while-in$78) ) - (br $while-in$78) ) (set_local $1 (i32.eq @@ -13231,62 +13337,64 @@ (set_local $7 (i32.const 624) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (get_local $14) - (i32.add - (tee_local $4 - (i32.load - (get_local $7) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (get_local $14) + (i32.add + (tee_local $4 + (i32.load + (get_local $7) + ) ) - ) - (tee_local $3 - (i32.load - (tee_local $5 - (i32.add - (get_local $7) - (i32.const 4) + (tee_local $3 + (i32.load + (tee_local $5 + (i32.add + (get_local $7) + (i32.const 4) + ) ) ) ) ) ) + (block + (set_local $1 + (get_local $4) + ) + (set_local $2 + (get_local $3) + ) + (set_local $42 + (get_local $5) + ) + (set_local $43 + (get_local $7) + ) + (set_local $11 + (i32.const 203) + ) + (br $while-out$46) + ) ) - (block - (set_local $1 - (get_local $4) - ) - (set_local $2 - (get_local $3) - ) - (set_local $42 - (get_local $5) - ) - (set_local $43 - (get_local $7) - ) - (set_local $11 - (i32.const 203) + (if + (i32.eq + (tee_local $4 + (i32.load offset=8 + (get_local $7) + ) + ) + (i32.const 0) ) (br $while-out$46) - ) - ) - (if - (i32.eq - (tee_local $4 - (i32.load offset=8 - (get_local $7) - ) + (set_local $7 + (get_local $4) ) - (i32.const 0) - ) - (br $while-out$46) - (set_local $7 - (get_local $4) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -13427,44 +13535,46 @@ (set_local $1 (i32.const 624) ) - (loop $while-out$48 $while-in$49 - (if - (i32.eq - (i32.load - (get_local $1) - ) - (get_local $3) - ) - (block - (set_local $44 - (get_local $1) - ) - (set_local $38 - (get_local $1) - ) - (set_local $11 - (i32.const 211) + (loop $while-in$49 + (block $while-out$48 + (if + (i32.eq + (i32.load + (get_local $1) + ) + (get_local $3) ) - (br $while-out$48) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load offset=8 + (block + (set_local $44 + (get_local $1) + ) + (set_local $38 (get_local $1) ) + (set_local $11 + (i32.const 211) + ) + (br $while-out$48) ) - (i32.const 0) ) - (block - (set_local $27 - (i32.const 624) + (if + (i32.eq + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (set_local $27 + (i32.const 624) + ) + (br $while-out$48) ) - (br $while-out$48) ) + (br $while-in$49) ) - (br $while-in$49) ) (if (i32.eq @@ -13880,56 +13990,58 @@ (get_local $1) ) ) - (loop $while-out$55 $while-in$56 - (if - (i32.ne - (tee_local $1 - (i32.load - (tee_local $20 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$56 + (block $while-out$55 + (if + (i32.ne + (tee_local $1 + (i32.load + (tee_local $20 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $1) - ) - (set_local $9 - (get_local $20) + (block + (set_local $2 + (get_local $1) + ) + (set_local $9 + (get_local $20) + ) + (br $while-in$56) ) - (br $while-in$56) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $20 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $20 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$55) - (block - (set_local $2 - (get_local $1) - ) - (set_local $9 - (get_local $20) + (br $while-out$55) + (block + (set_local $2 + (get_local $1) + ) + (set_local $9 + (get_local $20) + ) ) ) + (br $while-in$56) ) - (br $while-in$56) ) (if (i32.lt_u @@ -14530,78 +14642,80 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$70 + (block $while-out$69 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $2) + ) + (i32.const -8) + ) + (get_local $4) + ) + (block + (set_local $34 (get_local $2) ) - (i32.const -8) + (set_local $11 + (i32.const 281) + ) + (br $while-out$69) ) - (get_local $4) ) - (block - (set_local $34 - (get_local $2) - ) - (set_local $11 - (i32.const 281) + (set_local $8 + (i32.shl + (get_local $1) + (i32.const 1) ) - (br $while-out$69) - ) - ) - (set_local $8 - (i32.shl - (get_local $1) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $1 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $1 (i32.add - (get_local $2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) + (i32.add + (get_local $2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $45 - (get_local $2) - ) - (set_local $40 - (get_local $1) - ) - (set_local $11 - (i32.const 278) - ) - (br $while-out$69) - ) - (block - (set_local $1 - (get_local $8) + (block + (set_local $45 + (get_local $2) + ) + (set_local $40 + (get_local $1) + ) + (set_local $11 + (i32.const 278) + ) + (br $while-out$69) ) - (set_local $2 - (get_local $0) + (block + (set_local $1 + (get_local $8) + ) + (set_local $2 + (get_local $0) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (if (i32.eq @@ -14705,42 +14819,44 @@ ) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.le_u - (tee_local $1 - (i32.load - (get_local $27) - ) - ) - (get_local $0) - ) + (loop $while-in$72 + (block $while-out$71 (if - (i32.gt_u + (i32.le_u (tee_local $1 - (i32.add - (get_local $1) - (i32.load offset=4 - (get_local $27) - ) + (i32.load + (get_local $27) ) ) (get_local $0) ) - (block - (set_local $2 - (get_local $1) + (if + (i32.gt_u + (tee_local $1 + (i32.add + (get_local $1) + (i32.load offset=4 + (get_local $27) + ) + ) + ) + (get_local $0) + ) + (block + (set_local $2 + (get_local $1) + ) + (br $while-out$71) ) - (br $while-out$71) ) ) - ) - (set_local $27 - (i32.load offset=8 - (get_local $27) + (set_local $27 + (i32.load offset=8 + (get_local $27) + ) ) + (br $while-in$72) ) - (br $while-in$72) ) (set_local $8 (i32.eq @@ -14921,27 +15037,29 @@ (i32.const 24) ) ) - (loop $while-out$73 $while-in$74 - (i32.store - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (i32.store + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) + (i32.const 7) ) - (i32.const 7) - ) - (if - (i32.ge_u - (i32.add - (get_local $1) - (i32.const 4) + (if + (i32.ge_u + (i32.add + (get_local $1) + (i32.const 4) + ) + (get_local $2) ) - (get_local $2) + (br $while-out$73) ) - (br $while-out$73) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.ne @@ -15272,78 +15390,80 @@ (get_local $4) ) ) - (loop $while-out$75 $while-in$76 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$76 + (block $while-out$75 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $4) + ) + (i32.const -8) + ) + (get_local $3) + ) + (block + (set_local $35 (get_local $4) ) - (i32.const -8) + (set_local $11 + (i32.const 307) + ) + (br $while-out$75) ) - (get_local $3) ) - (block - (set_local $35 - (get_local $4) - ) - (set_local $11 - (i32.const 307) + (set_local $8 + (i32.shl + (get_local $2) + (i32.const 1) ) - (br $while-out$75) - ) - ) - (set_local $8 - (i32.shl - (get_local $2) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $2 - (i32.add + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $2 (i32.add - (get_local $4) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $2) - (i32.const 31) + (i32.add + (get_local $4) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $2) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $46 - (get_local $4) - ) - (set_local $41 - (get_local $2) - ) - (set_local $11 - (i32.const 304) - ) - (br $while-out$75) - ) - (block - (set_local $2 - (get_local $8) + (block + (set_local $46 + (get_local $4) + ) + (set_local $41 + (get_local $2) + ) + (set_local $11 + (i32.const 304) + ) + (br $while-out$75) ) - (set_local $4 - (get_local $1) + (block + (set_local $2 + (get_local $8) + ) + (set_local $4 + (get_local $1) + ) ) ) + (br $while-in$76) ) - (br $while-in$76) ) (if (i32.eq @@ -15881,56 +16001,58 @@ (get_local $0) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.ne - (tee_local $0 - (i32.load - (tee_local $13 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.ne + (tee_local $0 + (i32.load + (tee_local $13 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $7 - (get_local $13) + (block + (set_local $2 + (get_local $0) + ) + (set_local $7 + (get_local $13) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $13 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $13 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$4) - (block - (set_local $2 - (get_local $0) - ) - (set_local $7 - (get_local $13) + (br $while-out$4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $7 + (get_local $13) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -16555,56 +16677,58 @@ (get_local $1) ) ) - (loop $while-out$12 $while-in$13 - (if - (i32.ne - (tee_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (i32.ne + (tee_local $1 + (i32.load + (tee_local $7 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $1) - ) - (set_local $8 - (get_local $7) + (block + (set_local $2 + (get_local $1) + ) + (set_local $8 + (get_local $7) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $7 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$12) - (block - (set_local $2 - (get_local $1) - ) - (set_local $8 - (get_local $7) + (br $while-out$12) + (block + (set_local $2 + (get_local $1) + ) + (set_local $8 + (get_local $7) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -17212,78 +17336,80 @@ (get_local $1) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) + ) + (get_local $5) + ) + (block + (set_local $15 (get_local $1) ) - (i32.const -8) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (get_local $5) ) - (block - (set_local $15 - (get_local $1) - ) - (set_local $0 - (i32.const 130) + (set_local $2 + (i32.shl + (get_local $6) + (i32.const 1) ) - (br $while-out$18) ) - ) - (set_local $2 - (i32.shl - (get_local $6) - (i32.const 1) - ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $6 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $6 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $6) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $6) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $18 - (get_local $1) - ) - (set_local $17 - (get_local $6) - ) - (set_local $0 - (i32.const 127) - ) - (br $while-out$18) - ) - (block - (set_local $6 - (get_local $2) + (block + (set_local $18 + (get_local $1) + ) + (set_local $17 + (get_local $6) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $1 - (get_local $0) + (block + (set_local $6 + (get_local $2) + ) + (set_local $1 + (get_local $0) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -17395,28 +17521,30 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $0 - (i32.eq - (tee_local $6 - (i32.load - (get_local $6) + (loop $while-in$21 + (block $while-out$20 + (set_local $0 + (i32.eq + (tee_local $6 + (i32.load + (get_local $6) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const 8) + (set_local $6 + (i32.add + (get_local $6) + (i32.const 8) + ) ) + (if + (get_local $0) + (br $while-out$20) + ) + (br $while-in$21) ) - (if - (get_local $0) - (br $while-out$20) - ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -17532,66 +17660,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) @@ -17738,117 +17872,123 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eq - (get_local $2) - (i32.const 0) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eq + (get_local $2) + (i32.const 0) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -19166,152 +19306,154 @@ (set_local $0 (i32.const 0) ) - (loop $while-out$2 $while-in$3 - (set_local $6 - (i32.or - (i32.shr_u - (get_local $10) - (i32.const 31) - ) - (i32.shl - (get_local $9) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (set_local $6 + (i32.or + (i32.shr_u + (get_local $10) + (i32.const 31) + ) + (i32.shl + (get_local $9) + (i32.const 1) + ) ) ) - ) - (set_local $10 - (i32.or - (get_local $0) - (i32.shl - (get_local $10) - (i32.const 1) + (set_local $10 + (i32.or + (get_local $0) + (i32.shl + (get_local $10) + (i32.const 1) + ) ) ) - ) - (drop - (call $_i64Subtract - (get_local $3) - (get_local $8) - (tee_local $0 - (i32.or - (i32.const 0) + (drop + (call $_i64Subtract + (get_local $3) + (get_local $8) + (tee_local $0 (i32.or - (i32.shl - (get_local $11) - (i32.const 1) + (i32.const 0) + (i32.or + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.shr_u + (get_local $9) + (i32.const 31) + ) ) + ) + ) + (tee_local $9 + (i32.or (i32.shr_u - (get_local $9) + (get_local $11) (i32.const 31) ) - ) - ) - ) - (tee_local $9 - (i32.or - (i32.shr_u - (get_local $11) - (i32.const 31) - ) - (i32.shl - (get_local $13) - (i32.const 1) + (i32.shl + (get_local $13) + (i32.const 1) + ) ) ) ) ) - ) - (set_local $7 - (i32.and - (tee_local $14 - (i32.or - (i32.shr_s - (tee_local $5 - (i32.load - (i32.const 168) + (set_local $7 + (i32.and + (tee_local $14 + (i32.or + (i32.shr_s + (tee_local $5 + (i32.load + (i32.const 168) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (i32.const 1) ) - (i32.const 1) ) - ) - (set_local $11 - (call $_i64Subtract - (get_local $0) - (get_local $9) - (i32.and - (get_local $14) - (get_local $1) - ) - (i32.and - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (set_local $11 + (call $_i64Subtract + (get_local $0) + (get_local $9) + (i32.and + (get_local $14) + (get_local $1) + ) + (i32.and + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) + (get_local $2) ) - (get_local $2) ) ) - ) - (set_local $13 - (i32.load - (i32.const 168) - ) - ) - (if - (i32.eq - (tee_local $12 - (i32.sub - (get_local $12) - (i32.const 1) - ) + (set_local $13 + (i32.load + (i32.const 168) ) - (i32.const 0) ) - (br $while-out$2) - (block - (set_local $9 - (get_local $6) + (if + (i32.eq + (tee_local $12 + (i32.sub + (get_local $12) + (i32.const 1) + ) + ) + (i32.const 0) ) - (set_local $0 - (get_local $7) + (br $while-out$2) + (block + (set_local $9 + (get_local $6) + ) + (set_local $0 + (get_local $7) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $1 (i32.const 0) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 22f7c4018..1b3f505aa 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -410,51 +410,53 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (i32.and - (i32.load8_s offset=687 - (get_local $1) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (i32.and + (i32.load8_s offset=687 + (get_local $1) + ) + (i32.const 255) ) - (i32.const 255) - ) - (get_local $0) - ) - (block - (set_local $4 - (get_local $1) - ) - (set_local $0 - (i32.const 2) + (get_local $0) ) - (br $while-out$0) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.add + (block + (set_local $4 (get_local $1) - (i32.const 1) ) + (set_local $0 + (i32.const 2) + ) + (br $while-out$0) ) - (i32.const 87) ) - (block - (set_local $3 + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) (i32.const 87) ) - (set_local $2 - (i32.const 775) - ) - (set_local $0 - (i32.const 5) + (block + (set_local $3 + (i32.const 87) + ) + (set_local $2 + (i32.const 775) + ) + (set_local $0 + (i32.const 5) + ) + (br $while-out$0) ) - (br $while-out$0) ) + (br $while-in$1) ) - (br $while-in$1) ) (if (i32.eq @@ -487,65 +489,69 @@ (get_local $0) (i32.const 5) ) - (loop $while-out$2 $while-in$3 - (loop $while-out$4 $while-in$5 - (set_local $0 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (loop $while-in$5 + (block $while-out$4 + (set_local $0 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $2) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + (block + (set_local $1 + (get_local $0) + ) + (br $while-out$4) + ) + (set_local $2 + (get_local $0) + ) + ) + (br $while-in$5) ) ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) - ) - (i32.const 24) + (tee_local $0 + (i32.add + (get_local $3) + (i32.const -1) ) - (i32.const 24) ) (i32.const 0) ) (block - (set_local $1 - (get_local $0) + (set_local $5 + (get_local $1) ) - (br $while-out$4) - ) - (set_local $2 - (get_local $0) + (br $while-out$2) ) - ) - (br $while-in$5) - ) - (if - (i32.eq - (tee_local $0 - (i32.add - (get_local $3) - (i32.const -1) + (block + (set_local $3 + (get_local $0) + ) + (set_local $2 + (get_local $1) ) - ) - (i32.const 0) - ) - (block - (set_local $5 - (get_local $1) - ) - (br $while-out$2) - ) - (block - (set_local $3 - (get_local $0) - ) - (set_local $2 - (get_local $1) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) (get_local $5) @@ -837,69 +843,71 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $___lockfile (get_local $1) ) - (i32.const -1) - ) - (call $___lockfile - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $___fflush_unlocked - (get_local $1) + (i32.or + (call $___fflush_unlocked + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) - ) - ) - (if - (i32.ne - (get_local $0) - (i32.const 0) ) - (call $___unlockfile - (get_local $1) + (if + (i32.ne + (get_local $0) + (i32.const 0) + ) + (call $___unlockfile + (get_local $1) + ) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load offset=56 - (get_local $1) + (if + (i32.eq + (tee_local $0 + (i32.load offset=56 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) + ) + (set_local $1 + (get_local $0) ) - (br $while-out$2) - ) - (set_local $1 - (get_local $0) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -1117,206 +1125,208 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $3) - (tee_local $5 - (if - (i32.eq - (i32.load - (i32.const 16) - ) - (i32.const 0) - ) - (block - (i32.store - (get_local $9) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $3) + (tee_local $5 + (if + (i32.eq (i32.load - (get_local $12) + (i32.const 16) ) + (i32.const 0) ) - (i32.store offset=4 - (get_local $9) - (get_local $4) - ) - (i32.store offset=8 - (get_local $9) - (get_local $6) - ) - (call $___syscall_ret - (call_import $___syscall146 - (i32.const 146) + (block + (i32.store (get_local $9) + (i32.load + (get_local $12) + ) + ) + (i32.store offset=4 + (get_local $9) + (get_local $4) + ) + (i32.store offset=8 + (get_local $9) + (get_local $6) ) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 5) - (get_local $0) - ) - (i32.store - (get_local $10) - (i32.load - (get_local $12) - ) - ) - (i32.store offset=4 - (get_local $10) - (get_local $4) - ) - (i32.store offset=8 - (get_local $10) - (get_local $6) - ) - (set_local $1 (call $___syscall_ret (call_import $___syscall146 (i32.const 146) - (get_local $10) + (get_local $9) ) ) ) - (call_import $_pthread_cleanup_pop - (i32.const 0) + (block + (call_import $_pthread_cleanup_push + (i32.const 5) + (get_local $0) + ) + (i32.store + (get_local $10) + (i32.load + (get_local $12) + ) + ) + (i32.store offset=4 + (get_local $10) + (get_local $4) + ) + (i32.store offset=8 + (get_local $10) + (get_local $6) + ) + (set_local $1 + (call $___syscall_ret + (call_import $___syscall146 + (i32.const 146) + (get_local $10) + ) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (get_local $1) ) - (get_local $1) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $15 - (get_local $4) - ) - (set_local $16 - (get_local $6) - ) - (set_local $1 - (i32.const 8) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) - ) - ) - (set_local $17 - (i32.sub - (get_local $3) - (get_local $5) ) - ) - (set_local $1 (if - (i32.gt_u + (i32.lt_s (get_local $5) - (tee_local $1 - (i32.load offset=4 - (get_local $4) - ) - ) + (i32.const 0) ) (block - (i32.store - (get_local $7) - (tee_local $3 - (i32.load - (get_local $13) - ) - ) - ) - (i32.store - (get_local $11) - (get_local $3) - ) - (set_local $5 - (i32.sub - (get_local $5) - (get_local $1) - ) - ) - (set_local $3 - (i32.add - (get_local $4) - (i32.const 8) - ) + (set_local $15 + (get_local $4) ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const -1) - ) + (set_local $16 + (get_local $6) ) - (i32.load offset=12 - (get_local $4) + (set_local $1 + (i32.const 8) ) + (br $while-out$0) + ) + ) + (set_local $17 + (i32.sub + (get_local $3) + (get_local $5) ) + ) + (set_local $1 (if - (i32.eq - (get_local $6) - (i32.const 2) + (i32.gt_u + (get_local $5) + (tee_local $1 + (i32.load offset=4 + (get_local $4) + ) + ) ) (block (i32.store (get_local $7) - (i32.add + (tee_local $3 (i32.load - (get_local $7) + (get_local $13) ) + ) + ) + (i32.store + (get_local $11) + (get_local $3) + ) + (set_local $5 + (i32.sub (get_local $5) + (get_local $1) ) ) (set_local $3 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $6 - (i32.const 2) + (i32.add + (get_local $6) + (i32.const -1) + ) ) - (get_local $1) - ) - (block - (set_local $3 + (i32.load offset=12 (get_local $4) ) - (get_local $1) + ) + (if + (i32.eq + (get_local $6) + (i32.const 2) + ) + (block + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) + ) + (get_local $5) + ) + ) + (set_local $3 + (get_local $4) + ) + (set_local $6 + (i32.const 2) + ) + (get_local $1) + ) + (block + (set_local $3 + (get_local $4) + ) + (get_local $1) + ) ) ) ) - ) - (i32.store - (get_local $3) - (i32.add - (i32.load - (get_local $3) + (i32.store + (get_local $3) + (i32.add + (i32.load + (get_local $3) + ) + (get_local $5) ) - (get_local $5) ) - ) - (i32.store offset=4 - (get_local $3) - (i32.sub - (get_local $1) - (get_local $5) + (i32.store offset=4 + (get_local $3) + (i32.sub + (get_local $1) + (get_local $5) + ) ) + (set_local $4 + (get_local $3) + ) + (set_local $3 + (get_local $17) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $3) - ) - (set_local $3 - (get_local $17) - ) - (br $while-in$1) ) (if (i32.eq @@ -1844,48 +1854,50 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eq - (get_local $3) - (i32.const 0) - ) - (block - (set_local $2 + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eq + (get_local $3) (i32.const 0) ) - (br $label$break$L10 - (get_local $6) + (block + (set_local $2 + (i32.const 0) + ) + (br $label$break$L10 + (get_local $6) + ) ) ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $4 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $4 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) + ) + (br $while-out$2) + (set_local $3 + (get_local $4) ) - (i32.const 10) - ) - (br $while-out$2) - (set_local $3 - (get_local $4) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -2325,85 +2337,87 @@ (set_local $2 (get_local $0) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $2) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $6) + (i32.shr_s + (i32.shl + (get_local $6) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (block - (set_local $4 - (get_local $3) - ) - (set_local $5 - (get_local $2) ) - (set_local $3 - (i32.const 6) + (block + (set_local $4 + (get_local $3) + ) + (set_local $5 + (get_local $2) + ) + (set_local $3 + (i32.const 6) + ) + (br $label$break$L1) ) - (br $label$break$L1) ) - ) - (if - (i32.and - (tee_local $3 - (i32.ne - (tee_local $0 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.and + (tee_local $3 + (i32.ne + (tee_local $0 + (i32.add + (get_local $3) + (i32.const -1) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (i32.ne - (i32.and - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) + (i32.ne + (i32.and + (tee_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) ) + (i32.const 3) ) - (i32.const 3) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $3 - (get_local $0) - ) - (block - (set_local $14 + (set_local $3 (get_local $0) ) - (set_local $11 - (get_local $2) - ) - (set_local $15 - (get_local $3) - ) - (set_local $3 - (i32.const 5) + (block + (set_local $14 + (get_local $0) + ) + (set_local $11 + (get_local $2) + ) + (set_local $15 + (get_local $3) + ) + (set_local $3 + (i32.const 5) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -2502,69 +2516,71 @@ (i32.const 3) ) (block - (loop $while-out$5 $while-in$6 - (set_local $1 - (i32.add - (tee_local $6 - (i32.xor - (i32.load - (get_local $5) + (loop $while-in$6 + (block $while-out$5 + (set_local $1 + (i32.add + (tee_local $6 + (i32.xor + (i32.load + (get_local $5) + ) + (get_local $2) ) - (get_local $2) ) + (i32.const -16843009) ) - (i32.const -16843009) ) - ) - (if - (i32.ne - (i32.and - (i32.xor - (i32.and - (get_local $6) + (if + (i32.ne + (i32.and + (i32.xor + (i32.and + (get_local $6) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (get_local $1) ) - (get_local $1) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$5) - ) - (set_local $1 - (i32.add - (get_local $5) - (i32.const 4) + (br $while-out$5) ) - ) - (if - (i32.gt_u - (tee_local $4 - (i32.add - (get_local $4) - (i32.const -4) - ) + (set_local $1 + (i32.add + (get_local $5) + (i32.const 4) ) - (i32.const 3) ) - (set_local $5 - (get_local $1) - ) - (block - (set_local $12 - (get_local $4) + (if + (i32.gt_u + (tee_local $4 + (i32.add + (get_local $4) + (i32.const -4) + ) + ) + (i32.const 3) ) - (set_local $13 + (set_local $5 (get_local $1) ) - (set_local $3 - (i32.const 11) + (block + (set_local $12 + (get_local $4) + ) + (set_local $13 + (get_local $1) + ) + (set_local $3 + (i32.const 11) + ) + (br $label$break$L11) ) - (br $label$break$L11) ) + (br $while-in$6) ) - (br $while-in$6) ) (set_local $10 (get_local $4) @@ -2615,71 +2631,73 @@ ) ) ) - (loop $while-out$7 $while-in$8 - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) + (loop $while-in$8 + (block $while-out$7 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $0) + (i32.shr_s + (i32.shl + (get_local $0) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (block - (set_local $7 - (get_local $10) - ) - (set_local $8 - (get_local $9) ) - (br $label$break$L8) - ) - ) - (set_local $2 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.add + (block + (set_local $7 (get_local $10) - (i32.const -1) ) + (set_local $8 + (get_local $9) + ) + (br $label$break$L8) ) - (i32.const 0) ) - (block - (set_local $7 - (i32.const 0) - ) - (set_local $8 - (get_local $2) + (set_local $2 + (i32.add + (get_local $9) + (i32.const 1) ) - (br $while-out$7) ) - (block - (set_local $10 - (get_local $1) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $10) + (i32.const -1) + ) + ) + (i32.const 0) ) - (set_local $9 - (get_local $2) + (block + (set_local $7 + (i32.const 0) + ) + (set_local $8 + (get_local $2) + ) + (br $while-out$7) + ) + (block + (set_local $10 + (get_local $1) + ) + (set_local $9 + (get_local $2) + ) ) ) + (br $while-in$8) ) - (br $while-in$8) ) ) ) @@ -3099,631 +3117,325 @@ (set_local $8 (i32.const 0) ) - (loop $label$break$L1 $label$continue$L1 - (set_local $22 - (if - (i32.gt_s - (get_local $22) - (i32.const -1) - ) + (loop $label$continue$L1 + (block $label$break$L1 + (set_local $22 (if (i32.gt_s - (get_local $1) - (i32.sub - (i32.const 2147483647) - (get_local $22) - ) - ) - (block - (i32.store - (call $___errno_location) - (i32.const 75) - ) - (i32.const -1) - ) - (i32.add - (get_local $1) (get_local $22) + (i32.const -1) ) - ) - (get_local $22) - ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (get_local $20) + (if + (i32.gt_s + (get_local $1) + (i32.sub + (i32.const 2147483647) + (get_local $22) ) ) - (i32.const 24) + (block + (i32.store + (call $___errno_location) + (i32.const 75) + ) + (i32.const -1) + ) + (i32.add + (get_local $1) + (get_local $22) + ) ) - (i32.const 24) - ) - (i32.const 0) - ) - (block - (set_local $82 (get_local $22) ) - (set_local $83 - (get_local $8) - ) - (set_local $12 - (i32.const 242) - ) - (br $label$break$L1) ) - (set_local $5 - (get_local $20) - ) - ) - (loop $label$break$L9 $label$continue$L9 - (block $switch-default$5 - (block $switch-case$4 - (block $switch-case$3 - (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 - (i32.sub - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) + (if + (i32.eq + (i32.shr_s + (i32.shl + (tee_local $1 + (i32.load8_s + (get_local $20) ) - (i32.const 0) ) + (i32.const 24) ) + (i32.const 24) ) - (set_local $54 - (get_local $5) + (i32.const 0) + ) + (block + (set_local $82 + (get_local $22) ) - (set_local $65 - (get_local $5) + (set_local $83 + (get_local $8) ) (set_local $12 - (i32.const 9) + (i32.const 242) ) - (br $label$break$L9) - ) - (set_local $41 - (get_local $5) - ) - (set_local $55 - (get_local $5) + (br $label$break$L1) ) - (br $label$break$L9) - ) - (set_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) + (set_local $5 + (get_local $20) ) ) - (br $label$continue$L9) - ) - (block $label$break$L12 - (if - (i32.eq - (get_local $12) - (i32.const 9) - ) - (loop $while-out$7 $while-in$8 - (set_local $12 - (i32.const 0) - ) - (if - (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s offset=1 - (get_local $54) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 37) - ) - (block - (set_local $41 - (get_local $54) - ) - (set_local $55 - (get_local $65) - ) - (br $label$break$L12) - ) - ) - (set_local $5 - (i32.add - (get_local $65) - (i32.const 1) - ) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $54) - (i32.const 2) + (loop $label$continue$L9 + (block $label$break$L9 + (block $switch-default$5 + (block $switch-case$4 + (block $switch-case$3 + (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 + (i32.sub + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) ) + (i32.const 24) ) + (i32.const 0) ) - (i32.const 24) ) - (i32.const 24) ) - (i32.const 37) - ) - (block (set_local $54 - (get_local $1) + (get_local $5) ) (set_local $65 (get_local $5) ) - ) - (block - (set_local $41 - (get_local $1) - ) - (set_local $55 - (get_local $5) + (set_local $12 + (i32.const 9) ) - (br $while-out$7) + (br $label$break$L9) ) - ) - (br $while-in$8) - ) - ) - ) - (set_local $17 - (i32.sub - (get_local $55) - (get_local $20) - ) - ) - (if - (get_local $44) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (set_local $41 + (get_local $5) ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $20) - (get_local $17) - (get_local $0) - ) - ) - ) - (if - (i32.ne - (get_local $55) - (get_local $20) - ) - (block - (set_local $20 - (get_local $41) - ) - (set_local $1 - (get_local $17) - ) - (br $label$continue$L1) - ) - ) - (set_local $7 - (if - (i32.lt_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $41) - (i32.const 1) - ) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) + (set_local $55 + (get_local $5) ) + (br $label$break$L9) ) - (i32.const 10) - ) - (block (set_local $1 (i32.load8_s (tee_local $5 - (select - (i32.add - (get_local $41) - (i32.const 3) - ) + (i32.add (get_local $5) - (tee_local $7 - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $41) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 36) - ) - ) + (i32.const 1) ) ) ) ) - (set_local $11 - (select - (i32.const 1) - (get_local $8) - (get_local $7) - ) - ) - (set_local $9 - (get_local $5) - ) - (select - (get_local $6) - (i32.const -1) - (get_local $7) - ) - ) - (block - (set_local $11 - (get_local $8) - ) - (set_local $9 - (get_local $5) - ) - (i32.const -1) + (br $label$continue$L9) ) ) - ) - (block $label$break$L25 - (if - (i32.eq - (i32.and - (tee_local $5 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) - (i32.const -32) - ) - (i32.const 32) - ) - (block - (set_local $8 - (i32.const 0) + (block $label$break$L12 + (if + (i32.eq + (get_local $12) + (i32.const 9) ) - (loop $while-out$10 $while-in$11 - (if - (i32.eq - (i32.and - (i32.shl - (i32.const 1) - (i32.add - (get_local $5) - (i32.const -32) - ) - ) - (i32.const 75913) - ) + (loop $while-in$8 + (block $while-out$7 + (set_local $12 (i32.const 0) ) - (br $label$break$L25) - ) - (set_local $8 - (i32.or - (i32.shl - (i32.const 1) - (i32.add - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) + (if + (i32.ne + (i32.shr_s + (i32.shl + (i32.load8_s offset=1 + (get_local $54) ) (i32.const 24) ) - (i32.const -32) + (i32.const 24) ) + (i32.const 37) + ) + (block + (set_local $41 + (get_local $54) + ) + (set_local $55 + (get_local $65) + ) + (br $label$break$L12) ) - (get_local $8) ) - ) - (if - (i32.eq - (i32.and - (tee_local $5 - (i32.shr_s - (i32.shl + (set_local $5 + (i32.add + (get_local $65) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s (tee_local $1 - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) + (i32.add + (get_local $54) + (i32.const 2) ) ) - (i32.const 24) ) (i32.const 24) ) + (i32.const 24) ) - (i32.const -32) + (i32.const 37) ) - (i32.const 32) - ) - (set_local $9 - (get_local $6) - ) - (block - (set_local $9 - (get_local $6) + (block + (set_local $54 + (get_local $1) + ) + (set_local $65 + (get_local $5) + ) + ) + (block + (set_local $41 + (get_local $1) + ) + (set_local $55 + (get_local $5) + ) + (br $while-out$7) ) - (br $while-out$10) ) + (br $while-in$8) ) - (br $while-in$11) ) ) - (set_local $8 - (i32.const 0) + ) + (set_local $17 + (i32.sub + (get_local $55) + (get_local $20) ) ) - ) - (block $do-once$12 (if - (i32.eq - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) + (get_local $44) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 24) + (i32.const 0) + ) + (call $___fwritex + (get_local $20) + (get_local $17) + (get_local $0) ) - (i32.const 42) + ) + ) + (if + (i32.ne + (get_local $55) + (get_local $20) ) (block - (if - (i32.lt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl + (set_local $20 + (get_local $41) + ) + (set_local $1 + (get_local $17) + ) + (br $label$continue$L1) + ) + ) + (set_local $7 + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (tee_local $1 (i32.load8_s - (tee_local $6 + (tee_local $5 (i32.add - (get_local $9) + (get_local $41) (i32.const 1) ) ) ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $9) ) (i32.const 24) ) (i32.const 24) ) - (i32.const 36) + (i32.const -48) ) - (block - (i32.store - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) - ) - ) - (i32.const 10) - ) - (set_local $1 - (i32.load + ) + (i32.const 10) + ) + (block + (set_local $1 + (i32.load8_s + (tee_local $5 + (select (i32.add - (get_local $3) - (i32.shl - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) + (get_local $41) + (i32.const 3) + ) + (get_local $5) + (tee_local $7 + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s offset=2 + (get_local $41) ) (i32.const 24) ) - (i32.const -48) + (i32.const 24) ) - (i32.const 3) + (i32.const 36) ) ) ) ) - (set_local $66 - (i32.const 1) - ) - (set_local $67 - (i32.add - (get_local $9) - (i32.const 3) - ) - ) - (set_local $56 - (get_local $1) - ) ) - (set_local $12 - (i32.const 24) + ) + (set_local $11 + (select + (i32.const 1) + (get_local $8) + (get_local $7) ) ) - (set_local $12 - (i32.const 24) + (set_local $9 + (get_local $5) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 24) - ) - (block - (set_local $12 - (i32.const 0) - ) - (if - (i32.ne - (get_local $11) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (if - (i32.eqz - (get_local $44) - ) - (block - (set_local $9 - (get_local $6) - ) - (set_local $21 - (i32.const 0) - ) - (set_local $16 - (i32.const 0) - ) - (br $do-once$12) - ) - ) - (set_local $5 - (i32.load - (tee_local $1 - (i32.and - (i32.add - (i32.load - (get_local $2) - ) - (i32.const 3) - ) - (i32.const -4) - ) - ) - ) - ) - (i32.store - (get_local $2) - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - (set_local $66 - (i32.const 0) - ) - (set_local $67 - (get_local $6) - ) - (set_local $56 - (get_local $5) - ) + (select + (get_local $6) + (i32.const -1) + (get_local $7) ) ) - (set_local $8 - (if - (i32.lt_s - (get_local $56) - (i32.const 0) - ) - (block - (set_local $9 - (get_local $67) - ) - (set_local $21 - (get_local $66) - ) - (set_local $16 - (i32.sub - (i32.const 0) - (get_local $56) - ) - ) - (i32.or - (get_local $8) - (i32.const 8192) - ) - ) - (block - (set_local $9 - (get_local $67) - ) - (set_local $21 - (get_local $66) - ) - (set_local $16 - (get_local $56) - ) - (get_local $8) - ) + (block + (set_local $11 + (get_local $8) + ) + (set_local $9 + (get_local $5) ) + (i32.const -1) ) ) + ) + (block $label$break$L25 (if - (i32.lt_u - (tee_local $6 - (i32.add + (i32.eq + (i32.and + (tee_local $5 (i32.shr_s (i32.shl (get_local $1) @@ -3731,234 +3443,136 @@ ) (i32.const 24) ) - (i32.const -48) ) + (i32.const -32) ) - (i32.const 10) + (i32.const 32) ) (block - (set_local $1 - (get_local $9) - ) - (set_local $5 + (set_local $8 (i32.const 0) ) - (loop $while-out$14 $while-in$15 - (set_local $5 - (i32.add - (i32.mul - (get_local $5) - (i32.const 10) + (loop $while-in$11 + (block $while-out$10 + (if + (i32.eq + (i32.and + (i32.shl + (i32.const 1) + (i32.add + (get_local $5) + (i32.const -32) + ) + ) + (i32.const 75913) + ) + (i32.const 0) ) - (get_local $6) + (br $label$break$L25) ) - ) - (if - (i32.ge_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s + (set_local $8 + (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 -32) + ) + ) + (get_local $8) + ) + ) + (if + (i32.eq + (i32.and + (tee_local $5 + (i32.shr_s + (i32.shl (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 1) + ) + ) ) ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) ) - (i32.const -48) + (i32.const -32) ) + (i32.const 32) + ) + (set_local $9 + (get_local $6) + ) + (block + (set_local $9 + (get_local $6) + ) + (br $while-out$10) ) - (i32.const 10) - ) - (br $while-out$14) - ) - (br $while-in$15) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - (block - (set_local $9 - (get_local $1) - ) - (set_local $21 - (get_local $11) - ) - (set_local $16 - (get_local $5) ) + (br $while-in$11) ) ) ) - (block - (set_local $21 - (get_local $11) - ) - (set_local $16 - (i32.const 0) - ) + (set_local $8 + (i32.const 0) ) ) ) - ) - (set_local $11 - (block $label$break$L46 + (block $do-once$12 (if (i32.eq (i32.shr_s (i32.shl - (i32.load8_s - (get_local $9) - ) + (get_local $1) (i32.const 24) ) (i32.const 24) ) - (i32.const 46) + (i32.const 42) ) (block (if - (i32.ne - (i32.shr_s - (i32.shl - (tee_local $1 - (i32.load8_s - (tee_local $5 - (i32.add - (get_local $9) - (i32.const 1) + (i32.lt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 1) + ) ) ) + (i32.const 24) ) + (i32.const 24) ) - (i32.const 24) + (i32.const -48) ) - (i32.const 24) ) - (i32.const 42) - ) - (block - (if - (i32.lt_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (block - (set_local $1 - (get_local $5) - ) - (set_local $5 - (i32.const 0) - ) - ) - (block - (set_local $10 - (i32.const 0) - ) - (br $label$break$L46 - (get_local $5) - ) - ) - ) - (loop $while-in$18 - (set_local $5 - (i32.add - (i32.mul - (get_local $5) - (i32.const 10) - ) - (get_local $6) - ) - ) - (if - (i32.ge_u - (tee_local $6 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) - ) - (block - (set_local $10 - (get_local $5) - ) - (br $label$break$L46 - (get_local $1) - ) - ) - ) - (br $while-in$18) - ) - ) - ) - (if - (i32.lt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 2) - ) - ) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const -48) - ) - ) - (i32.const 10) + (i32.const 10) ) (if (i32.eq (i32.shr_s (i32.shl - (i32.load8_s offset=3 + (i32.load8_s offset=2 (get_local $9) ) (i32.const 24) @@ -4000,33 +3614,65 @@ ) ) ) - (set_local $10 - (get_local $1) + (set_local $66 + (i32.const 1) ) - (br $label$break$L46 + (set_local $67 (i32.add (get_local $9) - (i32.const 4) + (i32.const 3) ) ) + (set_local $56 + (get_local $1) + ) ) + (set_local $12 + (i32.const 24) + ) + ) + (set_local $12 + (i32.const 24) ) ) (if - (i32.ne - (get_local $21) - (i32.const 0) + (i32.eq + (get_local $12) + (i32.const 24) ) (block - (set_local $24 - (i32.const -1) + (set_local $12 + (i32.const 0) + ) + (if + (i32.ne + (get_local $11) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (i32.eqz + (get_local $44) + ) + (block + (set_local $9 + (get_local $6) + ) + (set_local $21 + (i32.const 0) + ) + (set_local $16 + (i32.const 0) + ) + (br $do-once$12) + ) ) - (br $label$break$L1) - ) - ) - (if - (get_local $44) - (block (set_local $5 (i32.load (tee_local $1 @@ -4049,131 +3695,489 @@ (i32.const 4) ) ) - (set_local $10 + (set_local $66 + (i32.const 0) + ) + (set_local $67 + (get_local $6) + ) + (set_local $56 (get_local $5) ) - (get_local $6) ) - (block - (set_local $10 + ) + (set_local $8 + (if + (i32.lt_s + (get_local $56) (i32.const 0) ) - (get_local $6) - ) - ) - ) - (block - (set_local $10 - (i32.const -1) - ) - (get_local $9) - ) - ) - ) - ) - (set_local $13 - (i32.const 0) - ) - (loop $while-out$19 $while-in$20 - (if - (i32.gt_u - (tee_local $1 - (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) + (block + (set_local $9 + (get_local $67) + ) + (set_local $21 + (get_local $66) + ) + (set_local $16 + (i32.sub + (i32.const 0) + (get_local $56) + ) + ) + (i32.or + (get_local $8) + (i32.const 8192) ) - (i32.const 24) ) - (i32.const 24) + (block + (set_local $9 + (get_local $67) + ) + (set_local $21 + (get_local $66) + ) + (set_local $16 + (get_local $56) + ) + (get_local $8) + ) ) - (i32.const -65) ) ) - (i32.const 57) - ) - (block - (set_local $24 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (set_local $9 - (i32.add - (get_local $11) - (i32.const 1) - ) - ) - (if - (i32.lt_u - (i32.add - (tee_local $5 - (i32.and - (tee_local $1 - (i32.load8_s - (i32.add - (i32.add - (i32.const 3611) - (i32.mul - (get_local $13) - (i32.const 58) - ) - ) + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl (get_local $1) + (i32.const 24) ) + (i32.const 24) ) + (i32.const -48) ) - (i32.const 255) ) + (i32.const 10) + ) + (block + (set_local $1 + (get_local $9) + ) + (set_local $5 + (i32.const 0) + ) + (loop $while-in$15 + (block $while-out$14 + (set_local $5 + (i32.add + (i32.mul + (get_local $5) + (i32.const 10) + ) + (get_local $6) + ) + ) + (if + (i32.ge_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (br $while-out$14) + ) + (br $while-in$15) + ) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + (block + (set_local $9 + (get_local $1) + ) + (set_local $21 + (get_local $11) + ) + (set_local $16 + (get_local $5) + ) + ) + ) + ) + (block + (set_local $21 + (get_local $11) + ) + (set_local $16 + (i32.const 0) + ) + ) + ) + ) + ) + (set_local $11 + (block $label$break$L46 + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 46) + ) + (block + (if + (i32.ne + (i32.shr_s + (i32.shl + (tee_local $1 + (i32.load8_s + (tee_local $5 + (i32.add + (get_local $9) + (i32.const 1) + ) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 42) + ) + (block + (if + (i32.lt_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (block + (set_local $1 + (get_local $5) + ) + (set_local $5 + (i32.const 0) + ) + ) + (block + (set_local $10 + (i32.const 0) + ) + (br $label$break$L46 + (get_local $5) + ) + ) + ) + (loop $while-in$18 + (set_local $5 + (i32.add + (i32.mul + (get_local $5) + (i32.const 10) + ) + (get_local $6) + ) + ) + (if + (i32.ge_u + (tee_local $6 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (block + (set_local $10 + (get_local $5) + ) + (br $label$break$L46 + (get_local $1) + ) + ) + ) + (br $while-in$18) + ) + ) + ) + (if + (i32.lt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 2) + ) + ) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + ) + (i32.const 10) + ) + (if + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s offset=3 + (get_local $9) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 36) + ) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) + ) + (i32.const 10) + ) + (set_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.shl + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $6) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -48) + ) + (i32.const 3) + ) + ) + ) + ) + (set_local $10 + (get_local $1) + ) + (br $label$break$L46 + (i32.add + (get_local $9) + (i32.const 4) + ) + ) + ) + ) + ) + (if + (i32.ne + (get_local $21) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (get_local $44) + (block + (set_local $5 + (i32.load + (tee_local $1 + (i32.and + (i32.add + (i32.load + (get_local $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (get_local $2) + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $10 + (get_local $5) + ) + (get_local $6) + ) + (block + (set_local $10 + (i32.const 0) + ) + (get_local $6) + ) + ) + ) + (block + (set_local $10 + (i32.const -1) + ) + (get_local $9) ) - (i32.const -1) - ) - (i32.const 8) - ) - (block - (set_local $11 - (get_local $9) - ) - (set_local $13 - (get_local $5) - ) - ) - (block - (set_local $6 - (get_local $5) - ) - (br $while-out$19) - ) - ) - (br $while-in$20) - ) - (if - (i32.eq - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) ) - (i32.const 24) ) + ) + (set_local $13 (i32.const 0) ) - (block - (set_local $24 - (i32.const -1) + (loop $while-in$20 + (block $while-out$19 + (if + (i32.gt_u + (tee_local $1 + (i32.add + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $11) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -65) + ) + ) + (i32.const 57) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (set_local $9 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (i32.add + (tee_local $5 + (i32.and + (tee_local $1 + (i32.load8_s + (i32.add + (i32.add + (i32.const 3611) + (i32.mul + (get_local $13) + (i32.const 58) + ) + ) + (get_local $1) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.const -1) + ) + (i32.const 8) + ) + (block + (set_local $11 + (get_local $9) + ) + (set_local $13 + (get_local $5) + ) + ) + (block + (set_local $6 + (get_local $5) + ) + (br $while-out$19) + ) + ) + (br $while-in$20) ) - (br $label$break$L1) - ) - ) - (set_local $5 - (i32.gt_s - (get_local $7) - (i32.const -1) ) - ) - (block $do-once$21 (if (i32.eq (i32.shr_s @@ -4183,202 +4187,244 @@ ) (i32.const 24) ) - (i32.const 19) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (set_local $5 + (i32.gt_s + (get_local $7) + (i32.const -1) ) + ) + (block $do-once$21 (if - (get_local $5) - (block - (set_local $24 - (i32.const -1) + (i32.eq + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) ) - (br $label$break$L1) + (i32.const 19) ) - (set_local $12 - (i32.const 52) - ) - ) - (block (if (get_local $5) (block - (i32.store - (i32.add - (get_local $4) - (i32.shl - (get_local $7) - (i32.const 2) + (set_local $24 + (i32.const -1) + ) + (br $label$break$L1) + ) + (set_local $12 + (i32.const 52) + ) + ) + (block + (if + (get_local $5) + (block + (i32.store + (i32.add + (get_local $4) + (i32.shl + (get_local $7) + (i32.const 2) + ) ) + (get_local $6) ) - (get_local $6) - ) - (set_local $5 - (i32.load - (tee_local $1 - (i32.add - (get_local $3) - (i32.shl - (get_local $7) - (i32.const 3) + (set_local $5 + (i32.load + (tee_local $1 + (i32.add + (get_local $3) + (i32.shl + (get_local $7) + (i32.const 3) + ) ) ) ) ) - ) - (set_local $1 - (i32.load offset=4 + (set_local $1 + (i32.load offset=4 + (get_local $1) + ) + ) + (i32.store + (tee_local $7 + (get_local $19) + ) + (get_local $5) + ) + (i32.store offset=4 + (get_local $7) (get_local $1) ) - ) - (i32.store - (tee_local $7 - (get_local $19) + (set_local $12 + (i32.const 52) ) - (get_local $5) - ) - (i32.store offset=4 - (get_local $7) - (get_local $1) - ) - (set_local $12 - (i32.const 52) + (br $do-once$21) ) - (br $do-once$21) ) - ) - (if - (i32.eqz - (get_local $44) - ) - (block - (set_local $24 - (i32.const 0) + (if + (i32.eqz + (get_local $44) + ) + (block + (set_local $24 + (i32.const 0) + ) + (br $label$break$L1) ) - (br $label$break$L1) ) - ) - (call $_pop_arg_336 - (get_local $19) - (get_local $6) - (get_local $2) + (call $_pop_arg_336 + (get_local $19) + (get_local $6) + (get_local $2) + ) ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 52) - ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 52) ) - (if - (i32.eqz - (get_local $44) + (block + (set_local $12 + (i32.const 0) ) - (block - (set_local $20 - (get_local $9) - ) - (set_local $1 - (get_local $17) + (if + (i32.eqz + (get_local $44) ) - (set_local $8 - (get_local $21) + (block + (set_local $20 + (get_local $9) + ) + (set_local $1 + (get_local $17) + ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) ) ) - ) - (set_local $5 - (i32.and - (i32.ne - (get_local $13) - (i32.const 0) - ) - (i32.eq - (i32.and - (tee_local $1 - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) + (set_local $5 + (i32.and + (i32.ne + (get_local $13) + (i32.const 0) + ) + (i32.eq + (i32.and + (tee_local $1 + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $11) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) ) + (i32.const 15) ) - (i32.const 15) + (i32.const 3) ) - (i32.const 3) ) ) - ) - (set_local $18 - (select - (get_local $8) - (tee_local $7 - (i32.and - (get_local $8) - (i32.const -65537) + (set_local $18 + (select + (get_local $8) + (tee_local $7 + (i32.and + (get_local $8) + (i32.const -65537) + ) ) - ) - (i32.eq - (i32.and - (get_local $8) - (i32.const 8192) + (i32.eq + (i32.and + (get_local $8) + (i32.const 8192) + ) + (i32.const 0) ) - (i32.const 0) ) ) - ) - (block $switch$24 - (block $switch-default$127 - (block $switch-case$49 - (block $switch-case$48 - (block $switch-case$47 - (block $switch-case$46 - (block $switch-case$45 - (block $switch-case$44 - (block $switch-case$43 - (block $switch-case$41 - (block $switch-case$40 - (block $switch-case$36 - (block $switch-case$35 - (block $switch-case$34 - (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 - (i32.sub - (tee_local $26 - (select - (i32.and + (block $switch$24 + (block $switch-default$127 + (block $switch-case$49 + (block $switch-case$48 + (block $switch-case$47 + (block $switch-case$46 + (block $switch-case$45 + (block $switch-case$44 + (block $switch-case$43 + (block $switch-case$41 + (block $switch-case$40 + (block $switch-case$36 + (block $switch-case$35 + (block $switch-case$34 + (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$49 $switch-default$127 $switch-case$44 $switch-case$41 $switch-case$49 $switch-case$49 $switch-case$49 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 + (i32.sub + (tee_local $26 + (select + (i32.and + (get_local $1) + (i32.const -33) + ) (get_local $1) - (i32.const -33) + (get_local $5) ) - (get_local $1) - (get_local $5) ) + (i32.const 65) ) - (i32.const 65) ) ) - ) - (block $switch-default$33 - (block $switch-case$32 - (block $switch-case$31 - (block $switch-case$30 - (block $switch-case$29 - (block $switch-case$28 - (block $switch-case$27 - (block $switch-case$26 - (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 - (i32.sub - (get_local $13) - (i32.const 0) + (block $switch-default$33 + (block $switch-case$32 + (block $switch-case$31 + (block $switch-case$30 + (block $switch-case$29 + (block $switch-case$28 + (block $switch-case$27 + (block $switch-case$26 + (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 + (i32.sub + (get_local $13) + (i32.const 0) + ) ) ) + (i32.store + (i32.load + (get_local $19) + ) + (get_local $22) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (get_local $17) + ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) (i32.store (i32.load @@ -4398,11 +4444,26 @@ (br $label$continue$L1) ) (i32.store - (i32.load - (get_local $19) + (tee_local $1 + (i32.load + (get_local $19) + ) ) (get_local $22) ) + (i32.store offset=4 + (get_local $1) + (i32.shr_s + (i32.shl + (i32.lt_s + (get_local $22) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) (set_local $20 (get_local $9) ) @@ -4414,25 +4475,13 @@ ) (br $label$continue$L1) ) - (i32.store - (tee_local $1 - (i32.load - (get_local $19) - ) + (i32.store16 + (i32.load + (get_local $19) ) - (get_local $22) - ) - (i32.store offset=4 - (get_local $1) - (i32.shr_s - (i32.shl - (i32.lt_s - (get_local $22) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.const 31) + (i32.and + (get_local $22) + (i32.const 65535) ) ) (set_local $20 @@ -4446,13 +4495,13 @@ ) (br $label$continue$L1) ) - (i32.store16 + (i32.store8 (i32.load (get_local $19) ) (i32.and (get_local $22) - (i32.const 65535) + (i32.const 255) ) ) (set_local $20 @@ -4466,14 +4515,11 @@ ) (br $label$continue$L1) ) - (i32.store8 + (i32.store (i32.load (get_local $19) ) - (i32.and - (get_local $22) - (i32.const 255) - ) + (get_local $22) ) (set_local $20 (get_local $9) @@ -4487,11 +4533,26 @@ (br $label$continue$L1) ) (i32.store - (i32.load - (get_local $19) + (tee_local $1 + (i32.load + (get_local $19) + ) ) (get_local $22) ) + (i32.store offset=4 + (get_local $1) + (i32.shr_s + (i32.shl + (i32.lt_s + (get_local $22) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) (set_local $20 (get_local $9) ) @@ -4503,27 +4564,6 @@ ) (br $label$continue$L1) ) - (i32.store - (tee_local $1 - (i32.load - (get_local $19) - ) - ) - (get_local $22) - ) - (i32.store offset=4 - (get_local $1) - (i32.shr_s - (i32.shl - (i32.lt_s - (get_local $22) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.const 31) - ) - ) (set_local $20 (get_local $9) ) @@ -4535,372 +4575,385 @@ ) (br $label$continue$L1) ) - (set_local $20 - (get_local $9) + (set_local $46 + (i32.or + (get_local $18) + (i32.const 8) + ) ) - (set_local $1 - (get_local $17) + (set_local $57 + (select + (get_local $10) + (i32.const 8) + (i32.gt_u + (get_local $10) + (i32.const 8) + ) + ) ) - (set_local $8 - (get_local $21) + (set_local $68 + (i32.const 120) + ) + (set_local $12 + (i32.const 64) ) - (br $label$continue$L1) + (br $switch$24) ) (set_local $46 - (i32.or - (get_local $18) - (i32.const 8) - ) + (get_local $18) ) (set_local $57 - (select - (get_local $10) - (i32.const 8) - (i32.gt_u - (get_local $10) - (i32.const 8) - ) - ) + (get_local $10) ) (set_local $68 - (i32.const 120) + (get_local $26) ) (set_local $12 (i32.const 64) ) (br $switch$24) ) - (set_local $46 - (get_local $18) - ) - (set_local $57 - (get_local $10) - ) - (set_local $68 - (get_local $26) - ) - (set_local $12 - (i32.const 64) - ) - (br $switch$24) - ) - (if - (i32.and - (i32.eq - (tee_local $5 - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - ) - (i32.const 0) - ) - (i32.eq - (tee_local $1 - (i32.load offset=4 - (get_local $1) - ) - ) - (i32.const 0) - ) - ) - (set_local $6 - (get_local $28) - ) - (block - (set_local $6 - (get_local $28) - ) - (loop $while-out$38 $while-in$39 - (i32.store8 - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -1) + (if + (i32.and + (i32.eq + (tee_local $5 + (i32.load + (tee_local $1 + (get_local $19) + ) ) ) - (i32.and - (i32.or - (i32.and - (get_local $5) - (i32.const 7) - ) - (i32.const 48) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load offset=4 + (get_local $1) ) - (i32.const 255) ) + (i32.const 0) ) - (if - (i32.and - (i32.eq - (tee_local $5 - (call $_bitshift64Lshr - (get_local $5) - (get_local $1) - (i32.const 3) + ) + (set_local $6 + (get_local $28) + ) + (block + (set_local $6 + (get_local $28) + ) + (loop $while-in$39 + (block $while-out$38 + (i32.store8 + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -1) ) ) - (i32.const 0) + (i32.and + (i32.or + (i32.and + (get_local $5) + (i32.const 7) + ) + (i32.const 48) + ) + (i32.const 255) + ) ) - (i32.eq - (tee_local $1 - (i32.load - (i32.const 168) + (if + (i32.and + (i32.eq + (tee_local $5 + (call $_bitshift64Lshr + (get_local $5) + (get_local $1) + (i32.const 3) + ) + ) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load + (i32.const 168) + ) + ) + (i32.const 0) ) ) - (i32.const 0) + (br $while-out$38) ) + (br $while-in$39) ) - (br $while-out$38) ) - (br $while-in$39) ) ) - ) - (set_local $58 - (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 8) - ) - (i32.const 0) - ) - (block - (set_local $34 - (get_local $18) - ) - (set_local $32 - (get_local $10) - ) - (set_local $35 + (set_local $58 + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 8) + ) (i32.const 0) ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - (block - (set_local $5 - (i32.lt_s + (block + (set_local $34 + (get_local $18) + ) + (set_local $32 (get_local $10) - (tee_local $1 - (i32.add - (i32.sub - (get_local $71) - (get_local $6) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) + ) + (block + (set_local $5 + (i32.lt_s + (get_local $10) + (tee_local $1 + (i32.add + (i32.sub + (get_local $71) + (get_local $6) + ) + (i32.const 1) ) - (i32.const 1) ) ) ) - ) - (set_local $34 - (get_local $18) - ) - (set_local $32 - (select - (get_local $1) - (get_local $10) - (get_local $5) + (set_local $34 + (get_local $18) ) + (set_local $32 + (select + (get_local $1) + (get_local $10) + (get_local $5) + ) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - ) - ) - (br $switch$24) - ) - (set_local $5 - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - ) - (if - (i32.lt_s - (tee_local $33 - (i32.load offset=4 - (get_local $1) ) ) - (i32.const 0) + (br $switch$24) ) - (block - (set_local $1 - (call $_i64Subtract - (i32.const 0) - (i32.const 0) - (get_local $5) - (get_local $33) - ) - ) - (set_local $5 - (i32.load - (i32.const 168) - ) - ) - (i32.store - (tee_local $33 + (set_local $5 + (i32.load + (tee_local $1 (get_local $19) ) - (get_local $1) - ) - (i32.store offset=4 - (get_local $33) - (get_local $5) - ) - (set_local $33 - (get_local $1) - ) - (set_local $59 - (get_local $5) - ) - (set_local $60 - (i32.const 1) - ) - (set_local $61 - (i32.const 4091) ) - (set_local $12 - (i32.const 76) - ) - (br $switch$24) ) - ) - (set_local $33 (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 2048) + (i32.lt_s + (tee_local $33 + (i32.load offset=4 + (get_local $1) + ) ) (i32.const 0) ) (block (set_local $1 - (select - (i32.const 4091) - (i32.const 4093) - (i32.eq - (tee_local $6 - (i32.and - (get_local $18) - (i32.const 1) - ) - ) - (i32.const 0) - ) + (call $_i64Subtract + (i32.const 0) + (i32.const 0) + (get_local $5) + (get_local $33) ) ) - (set_local $59 + (set_local $5 + (i32.load + (i32.const 168) + ) + ) + (i32.store + (tee_local $33 + (get_local $19) + ) + (get_local $1) + ) + (i32.store offset=4 (get_local $33) + (get_local $5) + ) + (set_local $33 + (get_local $1) + ) + (set_local $59 + (get_local $5) ) (set_local $60 - (get_local $6) + (i32.const 1) ) (set_local $61 - (get_local $1) + (i32.const 4091) + ) + (set_local $12 + (i32.const 76) + ) + (br $switch$24) + ) + ) + (set_local $33 + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 2048) + ) + (i32.const 0) + ) + (block + (set_local $1 + (select + (i32.const 4091) + (i32.const 4093) + (i32.eq + (tee_local $6 + (i32.and + (get_local $18) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + ) + (set_local $59 + (get_local $33) + ) + (set_local $60 + (get_local $6) + ) + (set_local $61 + (get_local $1) + ) + (set_local $12 + (i32.const 76) + ) + (get_local $5) ) - (set_local $12 - (i32.const 76) + (block + (set_local $59 + (get_local $33) + ) + (set_local $60 + (i32.const 1) + ) + (set_local $61 + (i32.const 4092) + ) + (set_local $12 + (i32.const 76) + ) + (get_local $5) ) - (get_local $5) ) - (block - (set_local $59 - (get_local $33) - ) - (set_local $60 - (i32.const 1) - ) - (set_local $61 - (i32.const 4092) - ) - (set_local $12 - (i32.const 76) - ) - (get_local $5) + ) + (br $switch$24) + ) + (set_local $33 + (i32.load + (tee_local $1 + (get_local $19) ) ) ) + (set_local $59 + (i32.load offset=4 + (get_local $1) + ) + ) + (set_local $60 + (i32.const 0) + ) + (set_local $61 + (i32.const 4091) + ) + (set_local $12 + (i32.const 76) + ) (br $switch$24) ) - (set_local $33 + (set_local $1 (i32.load - (tee_local $1 - (get_local $19) - ) + (get_local $19) ) ) - (set_local $59 - (i32.load offset=4 + (i32.store8 + (get_local $72) + (i32.and (get_local $1) + (i32.const 255) ) ) - (set_local $60 + (set_local $47 + (get_local $72) + ) + (set_local $37 + (get_local $7) + ) + (set_local $42 + (i32.const 1) + ) + (set_local $43 (i32.const 0) ) - (set_local $61 + (set_local $48 (i32.const 4091) ) - (set_local $12 - (i32.const 76) + (set_local $49 + (get_local $28) ) (br $switch$24) ) - (set_local $1 - (i32.load - (get_local $19) - ) - ) - (i32.store8 - (get_local $72) - (i32.and - (get_local $1) - (i32.const 255) + (set_local $50 + (call $_strerror + (i32.load + (call $___errno_location) + ) ) ) - (set_local $47 - (get_local $72) - ) - (set_local $37 - (get_local $7) - ) - (set_local $42 - (i32.const 1) + (set_local $12 + (i32.const 82) ) - (set_local $43 + (br $switch$24) + ) + (set_local $5 + (i32.ne + (tee_local $1 + (i32.load + (get_local $19) + ) + ) (i32.const 0) ) - (set_local $48 - (i32.const 4091) - ) - (set_local $49 - (get_local $28) - ) - (br $switch$24) ) (set_local $50 - (call $_strerror - (i32.load - (call $___errno_location) - ) + (select + (get_local $1) + (i32.const 4101) + (get_local $5) ) ) (set_local $12 @@ -4908,1063 +4961,1091 @@ ) (br $switch$24) ) - (set_local $5 - (i32.ne - (tee_local $1 - (i32.load - (get_local $19) - ) - ) - (i32.const 0) + (set_local $1 + (i32.load + (get_local $19) ) ) - (set_local $50 - (select - (get_local $1) - (i32.const 4101) - (get_local $5) - ) + (i32.store + (get_local $73) + (get_local $1) ) - (set_local $12 - (i32.const 82) + (i32.store + (get_local $76) + (i32.const 0) ) - (br $switch$24) - ) - (set_local $1 - (i32.load + (i32.store (get_local $19) + (get_local $73) ) - ) - (i32.store - (get_local $73) - (get_local $1) - ) - (i32.store - (get_local $76) - (i32.const 0) - ) - (i32.store - (get_local $19) - (get_local $73) - ) - (set_local $69 - (i32.const -1) + (set_local $69 + (i32.const -1) + ) + (set_local $12 + (i32.const 86) + ) + (br $switch$24) ) (set_local $12 - (i32.const 86) - ) - (br $switch$24) - ) - (set_local $12 - (if - (i32.eq - (get_local $10) - (i32.const 0) - ) - (block - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) + (if + (i32.eq + (get_local $10) (i32.const 0) - (get_local $18) ) - (set_local $38 - (i32.const 0) + (block + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (i32.const 0) + (get_local $18) + ) + (set_local $38 + (i32.const 0) + ) + (i32.const 98) ) - (i32.const 98) - ) - (block - (set_local $69 - (get_local $10) + (block + (set_local $69 + (get_local $10) + ) + (i32.const 86) ) - (i32.const 86) ) ) + (br $switch$24) ) - (br $switch$24) - ) - (set_local $14 - (f64.load - (get_local $19) + (set_local $14 + (f64.load + (get_local $19) + ) ) - ) - (i32.store - (get_local $25) - (i32.const 0) - ) - (f64.store - (i32.load - (i32.const 24) + (i32.store + (get_local $25) + (i32.const 0) ) - (get_local $14) - ) - (set_local $51 - (if - (i32.lt_s - (i32.load offset=4 - (i32.load - (i32.const 24) - ) - ) - (i32.const 0) - ) - (block - (set_local $39 - (i32.const 4108) - ) - (set_local $14 - (f64.neg - (get_local $14) - ) - ) - (i32.const 1) + (f64.store + (i32.load + (i32.const 24) ) + (get_local $14) + ) + (set_local $51 (if - (i32.eq - (i32.and - (get_local $18) - (i32.const 2048) - ) - (i32.const 0) - ) - (block - (set_local $39 - (select - (i32.const 4109) - (i32.const 4114) - (i32.eq - (tee_local $1 - (i32.and - (get_local $18) - (i32.const 1) - ) - ) - (i32.const 0) - ) + (i32.lt_s + (i32.load offset=4 + (i32.load + (i32.const 24) ) ) - (get_local $1) - ) - (block - (set_local $39 - (i32.const 4111) - ) - (i32.const 1) - ) - ) - ) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $14) - ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (block $do-once$56 - (if - (i32.or - (i32.lt_u - (tee_local $1 - (i32.and - (i32.load offset=4 - (i32.load - (i32.const 24) + (i32.const 0) + ) + (block + (set_local $39 + (i32.const 4108) + ) + (set_local $14 + (f64.neg + (get_local $14) + ) + ) + (i32.const 1) + ) + (if + (i32.eq + (i32.and + (get_local $18) + (i32.const 2048) + ) + (i32.const 0) + ) + (block + (set_local $39 + (select + (i32.const 4109) + (i32.const 4114) + (i32.eq + (tee_local $1 + (i32.and + (get_local $18) + (i32.const 1) + ) ) + (i32.const 0) ) - (i32.const 2146435072) ) ) - (i32.const 2146435072) + (get_local $1) ) - (i32.and - (i32.eq - (get_local $1) - (i32.const 2146435072) + (block + (set_local $39 + (i32.const 4111) ) - (i32.const 0) + (i32.const 1) ) ) - (block - (if - (tee_local $5 - (f64.ne - (tee_local $14 - (f64.mul - (call $_frexpl - (get_local $14) - (get_local $25) + ) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $14) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (block $do-once$56 + (if + (i32.or + (i32.lt_u + (tee_local $1 + (i32.and + (i32.load offset=4 + (i32.load + (i32.const 24) ) - (f64.const 2) ) + (i32.const 2146435072) ) - (f64.const 0) ) + (i32.const 2146435072) ) - (i32.store - (get_local $25) - (i32.add - (i32.load - (get_local $25) - ) - (i32.const -1) + (i32.and + (i32.eq + (get_local $1) + (i32.const 2146435072) ) + (i32.const 0) ) ) - (if - (i32.eq - (tee_local $15 - (i32.or - (get_local $26) - (i32.const 32) - ) - ) - (i32.const 97) - ) - (block - (set_local $9 - (select - (get_local $39) - (i32.add - (get_local $39) - (i32.const 9) - ) - (i32.eq - (tee_local $6 - (i32.and - (get_local $26) - (i32.const 32) + (block + (if + (tee_local $5 + (f64.ne + (tee_local $14 + (f64.mul + (call $_frexpl + (get_local $14) + (get_local $25) ) + (f64.const 2) ) - (i32.const 0) ) + (f64.const 0) ) ) - (set_local $7 - (i32.or - (get_local $51) - (i32.const 2) + (i32.store + (get_local $25) + (i32.add + (i32.load + (get_local $25) + ) + (i32.const -1) ) ) - (set_local $14 - (if + ) + (if + (i32.eq + (tee_local $15 (i32.or - (i32.gt_u - (get_local $10) - (i32.const 11) + (get_local $26) + (i32.const 32) + ) + ) + (i32.const 97) + ) + (block + (set_local $9 + (select + (get_local $39) + (i32.add + (get_local $39) + (i32.const 9) ) (i32.eq - (tee_local $1 - (i32.sub - (i32.const 12) - (get_local $10) + (tee_local $6 + (i32.and + (get_local $26) + (i32.const 32) ) ) (i32.const 0) ) ) - (get_local $14) - (block - (set_local $30 - (f64.const 8) - ) - (loop $while-out$60 $while-in$61 - (set_local $30 - (f64.mul - (get_local $30) - (f64.const 16) - ) + ) + (set_local $7 + (i32.or + (get_local $51) + (i32.const 2) + ) + ) + (set_local $14 + (if + (i32.or + (i32.gt_u + (get_local $10) + (i32.const 11) ) - (if - (i32.eq - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) - ) + (i32.eq + (tee_local $1 + (i32.sub + (i32.const 12) + (get_local $10) ) - (i32.const 0) ) - (br $while-out$60) + (i32.const 0) ) - (br $while-in$61) ) - (select - (f64.neg - (f64.add - (get_local $30) - (f64.sub - (f64.neg - (get_local $14) + (get_local $14) + (block + (set_local $30 + (f64.const 8) + ) + (loop $while-in$61 + (block $while-out$60 + (set_local $30 + (f64.mul + (get_local $30) + (f64.const 16) ) - (get_local $30) ) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 0) + ) + (br $while-out$60) + ) + (br $while-in$61) ) ) - (f64.sub - (f64.add - (get_local $14) + (select + (f64.neg + (f64.add + (get_local $30) + (f64.sub + (f64.neg + (get_local $14) + ) + (get_local $30) + ) + ) + ) + (f64.sub + (f64.add + (get_local $14) + (get_local $30) + ) (get_local $30) ) - (get_local $30) - ) - (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) + (i32.eq + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $9) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 45) ) - (i32.const 45) ) ) ) ) - ) - (set_local $5 - (i32.lt_s - (tee_local $1 - (i32.load - (get_local $25) + (set_local $5 + (i32.lt_s + (tee_local $1 + (i32.load + (get_local $25) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.shr_s - (i32.shl - (i32.lt_s - (tee_local $8 - (select - (i32.sub - (i32.const 0) + (set_local $5 + (i32.shr_s + (i32.shl + (i32.lt_s + (tee_local $8 + (select + (i32.sub + (i32.const 0) + (get_local $1) + ) (get_local $1) + (get_local $5) ) - (get_local $1) - (get_local $5) ) + (i32.const 0) ) - (i32.const 0) + (i32.const 31) ) (i32.const 31) ) - (i32.const 31) ) - ) - (i32.store8 - (i32.add - (tee_local $5 - (if - (i32.eq - (tee_local $5 - (call $_fmt_u - (get_local $8) - (get_local $5) - (get_local $52) + (i32.store8 + (i32.add + (tee_local $5 + (if + (i32.eq + (tee_local $5 + (call $_fmt_u + (get_local $8) + (get_local $5) + (get_local $52) + ) ) + (get_local $52) ) - (get_local $52) - ) - (block - (i32.store8 + (block + (i32.store8 + (get_local $74) + (i32.const 48) + ) (get_local $74) - (i32.const 48) ) - (get_local $74) + (get_local $5) ) - (get_local $5) ) + (i32.const -1) ) - (i32.const -1) - ) - (i32.and - (i32.add - (i32.and - (i32.shr_s - (get_local $1) - (i32.const 31) + (i32.and + (i32.add + (i32.and + (i32.shr_s + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 43) ) - (i32.const 43) + (i32.const 255) ) - (i32.const 255) ) - ) - (i32.store8 - (tee_local $8 - (i32.add - (get_local $5) - (i32.const -2) + (i32.store8 + (tee_local $8 + (i32.add + (get_local $5) + (i32.const -2) + ) ) - ) - (i32.and - (i32.add - (get_local $26) - (i32.const 15) + (i32.and + (i32.add + (get_local $26) + (i32.const 15) + ) + (i32.const 255) ) - (i32.const 255) ) - ) - (set_local $5 - (i32.lt_s - (get_local $10) - (i32.const 1) + (set_local $5 + (i32.lt_s + (get_local $10) + (i32.const 1) + ) ) - ) - (set_local $13 - (i32.eq - (i32.and - (get_local $18) - (i32.const 8) + (set_local $13 + (i32.eq + (i32.and + (get_local $18) + (i32.const 8) + ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $11 - (get_local $29) - ) - (loop $while-out$62 $while-in$63 - (i32.store8 - (get_local $11) - (i32.and - (i32.or + (set_local $11 + (get_local $29) + ) + (loop $while-in$63 + (block $while-out$62 + (i32.store8 + (get_local $11) (i32.and - (i32.load8_s - (i32.add - (tee_local $1 - (i32.trunc_s/f64 - (get_local $14) + (i32.or + (i32.and + (i32.load8_s + (i32.add + (tee_local $1 + (i32.trunc_s/f64 + (get_local $14) + ) + ) + (i32.const 4075) ) ) - (i32.const 4075) + (i32.const 255) ) + (get_local $6) ) (i32.const 255) ) - (get_local $6) ) - (i32.const 255) - ) - ) - (set_local $14 - (f64.mul - (f64.sub - (get_local $14) - (f64.convert_s/i32 - (get_local $1) + (set_local $14 + (f64.mul + (f64.sub + (get_local $14) + (f64.convert_s/i32 + (get_local $1) + ) + ) + (f64.const 16) ) ) - (f64.const 16) - ) - ) - (set_local $11 - (block $do-once$64 - (if - (i32.eq - (i32.sub - (tee_local $1 - (i32.add - (get_local $11) - (i32.const 1) + (set_local $11 + (block $do-once$64 + (if + (i32.eq + (i32.sub + (tee_local $1 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (get_local $64) ) + (i32.const 1) ) - (get_local $64) - ) - (i32.const 1) - ) - (block - (br_if $do-once$64 - (get_local $1) - (i32.and - (get_local $13) - (i32.and - (get_local $5) - (f64.eq - (get_local $14) - (f64.const 0) + (block + (br_if $do-once$64 + (get_local $1) + (i32.and + (get_local $13) + (i32.and + (get_local $5) + (f64.eq + (get_local $14) + (f64.const 0) + ) + ) ) ) + (i32.store8 + (get_local $1) + (i32.const 46) + ) + (i32.add + (get_local $11) + (i32.const 2) + ) ) - ) - (i32.store8 (get_local $1) - (i32.const 46) ) - (i32.add + ) + ) + (if + (f64.eq + (get_local $14) + (f64.const 0) + ) + (block + (set_local $1 (get_local $11) - (i32.const 2) ) + (br $while-out$62) ) - (get_local $1) ) + (br $while-in$63) ) ) - (if - (f64.eq - (get_local $14) - (f64.const 0) - ) - (block - (set_local $1 - (get_local $11) + (set_local $5 + (i32.and + (i32.ne + (get_local $10) + (i32.const 0) ) - (br $while-out$62) - ) - ) - (br $while-in$63) - ) - (set_local $5 - (i32.and - (i32.ne - (get_local $10) - (i32.const 0) - ) - (i32.lt_s - (i32.add - (get_local $78) - (get_local $1) + (i32.lt_s + (i32.add + (get_local $78) + (get_local $1) + ) + (get_local $10) ) - (get_local $10) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $5 - (i32.add - (tee_local $6 - (select - (i32.sub - (i32.add - (get_local $79) - (get_local $10) - ) - (get_local $8) - ) - (i32.add + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $5 + (i32.add + (tee_local $6 + (select (i32.sub - (get_local $77) + (i32.add + (get_local $79) + (get_local $10) + ) (get_local $8) ) - (get_local $1) + (i32.add + (i32.sub + (get_local $77) + (get_local $8) + ) + (get_local $1) + ) + (get_local $5) ) - (get_local $5) ) + (get_local $7) ) - (get_local $7) - ) - ) - (get_local $18) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) ) - (i32.const 0) - ) - (call $___fwritex - (get_local $9) - (get_local $7) - (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $16) - (get_local $5) - (i32.xor (get_local $18) - (i32.const 65536) - ) - ) - (set_local $1 - (i32.sub - (get_local $1) - (get_local $64) ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $9) + (get_local $7) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $29) - (get_local $1) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $16) + (get_local $5) + (i32.xor + (get_local $18) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.sub - (get_local $6) - (i32.add + (set_local $1 + (i32.sub (get_local $1) - (tee_local $1 - (i32.sub - (get_local $40) - (get_local $8) + (get_local $64) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) + (i32.const 0) + ) + (call $___fwritex + (get_local $29) + (get_local $1) + (get_local $0) ) ) - (i32.const 0) - (i32.const 0) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.sub + (get_local $6) + (i32.add + (get_local $1) + (tee_local $1 + (i32.sub + (get_local $40) + (get_local $8) + ) + ) ) - (i32.const 32) ) (i32.const 0) + (i32.const 0) ) - (call $___fwritex - (get_local $8) - (get_local $1) - (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $5) - (i32.xor - (get_local $18) - (i32.const 8192) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (get_local $1) + (get_local $0) + ) ) - ) - (br $do-once$56 - (select + (call $_pad + (get_local $0) + (i32.const 32) (get_local $16) (get_local $5) - (i32.lt_s - (get_local $5) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (br $do-once$56 + (select (get_local $16) + (get_local $5) + (i32.lt_s + (get_local $5) + (get_local $16) + ) ) ) ) ) - ) - (set_local $1 - (select - (i32.const 6) - (get_local $10) - (i32.lt_s + (set_local $1 + (select + (i32.const 6) (get_local $10) - (i32.const 0) + (i32.lt_s + (get_local $10) + (i32.const 0) + ) ) ) - ) - (set_local $62 - (tee_local $9 - (select - (get_local $80) - (get_local $81) - (i32.lt_s - (if - (get_local $5) - (block - (i32.store - (get_local $25) - (tee_local $5 - (i32.add - (i32.load - (get_local $25) + (set_local $62 + (tee_local $9 + (select + (get_local $80) + (get_local $81) + (i32.lt_s + (if + (get_local $5) + (block + (i32.store + (get_local $25) + (tee_local $5 + (i32.add + (i32.load + (get_local $25) + ) + (i32.const -28) ) - (i32.const -28) ) ) - ) - (set_local $14 - (f64.mul - (get_local $14) - (f64.const 268435456) + (set_local $14 + (f64.mul + (get_local $14) + (f64.const 268435456) + ) ) + (get_local $5) + ) + (i32.load + (get_local $25) ) - (get_local $5) - ) - (i32.load - (get_local $25) ) + (i32.const 0) ) - (i32.const 0) - ) - ) - ) - ) - (set_local $7 - (get_local $9) - ) - (loop $while-out$66 $while-in$67 - (i32.store - (get_local $7) - (tee_local $5 - (i32.trunc_s/f64 - (get_local $14) ) ) ) (set_local $7 - (i32.add - (get_local $7) - (i32.const 4) - ) + (get_local $9) ) - (if - (f64.eq - (tee_local $14 - (f64.mul - (f64.sub + (loop $while-in$67 + (block $while-out$66 + (i32.store + (get_local $7) + (tee_local $5 + (i32.trunc_s/f64 (get_local $14) - (f64.convert_u/i32 - (get_local $5) - ) ) - (f64.const 1e9) ) ) - (f64.const 0) - ) - (block - (set_local $6 - (get_local $7) - ) - (br $while-out$66) - ) - ) - (br $while-in$67) - ) - (if - (i32.gt_s - (tee_local $5 - (i32.load - (get_local $25) + (set_local $7 + (i32.add + (get_local $7) + (i32.const 4) + ) ) - ) - (i32.const 0) - ) - (block - (set_local $8 - (get_local $9) - ) - (set_local $13 - (get_local $6) - ) - (loop $while-out$68 $while-in$69 - (set_local $11 - (select - (i32.const 29) - (get_local $5) - (i32.gt_s - (get_local $5) - (i32.const 29) + (if + (f64.eq + (tee_local $14 + (f64.mul + (f64.sub + (get_local $14) + (f64.convert_u/i32 + (get_local $5) + ) + ) + (f64.const 1e9) + ) ) + (f64.const 0) + ) + (block + (set_local $6 + (get_local $7) + ) + (br $while-out$66) + ) + ) + (br $while-in$67) + ) + ) + (if + (i32.gt_s + (tee_local $5 + (i32.load + (get_local $25) ) ) - (set_local $7 - (block $do-once$70 - (if - (i32.lt_u - (tee_local $7 - (i32.add - (get_local $13) - (i32.const -4) - ) + (i32.const 0) + ) + (block + (set_local $8 + (get_local $9) + ) + (set_local $13 + (get_local $6) + ) + (loop $while-in$69 + (block $while-out$68 + (set_local $11 + (select + (i32.const 29) + (get_local $5) + (i32.gt_s + (get_local $5) + (i32.const 29) ) - (get_local $8) ) - (get_local $8) - (block - (set_local $5 - (i32.const 0) - ) - (set_local $10 - (get_local $7) - ) - (loop $while-out$72 $while-in$73 - (set_local $6 - (call $___uremdi3 - (tee_local $5 - (call $_i64Add - (call $_bitshift64Shl - (i32.load - (get_local $10) + ) + (set_local $7 + (block $do-once$70 + (if + (i32.lt_u + (tee_local $7 + (i32.add + (get_local $13) + (i32.const -4) + ) + ) + (get_local $8) + ) + (get_local $8) + (block + (set_local $5 + (i32.const 0) + ) + (set_local $10 + (get_local $7) + ) + (loop $while-in$73 + (block $while-out$72 + (set_local $6 + (call $___uremdi3 + (tee_local $5 + (call $_i64Add + (call $_bitshift64Shl + (i32.load + (get_local $10) + ) + (i32.const 0) + (get_local $11) + ) + (i32.load + (i32.const 168) + ) + (get_local $5) + (i32.const 0) + ) ) + (tee_local $7 + (i32.load + (i32.const 168) + ) + ) + (i32.const 1000000000) (i32.const 0) - (get_local $11) ) - (i32.load - (i32.const 168) + ) + (i32.store + (get_local $10) + (get_local $6) + ) + (set_local $5 + (call $___udivdi3 + (get_local $5) + (get_local $7) + (i32.const 1000000000) + (i32.const 0) ) - (get_local $5) - (i32.const 0) ) - ) - (tee_local $7 - (i32.load - (i32.const 168) + (if + (i32.lt_u + (tee_local $7 + (i32.add + (get_local $10) + (i32.const -4) + ) + ) + (get_local $8) + ) + (br $while-out$72) + (set_local $10 + (get_local $7) + ) ) + (br $while-in$73) ) - (i32.const 1000000000) - (i32.const 0) ) - ) - (i32.store - (get_local $10) - (get_local $6) - ) - (set_local $5 - (call $___udivdi3 - (get_local $5) - (get_local $7) - (i32.const 1000000000) - (i32.const 0) + (br_if $do-once$70 + (get_local $8) + (i32.eq + (get_local $5) + (i32.const 0) + ) ) - ) - (if - (i32.lt_u + (i32.store (tee_local $7 (i32.add - (get_local $10) + (get_local $8) (i32.const -4) ) ) - (get_local $8) - ) - (br $while-out$72) - (set_local $10 - (get_local $7) + (get_local $5) ) + (get_local $7) ) - (br $while-in$73) ) - (br_if $do-once$70 - (get_local $8) - (i32.eq - (get_local $5) - (i32.const 0) + ) + ) + (loop $while-in$75 + (block $while-out$74 + (if + (i32.le_u + (get_local $13) + (get_local $7) ) + (br $while-out$74) ) - (i32.store - (tee_local $7 - (i32.add - (get_local $8) - (i32.const -4) + (if + (i32.eq + (i32.load + (tee_local $5 + (i32.add + (get_local $13) + (i32.const -4) + ) + ) ) + (i32.const 0) ) - (get_local $5) + (set_local $13 + (get_local $5) + ) + (br $while-out$74) ) - (get_local $7) + (br $while-in$75) ) ) - ) - ) - (loop $while-out$74 $while-in$75 - (if - (i32.le_u - (get_local $13) - (get_local $7) - ) - (br $while-out$74) - ) - (if - (i32.eq - (i32.load - (tee_local $5 - (i32.add - (get_local $13) - (i32.const -4) + (i32.store + (get_local $25) + (tee_local $5 + (i32.sub + (i32.load + (get_local $25) ) + (get_local $11) ) ) - (i32.const 0) ) - (set_local $13 - (get_local $5) - ) - (br $while-out$74) - ) - (br $while-in$75) - ) - (i32.store - (get_local $25) - (tee_local $5 - (i32.sub - (i32.load - (get_local $25) + (if + (i32.gt_s + (get_local $5) + (i32.const 0) ) - (get_local $11) - ) - ) - ) - (if - (i32.gt_s - (get_local $5) - (i32.const 0) - ) - (set_local $8 - (get_local $7) - ) - (block - (set_local $6 - (get_local $13) - ) - (br $while-out$68) - ) - ) - (br $while-in$69) - ) - ) - (set_local $7 - (get_local $9) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $8 - (i32.add - (i32.and - (i32.div_s - (i32.add - (get_local $1) - (i32.const 25) + (set_local $8 + (get_local $7) + ) + (block + (set_local $6 + (get_local $13) + ) + (br $while-out$68) ) - (i32.const 9) ) - (i32.const -1) + (br $while-in$69) ) - (i32.const 1) ) ) - (set_local $10 - (i32.eq - (get_local $15) - (i32.const 102) - ) + (set_local $7 + (get_local $9) ) - (set_local $23 - (get_local $6) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) ) - (loop $while-out$76 $while-in$77 - (set_local $5 - (i32.gt_s - (tee_local $6 - (i32.sub - (i32.const 0) - (get_local $5) + (block + (set_local $8 + (i32.add + (i32.and + (i32.div_s + (i32.add + (get_local $1) + (i32.const 25) + ) + (i32.const 9) ) + (i32.const -1) ) - (i32.const 9) + (i32.const 1) ) ) - (set_local $13 - (select - (i32.const 9) - (get_local $6) - (get_local $5) + (set_local $10 + (i32.eq + (get_local $15) + (i32.const 102) ) ) - (set_local $11 - (block $do-once$78 - (if - (i32.lt_u - (get_local $7) - (get_local $23) - ) - (block - (set_local $70 - (i32.add - (i32.shl - (i32.const 1) - (get_local $13) - ) - (i32.const -1) + (set_local $23 + (get_local $6) + ) + (loop $while-in$77 + (block $while-out$76 + (set_local $5 + (i32.gt_s + (tee_local $6 + (i32.sub + (i32.const 0) + (get_local $5) ) ) - (set_local $27 - (i32.shr_u - (i32.const 1000000000) - (get_local $13) + (i32.const 9) + ) + ) + (set_local $13 + (select + (i32.const 9) + (get_local $6) + (get_local $5) + ) + ) + (set_local $11 + (block $do-once$78 + (if + (i32.lt_u + (get_local $7) + (get_local $23) ) - ) - (set_local $11 - (i32.const 0) - ) - (set_local $17 - (get_local $7) - ) - (loop $while-out$80 $while-in$81 - (set_local $6 - (i32.and - (tee_local $5 - (i32.load - (get_local $17) + (block + (set_local $70 + (i32.add + (i32.shl + (i32.const 1) + (get_local $13) ) + (i32.const -1) ) - (get_local $70) ) - ) - (i32.store - (get_local $17) - (i32.add + (set_local $27 (i32.shr_u - (get_local $5) + (i32.const 1000000000) (get_local $13) ) - (get_local $11) ) - ) - (set_local $11 - (i32.mul - (get_local $6) - (get_local $27) + (set_local $11 + (i32.const 0) ) - ) - (if - (i32.ge_u - (tee_local $17 - (i32.add + (set_local $17 + (get_local $7) + ) + (loop $while-in$81 + (block $while-out$80 + (set_local $6 + (i32.and + (tee_local $5 + (i32.load + (get_local $17) + ) + ) + (get_local $70) + ) + ) + (i32.store (get_local $17) + (i32.add + (i32.shr_u + (get_local $5) + (get_local $13) + ) + (get_local $11) + ) + ) + (set_local $11 + (i32.mul + (get_local $6) + (get_local $27) + ) + ) + (if + (i32.ge_u + (tee_local $17 + (i32.add + (get_local $17) + (i32.const 4) + ) + ) + (get_local $23) + ) + (br $while-out$80) + ) + (br $while-in$81) + ) + ) + (set_local $5 + (select + (i32.add + (get_local $7) (i32.const 4) ) + (get_local $7) + (i32.eq + (i32.load + (get_local $7) + ) + (i32.const 0) + ) + ) + ) + (if + (i32.eq + (get_local $11) + (i32.const 0) + ) + (br $do-once$78 + (get_local $5) ) + ) + (i32.store (get_local $23) + (get_local $11) ) - (br $while-out$80) + (set_local $23 + (i32.add + (get_local $23) + (i32.const 4) + ) + ) + (get_local $5) ) - (br $while-in$81) - ) - (set_local $5 (select (i32.add (get_local $7) @@ -5979,1237 +6060,1175 @@ ) ) ) - (if - (i32.eq - (get_local $11) - (i32.const 0) - ) - (br $do-once$78 - (get_local $5) - ) - ) - (i32.store - (get_local $23) - (get_local $11) - ) - (set_local $23 - (i32.add + ) + ) + (set_local $5 + (i32.gt_s + (i32.shr_s + (i32.sub (get_local $23) - (i32.const 4) + (tee_local $7 + (select + (get_local $9) + (get_local $11) + (get_local $10) + ) + ) ) + (i32.const 2) ) - (get_local $5) + (get_local $8) ) + ) + (set_local $6 (select (i32.add (get_local $7) - (i32.const 4) - ) - (get_local $7) - (i32.eq - (i32.load - (get_local $7) + (i32.shl + (get_local $8) + (i32.const 2) ) - (i32.const 0) ) + (get_local $23) + (get_local $5) ) ) - ) - ) - (set_local $5 - (i32.gt_s - (i32.shr_s - (i32.sub - (get_local $23) - (tee_local $7 - (select - (get_local $9) - (get_local $11) - (get_local $10) + (i32.store + (get_local $25) + (tee_local $5 + (i32.add + (i32.load + (get_local $25) ) + (get_local $13) ) ) - (i32.const 2) ) - (get_local $8) - ) - ) - (set_local $6 - (select - (i32.add - (get_local $7) - (i32.shl - (get_local $8) - (i32.const 2) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) ) - ) - (get_local $23) - (get_local $5) - ) - ) - (i32.store - (get_local $25) - (tee_local $5 - (i32.add - (i32.load - (get_local $25) + (block + (set_local $7 + (get_local $11) + ) + (set_local $23 + (get_local $6) + ) ) - (get_local $13) - ) - ) - ) - (if - (i32.lt_s - (get_local $5) - (i32.const 0) - ) - (block - (set_local $7 - (get_local $11) - ) - (set_local $23 - (get_local $6) - ) - ) - (block - (set_local $7 - (get_local $11) - ) - (set_local $27 - (get_local $6) - ) - (br $while-out$76) - ) - ) - (br $while-in$77) - ) - ) - (set_local $27 - (get_local $6) - ) - ) - (block $do-once$82 - (if - (i32.lt_u - (get_local $7) - (get_local $27) - ) - (block - (set_local $6 - (i32.mul - (i32.shr_s - (i32.sub - (get_local $62) - (get_local $7) + (block + (set_local $7 + (get_local $11) + ) + (set_local $27 + (get_local $6) + ) + (br $while-out$76) ) - (i32.const 2) ) - (i32.const 9) + (br $while-in$77) ) ) - (if - (i32.lt_u - (tee_local $5 - (i32.load - (get_local $7) - ) - ) - (i32.const 10) - ) - (block - (set_local $13 - (get_local $6) - ) - (br $do-once$82) - ) - (set_local $8 - (i32.const 10) - ) + ) + (set_local $27 + (get_local $6) + ) + ) + (block $do-once$82 + (if + (i32.lt_u + (get_local $7) + (get_local $27) ) - (loop $while-out$84 $while-in$85 + (block (set_local $6 - (i32.add - (get_local $6) - (i32.const 1) + (i32.mul + (i32.shr_s + (i32.sub + (get_local $62) + (get_local $7) + ) + (i32.const 2) + ) + (i32.const 9) ) ) (if (i32.lt_u - (get_local $5) - (tee_local $8 - (i32.mul - (get_local $8) - (i32.const 10) + (tee_local $5 + (i32.load + (get_local $7) ) ) + (i32.const 10) ) (block (set_local $13 (get_local $6) ) - (br $while-out$84) + (br $do-once$82) + ) + (set_local $8 + (i32.const 10) + ) + ) + (loop $while-in$85 + (block $while-out$84 + (set_local $6 + (i32.add + (get_local $6) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (get_local $5) + (tee_local $8 + (i32.mul + (get_local $8) + (i32.const 10) + ) + ) + ) + (block + (set_local $13 + (get_local $6) + ) + (br $while-out$84) + ) + ) + (br $while-in$85) ) ) - (br $while-in$85) ) - ) - (set_local $13 - (i32.const 0) + (set_local $13 + (i32.const 0) + ) ) ) - ) - (set_local $7 - (if - (i32.lt_s - (tee_local $5 - (i32.add - (i32.sub - (get_local $1) - (select - (get_local $13) - (i32.const 0) - (i32.ne - (get_local $15) - (i32.const 102) + (set_local $7 + (if + (i32.lt_s + (tee_local $5 + (i32.add + (i32.sub + (get_local $1) + (select + (get_local $13) + (i32.const 0) + (i32.ne + (get_local $15) + (i32.const 102) + ) ) ) - ) - (i32.shr_s - (i32.shl - (i32.and - (tee_local $70 - (i32.ne - (get_local $1) - (i32.const 0) + (i32.shr_s + (i32.shl + (i32.and + (tee_local $70 + (i32.ne + (get_local $1) + (i32.const 0) + ) ) - ) - (tee_local $8 - (i32.eq - (get_local $15) - (i32.const 103) + (tee_local $8 + (i32.eq + (get_local $15) + (i32.const 103) + ) ) ) + (i32.const 31) ) (i32.const 31) ) - (i32.const 31) ) ) - ) - (i32.add - (i32.mul - (i32.shr_s - (i32.sub - (get_local $27) - (get_local $62) + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (get_local $27) + (get_local $62) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 9) ) - (i32.const 9) + (i32.const -9) ) - (i32.const -9) ) - ) - (block - (set_local $6 - (i32.add + (block + (set_local $6 (i32.add - (get_local $9) - (i32.const 4) - ) - (i32.shl (i32.add - (i32.and - (i32.div_s - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 9216) + (get_local $9) + (i32.const 4) + ) + (i32.shl + (i32.add + (i32.and + (i32.div_s + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 9216) + ) ) + (i32.const 9) ) - (i32.const 9) + (i32.const -1) ) - (i32.const -1) + (i32.const -1024) ) - (i32.const -1024) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (if - (i32.lt_s - (tee_local $11 - (i32.add - (i32.and - (i32.rem_s - (get_local $5) - (i32.const 9) + (if + (i32.lt_s + (tee_local $11 + (i32.add + (i32.and + (i32.rem_s + (get_local $5) + (i32.const 9) + ) + (i32.const -1) ) - (i32.const -1) + (i32.const 1) ) - (i32.const 1) ) + (i32.const 9) ) - (i32.const 9) - ) - (block - (set_local $5 - (i32.const 10) - ) - (loop $while-out$86 $while-in$87 + (block (set_local $5 - (i32.mul - (get_local $5) - (i32.const 10) - ) + (i32.const 10) ) - (if - (i32.eq - (tee_local $11 - (i32.add - (get_local $11) - (i32.const 1) + (loop $while-in$87 + (block $while-out$86 + (set_local $5 + (i32.mul + (get_local $5) + (i32.const 10) ) ) - (i32.const 9) - ) - (block - (set_local $17 - (get_local $5) + (if + (i32.eq + (tee_local $11 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (i32.const 9) + ) + (block + (set_local $17 + (get_local $5) + ) + (br $while-out$86) + ) ) - (br $while-out$86) + (br $while-in$87) ) ) - (br $while-in$87) + ) + (set_local $17 + (i32.const 10) ) ) - (set_local $17 - (i32.const 10) - ) - ) - (block $do-once$88 - (if - (i32.eqz - (i32.and - (tee_local $11 - (i32.eq - (i32.add - (get_local $6) - (i32.const 4) - ) - (get_local $27) - ) - ) - (i32.eq - (tee_local $15 - (i32.and - (i32.rem_u - (tee_local $5 - (i32.load - (get_local $6) - ) - ) - (get_local $17) + (block $do-once$88 + (if + (i32.eqz + (i32.and + (tee_local $11 + (i32.eq + (i32.add + (get_local $6) + (i32.const 4) ) - (i32.const -1) + (get_local $27) ) ) - (i32.const 0) - ) - ) - ) - (block - (set_local $14 - (select - (f64.const 9007199254740992) - (f64.const 9007199254740994) (i32.eq - (i32.and + (tee_local $15 (i32.and - (i32.div_u - (get_local $5) + (i32.rem_u + (tee_local $5 + (i32.load + (get_local $6) + ) + ) (get_local $17) ) (i32.const -1) ) - (i32.const 1) ) (i32.const 0) ) ) ) - (set_local $30 - (if - (i32.lt_u - (get_local $15) - (tee_local $10 + (block + (set_local $14 + (select + (f64.const 9007199254740992) + (f64.const 9007199254740994) + (i32.eq (i32.and - (i32.div_s - (get_local $17) - (i32.const 2) + (i32.and + (i32.div_u + (get_local $5) + (get_local $17) + ) + (i32.const -1) ) - (i32.const -1) + (i32.const 1) ) + (i32.const 0) ) ) - (f64.const 0.5) - (select - (f64.const 1) - (f64.const 1.5) - (i32.and - (get_local $11) - (i32.eq - (get_local $15) - (get_local $10) + ) + (set_local $30 + (if + (i32.lt_u + (get_local $15) + (tee_local $10 + (i32.and + (i32.div_s + (get_local $17) + (i32.const 2) + ) + (i32.const -1) + ) + ) + ) + (f64.const 0.5) + (select + (f64.const 1) + (f64.const 1.5) + (i32.and + (get_local $11) + (i32.eq + (get_local $15) + (get_local $10) + ) ) ) ) ) - ) - (set_local $14 - (block $do-once$90 - (if - (i32.eq - (get_local $51) - (i32.const 0) - ) - (get_local $14) - (block - (if - (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $39) + (set_local $14 + (block $do-once$90 + (if + (i32.eq + (get_local $51) + (i32.const 0) + ) + (get_local $14) + (block + (if + (i32.ne + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $39) + ) + (i32.const 24) ) (i32.const 24) ) - (i32.const 24) + (i32.const 45) + ) + (br $do-once$90 + (get_local $14) ) - (i32.const 45) ) - (br $do-once$90 - (get_local $14) + (set_local $30 + (f64.neg + (get_local $30) + ) ) - ) - (set_local $30 (f64.neg - (get_local $30) + (get_local $14) ) ) - (f64.neg - (get_local $14) - ) ) ) ) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.sub - (get_local $5) - (get_local $15) + (i32.store + (get_local $6) + (tee_local $5 + (i32.sub + (get_local $5) + (get_local $15) + ) ) ) - ) - (if - (f64.eq - (f64.add + (if + (f64.eq + (f64.add + (get_local $14) + (get_local $30) + ) (get_local $14) - (get_local $30) ) - (get_local $14) + (br $do-once$88) ) - (br $do-once$88) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.add - (get_local $5) - (get_local $17) + (i32.store + (get_local $6) + (tee_local $5 + (i32.add + (get_local $5) + (get_local $17) + ) ) ) - ) - (if - (i32.gt_u - (get_local $5) - (i32.const 999999999) - ) - (loop $while-out$92 $while-in$93 - (i32.store - (get_local $6) - (i32.const 0) + (if + (i32.gt_u + (get_local $5) + (i32.const 999999999) ) - (set_local $7 - (if - (i32.lt_u - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -4) + (loop $while-in$93 + (block $while-out$92 + (i32.store + (get_local $6) + (i32.const 0) + ) + (set_local $7 + (if + (i32.lt_u + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -4) + ) + ) + (get_local $7) + ) + (block + (i32.store + (tee_local $5 + (i32.add + (get_local $7) + (i32.const -4) + ) + ) + (i32.const 0) + ) + (get_local $5) ) + (get_local $7) ) - (get_local $7) ) - (block - (i32.store - (tee_local $5 - (i32.add - (get_local $7) - (i32.const -4) + (i32.store + (get_local $6) + (tee_local $5 + (i32.add + (i32.load + (get_local $6) ) + (i32.const 1) ) - (i32.const 0) ) - (get_local $5) ) - (get_local $7) - ) - ) - (i32.store - (get_local $6) - (tee_local $5 - (i32.add - (i32.load - (get_local $6) + (if + (i32.le_u + (get_local $5) + (i32.const 999999999) ) - (i32.const 1) + (br $while-out$92) ) + (br $while-in$93) ) ) - (if - (i32.le_u - (get_local $5) - (i32.const 999999999) - ) - (br $while-out$92) - ) - (br $while-in$93) - ) - ) - (set_local $11 - (i32.mul - (i32.shr_s - (i32.sub - (get_local $62) - (get_local $7) - ) - (i32.const 2) - ) - (i32.const 9) - ) - ) - (if - (i32.lt_u - (tee_local $5 - (i32.load - (get_local $7) - ) - ) - (i32.const 10) - ) - (block - (set_local $13 - (get_local $11) - ) - (br $do-once$88) ) - (set_local $10 - (i32.const 10) - ) - ) - (loop $while-out$94 $while-in$95 (set_local $11 - (i32.add - (get_local $11) - (i32.const 1) + (i32.mul + (i32.shr_s + (i32.sub + (get_local $62) + (get_local $7) + ) + (i32.const 2) + ) + (i32.const 9) ) ) (if (i32.lt_u - (get_local $5) - (tee_local $10 - (i32.mul - (get_local $10) - (i32.const 10) + (tee_local $5 + (i32.load + (get_local $7) ) ) + (i32.const 10) ) (block (set_local $13 (get_local $11) ) - (br $while-out$94) + (br $do-once$88) + ) + (set_local $10 + (i32.const 10) + ) + ) + (loop $while-in$95 + (block $while-out$94 + (set_local $11 + (i32.add + (get_local $11) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (get_local $5) + (tee_local $10 + (i32.mul + (get_local $10) + (i32.const 10) + ) + ) + ) + (block + (set_local $13 + (get_local $11) + ) + (br $while-out$94) + ) + ) + (br $while-in$95) ) ) - (br $while-in$95) ) ) ) - ) - (set_local $6 - (i32.gt_u - (get_local $27) - (tee_local $5 - (i32.add - (get_local $6) - (i32.const 4) + (set_local $6 + (i32.gt_u + (get_local $27) + (tee_local $5 + (i32.add + (get_local $6) + (i32.const 4) + ) ) ) ) + (set_local $6 + (select + (get_local $5) + (get_local $27) + (get_local $6) + ) + ) + (get_local $7) ) - (set_local $6 - (select - (get_local $5) + (block + (set_local $6 (get_local $27) - (get_local $6) ) + (get_local $7) ) - (get_local $7) - ) - (block - (set_local $6 - (get_local $27) - ) - (get_local $7) ) ) - ) - (set_local $27 - (i32.sub - (i32.const 0) - (get_local $13) - ) - ) - (loop $while-out$96 $while-in$97 - (if - (i32.le_u - (get_local $6) - (get_local $7) - ) - (block - (set_local $11 - (i32.const 0) - ) - (set_local $23 - (get_local $6) - ) - (br $while-out$96) + (set_local $27 + (i32.sub + (i32.const 0) + (get_local $13) ) ) - (if - (i32.eq - (i32.load - (tee_local $5 - (i32.add + (loop $while-in$97 + (block $while-out$96 + (if + (i32.le_u + (get_local $6) + (get_local $7) + ) + (block + (set_local $11 + (i32.const 0) + ) + (set_local $23 (get_local $6) - (i32.const -4) ) + (br $while-out$96) ) ) - (i32.const 0) - ) - (set_local $6 - (get_local $5) - ) - (block - (set_local $11 - (i32.const 1) - ) - (set_local $23 - (get_local $6) + (if + (i32.eq + (i32.load + (tee_local $5 + (i32.add + (get_local $6) + (i32.const -4) + ) + ) + ) + (i32.const 0) + ) + (set_local $6 + (get_local $5) + ) + (block + (set_local $11 + (i32.const 1) + ) + (set_local $23 + (get_local $6) + ) + (br $while-out$96) + ) ) - (br $while-out$96) + (br $while-in$97) ) ) - (br $while-in$97) - ) - (set_local $8 - (block $do-once$98 - (if - (get_local $8) - (block - (set_local $8 - (if - (i32.and - (i32.gt_s - (tee_local $1 - (i32.add - (i32.xor - (i32.and - (get_local $70) + (set_local $8 + (block $do-once$98 + (if + (get_local $8) + (block + (set_local $8 + (if + (i32.and + (i32.gt_s + (tee_local $1 + (i32.add + (i32.xor + (i32.and + (get_local $70) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) + (get_local $1) ) - (get_local $1) ) + (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 - (set_local $10 - (i32.add - (get_local $26) - (i32.const -1) + (block + (set_local $10 + (i32.add + (get_local $26) + (i32.const -1) + ) + ) + (i32.sub + (i32.add + (get_local $1) + (i32.const -1) + ) + (get_local $13) ) ) - (i32.sub + (block + (set_local $10 + (i32.add + (get_local $26) + (i32.const -2) + ) + ) (i32.add (get_local $1) (i32.const -1) ) - (get_local $13) ) ) - (block - (set_local $10 - (i32.add - (get_local $26) - (i32.const -2) + ) + (if + (i32.ne + (tee_local $1 + (i32.and + (get_local $18) + (i32.const 8) ) ) - (i32.add - (get_local $1) - (i32.const -1) - ) + (i32.const 0) ) - ) - ) - (if - (i32.ne - (tee_local $1 - (i32.and - (get_local $18) - (i32.const 8) + (block + (set_local $15 + (get_local $8) + ) + (set_local $26 + (get_local $10) + ) + (br $do-once$98 + (get_local $1) ) - ) - (i32.const 0) - ) - (block - (set_local $15 - (get_local $8) - ) - (set_local $26 - (get_local $10) - ) - (br $do-once$98 - (get_local $1) ) ) - ) - (block $do-once$100 - (if - (get_local $11) - (block - (if - (i32.eq - (tee_local $1 - (i32.load - (i32.add - (get_local $23) - (i32.const -4) + (block $do-once$100 + (if + (get_local $11) + (block + (if + (i32.eq + (tee_local $1 + (i32.load + (i32.add + (get_local $23) + (i32.const -4) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $6 - (i32.const 9) - ) - (br $do-once$100) - ) - ) - (if - (i32.eq - (i32.and - (i32.rem_u - (get_local $1) - (i32.const 10) + (block + (set_local $6 + (i32.const 9) ) - (i32.const -1) + (br $do-once$100) ) - (i32.const 0) ) - (block - (set_local $5 - (i32.const 10) - ) - (set_local $6 + (if + (i32.eq + (i32.and + (i32.rem_u + (get_local $1) + (i32.const 10) + ) + (i32.const -1) + ) (i32.const 0) ) - ) - (block - (set_local $6 - (i32.const 0) + (block + (set_local $5 + (i32.const 10) + ) + (set_local $6 + (i32.const 0) + ) ) - (br $do-once$100) - ) - ) - (loop $while-out$102 $while-in$103 - (set_local $6 - (i32.add - (get_local $6) - (i32.const 1) + (block + (set_local $6 + (i32.const 0) + ) + (br $do-once$100) ) ) - (if - (i32.ne - (i32.and - (i32.rem_u - (get_local $1) - (tee_local $5 - (i32.mul - (get_local $5) - (i32.const 10) + (loop $while-in$103 + (block $while-out$102 + (set_local $6 + (i32.add + (get_local $6) + (i32.const 1) + ) + ) + (if + (i32.ne + (i32.and + (i32.rem_u + (get_local $1) + (tee_local $5 + (i32.mul + (get_local $5) + (i32.const 10) + ) + ) ) + (i32.const -1) ) + (i32.const 0) ) - (i32.const -1) + (br $while-out$102) ) - (i32.const 0) + (br $while-in$103) ) - (br $while-out$102) ) - (br $while-in$103) ) - ) - (set_local $6 - (i32.const 9) + (set_local $6 + (i32.const 9) + ) ) ) - ) - (set_local $1 - (i32.add - (i32.mul - (i32.shr_s - (i32.sub - (get_local $23) - (get_local $62) + (set_local $1 + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (get_local $23) + (get_local $62) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 9) ) - (i32.const 9) + (i32.const -9) ) - (i32.const -9) ) - ) - (if - (i32.eq - (i32.or - (get_local $10) - (i32.const 32) + (if + (i32.eq + (i32.or + (get_local $10) + (i32.const 32) + ) + (i32.const 102) ) - (i32.const 102) - ) - (block - (set_local $1 - (i32.lt_s - (tee_local $5 - (i32.sub - (get_local $1) - (get_local $6) + (block + (set_local $1 + (i32.lt_s + (tee_local $5 + (i32.sub + (get_local $1) + (get_local $6) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.lt_s - (get_local $8) - (tee_local $1 - (select - (i32.const 0) - (get_local $5) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $8) + (tee_local $1 + (select + (i32.const 0) + (get_local $5) + (get_local $1) + ) ) ) ) - ) - (set_local $15 - (select - (get_local $8) - (get_local $1) - (get_local $5) + (set_local $15 + (select + (get_local $8) + (get_local $1) + (get_local $5) + ) ) + (set_local $26 + (get_local $10) + ) + (i32.const 0) ) - (set_local $26 - (get_local $10) - ) - (i32.const 0) - ) - (block - (set_local $1 - (i32.lt_s - (tee_local $5 - (i32.sub - (i32.add - (get_local $1) - (get_local $13) + (block + (set_local $1 + (i32.lt_s + (tee_local $5 + (i32.sub + (i32.add + (get_local $1) + (get_local $13) + ) + (get_local $6) ) - (get_local $6) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $5 - (i32.lt_s - (get_local $8) - (tee_local $1 - (select - (i32.const 0) - (get_local $5) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $8) + (tee_local $1 + (select + (i32.const 0) + (get_local $5) + (get_local $1) + ) ) ) ) - ) - (set_local $15 - (select - (get_local $8) - (get_local $1) - (get_local $5) + (set_local $15 + (select + (get_local $8) + (get_local $1) + (get_local $5) + ) ) + (set_local $26 + (get_local $10) + ) + (i32.const 0) ) - (set_local $26 - (get_local $10) - ) - (i32.const 0) ) ) - ) - (block - (set_local $15 - (get_local $1) - ) - (i32.and - (get_local $18) - (i32.const 8) + (block + (set_local $15 + (get_local $1) + ) + (i32.and + (get_local $18) + (i32.const 8) + ) ) ) ) ) - ) - (set_local $17 - (i32.and - (i32.ne - (tee_local $1 - (i32.or - (get_local $15) - (get_local $8) + (set_local $17 + (i32.and + (i32.ne + (tee_local $1 + (i32.or + (get_local $15) + (get_local $8) + ) ) + (i32.const 0) ) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) - ) - (set_local $13 - (if - (tee_local $10 - (i32.eq - (i32.or - (get_local $26) - (i32.const 32) + (set_local $13 + (if + (tee_local $10 + (i32.eq + (i32.or + (get_local $26) + (i32.const 32) + ) + (i32.const 102) ) - (i32.const 102) ) - ) - (block - (set_local $6 - (select - (get_local $13) - (i32.const 0) - (i32.gt_s + (block + (set_local $6 + (select (get_local $13) (i32.const 0) - ) - ) - ) - (i32.const 0) - ) - (block - (set_local $5 - (i32.shr_s - (i32.shl - (i32.lt_s - (tee_local $6 - (select - (get_local $27) - (get_local $13) - (i32.lt_s - (get_local $13) - (i32.const 0) - ) - ) - ) + (i32.gt_s + (get_local $13) (i32.const 0) ) - (i32.const 31) ) - (i32.const 31) ) + (i32.const 0) ) - (if - (i32.lt_s - (i32.sub - (get_local $40) - (tee_local $5 - (call $_fmt_u - (get_local $6) - (get_local $5) - (get_local $52) + (block + (set_local $5 + (i32.shr_s + (i32.shl + (i32.lt_s + (tee_local $6 + (select + (get_local $27) + (get_local $13) + (i32.lt_s + (get_local $13) + (i32.const 0) + ) + ) + ) + (i32.const 0) ) + (i32.const 31) ) + (i32.const 31) ) - (i32.const 2) ) - (loop $while-out$104 $while-in$105 - (i32.store8 - (tee_local $5 - (i32.add - (get_local $5) - (i32.const -1) + (if + (i32.lt_s + (i32.sub + (get_local $40) + (tee_local $5 + (call $_fmt_u + (get_local $6) + (get_local $5) + (get_local $52) + ) ) ) - (i32.const 48) + (i32.const 2) ) - (if - (i32.ge_s - (i32.sub - (get_local $40) - (get_local $5) + (loop $while-in$105 + (block $while-out$104 + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -1) + ) + ) + (i32.const 48) ) - (i32.const 2) + (if + (i32.ge_s + (i32.sub + (get_local $40) + (get_local $5) + ) + (i32.const 2) + ) + (br $while-out$104) + ) + (br $while-in$105) ) - (br $while-out$104) ) - (br $while-in$105) - ) - ) - (i32.store8 - (i32.add - (get_local $5) - (i32.const -1) ) - (i32.and + (i32.store8 (i32.add - (i32.and - (i32.shr_s - (get_local $13) - (i32.const 31) + (get_local $5) + (i32.const -1) + ) + (i32.and + (i32.add + (i32.and + (i32.shr_s + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) + (i32.const 43) ) - (i32.const 43) + (i32.const 255) ) - (i32.const 255) ) - ) - (i32.store8 - (tee_local $5 - (i32.add - (get_local $5) - (i32.const -2) + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -2) + ) + ) + (i32.and + (get_local $26) + (i32.const 255) ) ) - (i32.and - (get_local $26) - (i32.const 255) - ) - ) - (set_local $6 - (i32.sub - (get_local $40) - (get_local $5) + (set_local $6 + (i32.sub + (get_local $40) + (get_local $5) + ) ) + (get_local $5) ) - (get_local $5) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $6 - (i32.add + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $6 (i32.add (i32.add (i32.add - (get_local $51) - (i32.const 1) + (i32.add + (get_local $51) + (i32.const 1) + ) + (get_local $15) ) - (get_local $15) + (get_local $17) ) - (get_local $17) + (get_local $6) ) - (get_local $6) ) + (get_local $18) ) - (get_local $18) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $39) + (get_local $51) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $39) - (get_local $51) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $16) + (get_local $6) + (i32.xor + (get_local $18) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $16) - (get_local $6) - (i32.xor - (get_local $18) - (i32.const 65536) - ) - ) - (block $do-once$106 - (if - (get_local $10) - (block - (set_local $7 - (tee_local $8 - (select - (get_local $9) - (get_local $7) - (i32.gt_u - (get_local $7) + (block $do-once$106 + (if + (get_local $10) + (block + (set_local $7 + (tee_local $8 + (select (get_local $9) - ) - ) - ) - ) - (loop $while-out$114 $while-in$115 - (set_local $5 - (call $_fmt_u - (i32.load (get_local $7) + (i32.gt_u + (get_local $7) + (get_local $9) + ) ) - (i32.const 0) - (get_local $45) ) ) - (block $do-once$116 - (if - (i32.eq - (get_local $7) - (get_local $8) - ) - (block - (if - (i32.ne - (get_local $5) - (get_local $45) + (loop $while-in$115 + (block $while-out$114 + (set_local $5 + (call $_fmt_u + (i32.load + (get_local $7) ) - (br $do-once$116) - ) - (i32.store8 - (get_local $53) - (i32.const 48) - ) - (set_local $5 - (get_local $53) + (i32.const 0) + (get_local $45) ) ) - (block + (block $do-once$116 (if - (i32.le_u - (get_local $5) - (get_local $29) + (i32.eq + (get_local $7) + (get_local $8) ) - (br $do-once$116) - ) - (loop $while-out$118 $while-in$119 - (i32.store8 - (tee_local $5 - (i32.add + (block + (if + (i32.ne (get_local $5) - (i32.const -1) + (get_local $45) ) + (br $do-once$116) ) - (i32.const 48) - ) - (if - (i32.le_u - (get_local $5) - (get_local $29) + (i32.store8 + (get_local $53) + (i32.const 48) + ) + (set_local $5 + (get_local $53) + ) + ) + (block + (if + (i32.le_u + (get_local $5) + (get_local $29) + ) + (br $do-once$116) + ) + (loop $while-in$119 + (block $while-out$118 + (i32.store8 + (tee_local $5 + (i32.add + (get_local $5) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $5) + (get_local $29) + ) + (br $while-out$118) + ) + (br $while-in$119) + ) ) - (br $while-out$118) ) - (br $while-in$119) - ) - ) - ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $5) - (i32.sub - (get_local $75) - (get_local $5) - ) - (get_local $0) - ) - ) - (if - (i32.gt_u - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 4) ) ) - (get_local $9) - ) - (block - (set_local $5 - (get_local $7) - ) - (br $while-out$114) - ) - ) - (br $while-in$115) - ) - (block $do-once$120 - (if - (i32.ne - (get_local $1) - (i32.const 0) - ) - (block - (br_if $do-once$120 - (i32.ne + (if + (i32.eq (i32.and (i32.load (get_local $0) @@ -7218,159 +7237,76 @@ ) (i32.const 0) ) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) - ) - ) - ) - ) - (if - (i32.and - (i32.gt_s - (get_local $15) - (i32.const 0) - ) - (i32.lt_u - (get_local $5) - (get_local $23) - ) - ) - (loop $while-out$122 $while-in$123 - (if - (i32.gt_u - (tee_local $1 - (call $_fmt_u - (i32.load - (get_local $5) - ) - (i32.const 0) - (get_local $45) + (call $___fwritex + (get_local $5) + (i32.sub + (get_local $75) + (get_local $5) ) + (get_local $0) ) - (get_local $29) ) - (loop $while-out$124 $while-in$125 - (i32.store8 - (tee_local $1 + (if + (i32.gt_u + (tee_local $7 (i32.add - (get_local $1) - (i32.const -1) + (get_local $7) + (i32.const 4) ) ) - (i32.const 48) + (get_local $9) ) - (if - (i32.le_u - (get_local $1) - (get_local $29) + (block + (set_local $5 + (get_local $7) ) - (br $while-out$124) + (br $while-out$114) ) - (br $while-in$125) ) + (br $while-in$115) ) + ) + (block $do-once$120 (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex + (i32.ne (get_local $1) - (select - (i32.const 9) - (get_local $15) - (i32.gt_s - (get_local $15) - (i32.const 9) - ) - ) - (get_local $0) - ) - ) - (set_local $1 - (i32.add - (get_local $15) - (i32.const -9) + (i32.const 0) ) - ) - (if - (i32.and - (i32.gt_s - (get_local $15) - (i32.const 9) - ) - (i32.lt_u - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 4) + (block + (br_if $do-once$120 + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) + (i32.const 0) ) - (get_local $23) ) - ) - (set_local $15 - (get_local $1) - ) - (block - (set_local $15 - (get_local $1) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) ) - (br $while-out$122) ) ) - (br $while-in$123) - ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.add - (get_local $15) - (i32.const 9) - ) - (i32.const 9) - (i32.const 0) - ) - ) - (block - (set_local $11 - (select - (get_local $23) - (i32.add - (get_local $7) - (i32.const 4) - ) - (get_local $11) ) - ) - (if - (i32.gt_s - (get_local $15) - (i32.const -1) - ) - (block - (set_local $9 - (i32.eq - (get_local $8) + (if + (i32.and + (i32.gt_s + (get_local $15) (i32.const 0) ) + (i32.lt_u + (get_local $5) + (get_local $23) + ) ) - (set_local $5 - (get_local $7) - ) - (loop $while-out$108 $while-in$109 - (set_local $8 + (loop $while-in$123 + (block $while-out$122 (if - (i32.eq + (i32.gt_u (tee_local $1 (call $_fmt_u (i32.load @@ -7380,834 +7316,978 @@ (get_local $45) ) ) - (get_local $45) + (get_local $29) + ) + (loop $while-in$125 + (block $while-out$124 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $1) + (get_local $29) + ) + (br $while-out$124) + ) + (br $while-in$125) + ) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $1) + (select + (i32.const 9) + (get_local $15) + (i32.gt_s + (get_local $15) + (i32.const 9) + ) + ) + (get_local $0) + ) + ) + (set_local $1 + (i32.add + (get_local $15) + (i32.const -9) + ) + ) + (if + (i32.and + (i32.gt_s + (get_local $15) + (i32.const 9) + ) + (i32.lt_u + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 4) + ) + ) + (get_local $23) + ) + ) + (set_local $15 + (get_local $1) ) (block - (i32.store8 - (get_local $53) - (i32.const 48) + (set_local $15 + (get_local $1) ) - (get_local $53) + (br $while-out$122) ) - (get_local $1) + ) + (br $while-in$123) + ) + ) + ) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.add + (get_local $15) + (i32.const 9) + ) + (i32.const 9) + (i32.const 0) + ) + ) + (block + (set_local $11 + (select + (get_local $23) + (i32.add + (get_local $7) + (i32.const 4) + ) + (get_local $11) + ) + ) + (if + (i32.gt_s + (get_local $15) + (i32.const -1) + ) + (block + (set_local $9 + (i32.eq + (get_local $8) + (i32.const 0) ) ) - (block $do-once$110 - (if - (i32.eq - (get_local $5) - (get_local $7) - ) - (block - (set_local $1 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) + (set_local $5 + (get_local $7) + ) + (loop $while-in$109 + (block $while-out$108 + (set_local $8 (if (i32.eq - (i32.and - (i32.load - (get_local $0) + (tee_local $1 + (call $_fmt_u + (i32.load + (get_local $5) + ) + (i32.const 0) + (get_local $45) ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $8) - (i32.const 1) - (get_local $0) - ) - ) - (if - (i32.and - (get_local $9) - (i32.lt_s - (get_local $15) - (i32.const 1) ) + (get_local $45) ) - (br $do-once$110) - ) - (if - (i32.ne - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) + (block + (i32.store8 + (get_local $53) + (i32.const 48) ) - (i32.const 0) + (get_local $53) ) - (br $do-once$110) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (get_local $1) ) ) - (block + (block $do-once$110 (if - (i32.gt_u - (get_local $8) - (get_local $29) - ) - (set_local $1 - (get_local $8) + (i32.eq + (get_local $5) + (get_local $7) ) (block (set_local $1 - (get_local $8) - ) - (br $do-once$110) - ) - ) - (loop $while-out$112 $while-in$113 - (i32.store8 - (tee_local $1 (i32.add - (get_local $1) - (i32.const -1) + (get_local $8) + (i32.const 1) ) ) - (i32.const 48) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (i32.const 1) + (get_local $0) + ) + ) + (if + (i32.and + (get_local $9) + (i32.lt_s + (get_local $15) + (i32.const 1) + ) + ) + (br $do-once$110) + ) + (if + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (br $do-once$110) + ) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) - (if - (i32.le_u - (get_local $1) - (get_local $29) + (block + (if + (i32.gt_u + (get_local $8) + (get_local $29) + ) + (set_local $1 + (get_local $8) + ) + (block + (set_local $1 + (get_local $8) + ) + (br $do-once$110) + ) + ) + (loop $while-in$113 + (block $while-out$112 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (if + (i32.le_u + (get_local $1) + (get_local $29) + ) + (br $while-out$112) + ) + (br $while-in$113) + ) ) - (br $while-out$112) ) - (br $while-in$113) - ) - ) - ) - ) - (set_local $8 - (i32.sub - (get_local $75) - (get_local $1) - ) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) ) - (i32.const 32) ) - (i32.const 0) - ) - (call $___fwritex - (get_local $1) - (select - (get_local $8) - (get_local $15) - (i32.gt_s - (get_local $15) - (get_local $8) + (set_local $8 + (i32.sub + (get_local $75) + (get_local $1) ) ) - (get_local $0) - ) - ) - (if - (i32.eqz - (i32.and - (i32.lt_u - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 4) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) - (get_local $11) + (i32.const 0) ) - (i32.gt_s - (tee_local $15 - (i32.sub + (call $___fwritex + (get_local $1) + (select + (get_local $8) + (get_local $15) + (i32.gt_s (get_local $15) (get_local $8) ) ) - (i32.const -1) + (get_local $0) ) ) + (if + (i32.eqz + (i32.and + (i32.lt_u + (tee_local $5 + (i32.add + (get_local $5) + (i32.const 4) + ) + ) + (get_local $11) + ) + (i32.gt_s + (tee_local $15 + (i32.sub + (get_local $15) + (get_local $8) + ) + ) + (i32.const -1) + ) + ) + ) + (br $while-out$108) + ) + (br $while-in$109) ) - (br $while-out$108) ) - (br $while-in$109) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (i32.add - (get_local $15) + (call $_pad + (get_local $0) + (i32.const 48) + (i32.add + (get_local $15) + (i32.const 18) + ) (i32.const 18) + (i32.const 0) ) - (i32.const 18) - (i32.const 0) - ) - (br_if $do-once$106 - (i32.ne - (i32.and - (i32.load - (get_local $0) + (br_if $do-once$106 + (i32.ne + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) ) - ) - (call $___fwritex - (get_local $13) - (i32.sub - (get_local $40) + (call $___fwritex (get_local $13) - ) - (get_local $0) - ) - ) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $6) - (i32.xor - (get_local $18) - (i32.const 8192) + (i32.sub + (get_local $40) + (get_local $13) + ) + (get_local $0) + ) + ) + ) ) - ) - (select - (get_local $16) - (get_local $6) - (i32.lt_s + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) (get_local $6) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (select (get_local $16) + (get_local $6) + (i32.lt_s + (get_local $6) + (get_local $16) + ) ) ) - ) - (block - (set_local $5 - (select - (i32.const 4127) - (i32.const 4131) - (tee_local $8 - (i32.ne - (i32.and - (get_local $26) - (i32.const 32) + (block + (set_local $5 + (select + (i32.const 4127) + (i32.const 4131) + (tee_local $8 + (i32.ne + (i32.and + (get_local $26) + (i32.const 32) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (set_local $6 - (select - (i32.const 0) - (get_local $51) - (tee_local $1 - (i32.or - (f64.ne - (get_local $14) - (get_local $14) + (set_local $6 + (select + (i32.const 0) + (get_local $51) + (tee_local $1 + (i32.or + (f64.ne + (get_local $14) + (get_local $14) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (set_local $8 - (select + (set_local $8 (select - (i32.const 4135) - (i32.const 4139) - (get_local $8) + (select + (i32.const 4135) + (i32.const 4139) + (get_local $8) + ) + (get_local $5) + (get_local $1) ) - (get_local $5) - (get_local $1) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (tee_local $5 - (i32.add - (get_local $6) - (i32.const 3) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (tee_local $5 + (i32.add + (get_local $6) + (i32.const 3) + ) ) + (get_local $7) ) - (get_local $7) - ) - (if - (i32.eq - (i32.and - (if - (i32.eq - (i32.and - (tee_local $1 - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (if + (i32.eq + (i32.and + (tee_local $1 + (i32.load + (get_local $0) + ) ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) - ) - (block - (drop - (call $___fwritex - (get_local $39) - (get_local $6) + (block + (drop + (call $___fwritex + (get_local $39) + (get_local $6) + (get_local $0) + ) + ) + (i32.load (get_local $0) ) ) - (i32.load - (get_local $0) - ) + (get_local $1) ) - (get_local $1) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $8) + (i32.const 3) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $8) - (i32.const 3) + (call $_pad (get_local $0) - ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $5) - (i32.xor - (get_local $18) - (i32.const 8192) - ) - ) - (select - (get_local $16) - (get_local $5) - (i32.lt_s + (i32.const 32) + (get_local $16) (get_local $5) + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (select (get_local $16) + (get_local $5) + (i32.lt_s + (get_local $5) + (get_local $16) + ) ) ) ) ) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $8 - (get_local $21) + (set_local $47 + (get_local $20) ) - (br $label$continue$L1) - ) - (set_local $47 - (get_local $20) - ) - (set_local $37 - (get_local $18) - ) - (set_local $42 - (get_local $10) - ) - (set_local $43 - (i32.const 0) - ) - (set_local $48 - (i32.const 4091) - ) - (set_local $49 - (get_local $28) - ) - ) - (block $label$break$L308 - (if - (i32.eq - (get_local $12) - (i32.const 64) + (set_local $37 + (get_local $18) ) - (block - (set_local $7 - (i32.and - (get_local $68) - (i32.const 32) - ) + (set_local $42 + (get_local $10) + ) + (set_local $43 + (i32.const 0) + ) + (set_local $48 + (i32.const 4091) + ) + (set_local $49 + (get_local $28) + ) + ) + (block $label$break$L308 + (if + (i32.eq + (get_local $12) + (i32.const 64) ) - (set_local $58 - (if + (block + (set_local $7 (i32.and - (i32.eq - (tee_local $5 - (i32.load - (tee_local $1 - (get_local $19) + (get_local $68) + (i32.const 32) + ) + ) + (set_local $58 + (if + (i32.and + (i32.eq + (tee_local $5 + (i32.load + (tee_local $1 + (get_local $19) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (i32.eq - (tee_local $1 - (i32.load offset=4 - (get_local $1) + (i32.eq + (tee_local $1 + (i32.load offset=4 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $28) - ) - (block - (set_local $6 + (block + (set_local $34 + (get_local $46) + ) + (set_local $32 + (get_local $57) + ) + (set_local $35 + (i32.const 0) + ) + (set_local $36 + (i32.const 4091) + ) + (set_local $12 + (i32.const 77) + ) (get_local $28) - ) - (loop $while-out$133 $while-in$134 - (i32.store8 - (tee_local $6 - (i32.add - (get_local $6) - (i32.const -1) + ) + (block + (set_local $6 + (get_local $28) + ) + (loop $while-in$134 + (block $while-out$133 + (i32.store8 + (tee_local $6 + (i32.add + (get_local $6) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (i32.and + (i32.load8_s + (i32.add + (i32.and + (get_local $5) + (i32.const 15) + ) + (i32.const 4075) + ) + ) + (i32.const 255) + ) + (get_local $7) + ) + (i32.const 255) + ) ) - ) - (i32.and - (i32.or + (if (i32.and - (i32.load8_s - (i32.add - (i32.and + (i32.eq + (tee_local $5 + (call $_bitshift64Lshr (get_local $5) - (i32.const 15) + (get_local $1) + (i32.const 4) ) - (i32.const 4075) ) + (i32.const 0) + ) + (i32.eq + (tee_local $1 + (i32.load + (i32.const 168) + ) + ) + (i32.const 0) ) - (i32.const 255) ) - (get_local $7) + (br $while-out$133) ) - (i32.const 255) + (br $while-in$134) ) ) (if - (i32.and + (i32.or (i32.eq - (tee_local $5 - (call $_bitshift64Lshr - (get_local $5) - (get_local $1) - (i32.const 4) - ) + (i32.and + (get_local $46) + (i32.const 8) ) (i32.const 0) ) - (i32.eq - (tee_local $1 + (i32.and + (i32.eq (i32.load - (i32.const 168) + (tee_local $1 + (get_local $19) + ) ) + (i32.const 0) + ) + (i32.eq + (i32.load offset=4 + (get_local $1) + ) + (i32.const 0) ) - (i32.const 0) ) ) - (br $while-out$133) - ) - (br $while-in$134) - ) - (if - (i32.or - (i32.eq - (i32.and + (block + (set_local $34 (get_local $46) - (i32.const 8) ) - (i32.const 0) - ) - (i32.and - (i32.eq - (i32.load - (tee_local $1 - (get_local $19) - ) - ) - (i32.const 0) + (set_local $32 + (get_local $57) ) - (i32.eq - (i32.load offset=4 - (get_local $1) - ) + (set_local $35 (i32.const 0) ) - ) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) - ) - (set_local $35 - (i32.const 0) - ) - (set_local $36 - (i32.const 4091) - ) - (set_local $12 - (i32.const 77) - ) - (get_local $6) - ) - (block - (set_local $34 - (get_local $46) - ) - (set_local $32 - (get_local $57) - ) - (set_local $35 - (i32.const 2) - ) - (set_local $36 - (i32.add + (set_local $36 (i32.const 4091) - (i32.shr_s - (get_local $68) - (i32.const 4) - ) ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (set_local $12 - (i32.const 77) + (block + (set_local $34 + (get_local $46) + ) + (set_local $32 + (get_local $57) + ) + (set_local $35 + (i32.const 2) + ) + (set_local $36 + (i32.add + (i32.const 4091) + (i32.shr_s + (get_local $68) + (i32.const 4) + ) + ) + ) + (set_local $12 + (i32.const 77) + ) + (get_local $6) ) - (get_local $6) ) ) ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 76) - ) - (block - (set_local $58 - (call $_fmt_u - (get_local $33) - (get_local $59) - (get_local $28) - ) - ) - (set_local $34 - (get_local $18) - ) - (set_local $32 - (get_local $10) - ) - (set_local $35 - (get_local $60) - ) - (set_local $36 - (get_local $61) - ) - (set_local $12 - (i32.const 77) - ) - ) (if (i32.eq (get_local $12) - (i32.const 82) + (i32.const 76) ) (block - (set_local $12 - (i32.const 0) - ) - (set_local $5 - (i32.eq - (tee_local $1 - (call $_memchr - (get_local $50) - (i32.const 0) - (get_local $10) - ) - ) - (i32.const 0) + (set_local $58 + (call $_fmt_u + (get_local $33) + (get_local $59) + (get_local $28) ) ) - (set_local $47 - (get_local $50) - ) - (set_local $37 - (get_local $7) + (set_local $34 + (get_local $18) ) - (set_local $42 - (select - (get_local $10) - (i32.sub - (get_local $1) - (get_local $50) - ) - (get_local $5) - ) + (set_local $32 + (get_local $10) ) - (set_local $43 - (i32.const 0) + (set_local $35 + (get_local $60) ) - (set_local $48 - (i32.const 4091) + (set_local $36 + (get_local $61) ) - (set_local $49 - (select - (i32.add - (get_local $50) - (get_local $10) - ) - (get_local $1) - (get_local $5) - ) + (set_local $12 + (i32.const 77) ) ) (if (i32.eq (get_local $12) - (i32.const 86) + (i32.const 82) ) (block (set_local $12 (i32.const 0) ) - (set_local $7 - (i32.const 0) - ) (set_local $5 - (i32.const 0) - ) - (set_local $6 - (i32.load - (get_local $19) - ) - ) - (loop $while-out$129 $while-in$130 - (if - (i32.eq - (tee_local $1 - (i32.load - (get_local $6) - ) - ) - (i32.const 0) - ) - (br $while-out$129) - ) - (if - (i32.or - (i32.lt_s - (tee_local $5 - (call $_wctomb - (get_local $63) - (get_local $1) - ) - ) + (i32.eq + (tee_local $1 + (call $_memchr + (get_local $50) (i32.const 0) + (get_local $10) ) - (i32.gt_u - (get_local $5) - (i32.sub - (get_local $69) - (get_local $7) - ) - ) - ) - (br $while-out$129) - ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const 4) - ) - ) - (if - (i32.gt_u - (get_local $69) - (tee_local $1 - (i32.add - (get_local $5) - (get_local $7) - ) - ) - ) - (set_local $7 - (get_local $1) - ) - (block - (set_local $7 - (get_local $1) - ) - (br $while-out$129) ) + (i32.const 0) ) - (br $while-in$130) ) - (if - (i32.lt_s + (set_local $47 + (get_local $50) + ) + (set_local $37 + (get_local $7) + ) + (set_local $42 + (select + (get_local $10) + (i32.sub + (get_local $1) + (get_local $50) + ) (get_local $5) - (i32.const 0) ) - (block - (set_local $24 - (i32.const -1) + ) + (set_local $43 + (i32.const 0) + ) + (set_local $48 + (i32.const 4091) + ) + (set_local $49 + (select + (i32.add + (get_local $50) + (get_local $10) ) - (br $label$break$L1) + (get_local $1) + (get_local $5) ) ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $7) - (get_local $18) + ) + (if + (i32.eq + (get_local $12) + (i32.const 86) ) - (if - (i32.eq - (get_local $7) + (block + (set_local $12 (i32.const 0) ) - (block - (set_local $38 - (i32.const 0) - ) - (set_local $12 - (i32.const 98) - ) + (set_local $7 + (i32.const 0) ) - (block - (set_local $6 - (i32.const 0) - ) - (set_local $8 - (i32.load - (get_local $19) - ) + (set_local $5 + (i32.const 0) + ) + (set_local $6 + (i32.load + (get_local $19) ) - (loop $while-out$131 $while-in$132 + ) + (loop $while-in$130 + (block $while-out$129 (if (i32.eq (tee_local $1 (i32.load - (get_local $8) + (get_local $6) ) ) (i32.const 0) ) - (block - (set_local $38 - (get_local $7) + (br $while-out$129) + ) + (if + (i32.or + (i32.lt_s + (tee_local $5 + (call $_wctomb + (get_local $63) + (get_local $1) + ) + ) + (i32.const 0) ) - (set_local $12 - (i32.const 98) + (i32.gt_u + (get_local $5) + (i32.sub + (get_local $69) + (get_local $7) + ) ) - (br $label$break$L308) ) + (br $while-out$129) ) - (set_local $8 + (set_local $6 (i32.add - (get_local $8) + (get_local $6) (i32.const 4) ) ) (if - (i32.gt_s + (i32.gt_u + (get_local $69) (tee_local $1 (i32.add - (tee_local $5 - (call $_wctomb - (get_local $63) - (get_local $1) - ) - ) - (get_local $6) + (get_local $5) + (get_local $7) ) ) - (get_local $7) + ) + (set_local $7 + (get_local $1) ) (block - (set_local $38 - (get_local $7) - ) - (set_local $12 - (i32.const 98) + (set_local $7 + (get_local $1) ) - (br $label$break$L308) + (br $while-out$129) ) ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (call $___fwritex - (get_local $63) - (get_local $5) - (get_local $0) - ) + (br $while-in$130) + ) + ) + (if + (i32.lt_s + (get_local $5) + (i32.const 0) + ) + (block + (set_local $24 + (i32.const -1) ) - (if - (i32.lt_u - (get_local $1) - (get_local $7) - ) - (set_local $6 - (get_local $1) + (br $label$break$L1) + ) + ) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $16) + (get_local $7) + (get_local $18) + ) + (if + (i32.eq + (get_local $7) + (i32.const 0) + ) + (block + (set_local $38 + (i32.const 0) + ) + (set_local $12 + (i32.const 98) + ) + ) + (block + (set_local $6 + (i32.const 0) + ) + (set_local $8 + (i32.load + (get_local $19) ) - (block - (set_local $38 - (get_local $7) + ) + (loop $while-in$132 + (block $while-out$131 + (if + (i32.eq + (tee_local $1 + (i32.load + (get_local $8) + ) + ) + (i32.const 0) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $label$break$L308) + ) ) - (set_local $12 - (i32.const 98) + (set_local $8 + (i32.add + (get_local $8) + (i32.const 4) + ) + ) + (if + (i32.gt_s + (tee_local $1 + (i32.add + (tee_local $5 + (call $_wctomb + (get_local $63) + (get_local $1) + ) + ) + (get_local $6) + ) + ) + (get_local $7) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $label$break$L308) + ) + ) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) + ) + (i32.const 0) + ) + (call $___fwritex + (get_local $63) + (get_local $5) + (get_local $0) + ) + ) + (if + (i32.lt_u + (get_local $1) + (get_local $7) + ) + (set_local $6 + (get_local $1) + ) + (block + (set_local $38 + (get_local $7) + ) + (set_local $12 + (i32.const 98) + ) + (br $while-out$131) + ) ) - (br $while-out$131) + (br $while-in$132) ) ) - (br $while-in$132) ) ) ) @@ -8216,267 +8296,267 @@ ) ) ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 98) - ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 98) ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $16) - (get_local $38) - (i32.xor - (get_local $18) - (i32.const 8192) + (block + (set_local $12 + (i32.const 0) ) - ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (select + (call $_pad + (get_local $0) + (i32.const 32) (get_local $16) (get_local $38) - (i32.gt_s + (i32.xor + (get_local $18) + (i32.const 8192) + ) + ) + (set_local $20 + (get_local $9) + ) + (set_local $1 + (select (get_local $16) (get_local $38) + (i32.gt_s + (get_local $16) + (get_local $38) + ) ) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $8 - (get_local $21) - ) - (br $label$continue$L1) - ) - ) - (if - (i32.eq - (get_local $12) - (i32.const 77) ) - (block - (set_local $12 - (i32.const 0) + (if + (i32.eq + (get_local $12) + (i32.const 77) ) - (set_local $5 - (select - (i32.and - (get_local $34) - (i32.const -65537) - ) - (get_local $34) - (i32.gt_s - (get_local $32) - (i32.const -1) - ) + (block + (set_local $12 + (i32.const 0) ) - ) - (set_local $47 - (if - (i32.or - (i32.ne + (set_local $5 + (select + (i32.and + (get_local $34) + (i32.const -65537) + ) + (get_local $34) + (i32.gt_s (get_local $32) - (i32.const 0) + (i32.const -1) ) - (tee_local $1 - (i32.or - (i32.ne - (i32.load - (tee_local $1 - (get_local $19) + ) + ) + (set_local $47 + (if + (i32.or + (i32.ne + (get_local $32) + (i32.const 0) + ) + (tee_local $1 + (i32.or + (i32.ne + (i32.load + (tee_local $1 + (get_local $19) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (i32.ne - (i32.load offset=4 - (get_local $1) + (i32.ne + (i32.load offset=4 + (get_local $1) + ) + (i32.const 0) ) - (i32.const 0) ) ) ) - ) - (block - (set_local $7 - (i32.gt_s - (get_local $32) - (tee_local $1 - (i32.add - (i32.xor - (i32.and - (get_local $1) + (block + (set_local $7 + (i32.gt_s + (get_local $32) + (tee_local $1 + (i32.add + (i32.xor + (i32.and + (get_local $1) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) - ) - (i32.sub - (get_local $71) - (get_local $58) + (i32.sub + (get_local $71) + (get_local $58) + ) ) ) ) ) - ) - (set_local $37 - (get_local $5) - ) - (set_local $42 - (select - (get_local $32) - (get_local $1) - (get_local $7) + (set_local $37 + (get_local $5) ) + (set_local $42 + (select + (get_local $32) + (get_local $1) + (get_local $7) + ) + ) + (set_local $43 + (get_local $35) + ) + (set_local $48 + (get_local $36) + ) + (set_local $49 + (get_local $28) + ) + (get_local $58) ) - (set_local $43 - (get_local $35) - ) - (set_local $48 - (get_local $36) - ) - (set_local $49 - (get_local $28) - ) - (get_local $58) - ) - (block - (set_local $37 - (get_local $5) - ) - (set_local $42 - (i32.const 0) - ) - (set_local $43 - (get_local $35) - ) - (set_local $48 - (get_local $36) - ) - (set_local $49 + (block + (set_local $37 + (get_local $5) + ) + (set_local $42 + (i32.const 0) + ) + (set_local $43 + (get_local $35) + ) + (set_local $48 + (get_local $36) + ) + (set_local $49 + (get_local $28) + ) (get_local $28) ) - (get_local $28) ) ) ) ) - ) - (set_local $1 - (i32.lt_s - (get_local $42) - (tee_local $7 - (i32.sub - (get_local $49) - (get_local $47) + (set_local $1 + (i32.lt_s + (get_local $42) + (tee_local $7 + (i32.sub + (get_local $49) + (get_local $47) + ) ) ) ) - ) - (set_local $5 - (i32.lt_s - (get_local $16) - (tee_local $1 - (i32.add - (get_local $43) - (tee_local $6 - (select - (get_local $7) - (get_local $42) - (get_local $1) + (set_local $5 + (i32.lt_s + (get_local $16) + (tee_local $1 + (i32.add + (get_local $43) + (tee_local $6 + (select + (get_local $7) + (get_local $42) + (get_local $1) + ) ) ) ) ) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (tee_local $5 - (select - (get_local $1) - (get_local $16) - (get_local $5) + (call $_pad + (get_local $0) + (i32.const 32) + (tee_local $5 + (select + (get_local $1) + (get_local $16) + (get_local $5) + ) ) + (get_local $1) + (get_local $37) ) - (get_local $1) - (get_local $37) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $48) + (get_local $43) + (get_local $0) ) - (i32.const 0) ) - (call $___fwritex - (get_local $48) - (get_local $43) + (call $_pad (get_local $0) + (i32.const 48) + (get_local $5) + (get_local $1) + (i32.xor + (get_local $37) + (i32.const 65536) + ) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $5) - (get_local $1) - (i32.xor - (get_local $37) - (i32.const 65536) + (call $_pad + (get_local $0) + (i32.const 48) + (get_local $6) + (get_local $7) + (i32.const 0) ) - ) - (call $_pad - (get_local $0) - (i32.const 48) - (get_local $6) - (get_local $7) - (i32.const 0) - ) - (if - (i32.eq - (i32.and - (i32.load - (get_local $0) + (if + (i32.eq + (i32.and + (i32.load + (get_local $0) + ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) + ) + (call $___fwritex + (get_local $47) + (get_local $7) + (get_local $0) + ) + ) + (call $_pad + (get_local $0) + (i32.const 32) + (get_local $5) + (get_local $1) + (i32.xor + (get_local $37) + (i32.const 8192) ) - (i32.const 0) ) - (call $___fwritex - (get_local $47) - (get_local $7) - (get_local $0) + (set_local $20 + (get_local $9) ) - ) - (call $_pad - (get_local $0) - (i32.const 32) - (get_local $5) - (get_local $1) - (i32.xor - (get_local $37) - (i32.const 8192) + (set_local $1 + (get_local $5) ) + (set_local $8 + (get_local $21) + ) + (br $label$continue$L1) ) - (set_local $20 - (get_local $9) - ) - (set_local $1 - (get_local $5) - ) - (set_local $8 - (get_local $21) - ) - (br $label$continue$L1) ) (block $label$break$L343 (if @@ -8501,102 +8581,106 @@ (set_local $1 (i32.const 1) ) - (loop $while-out$136 $while-in$137 - (if - (i32.eq - (tee_local $0 - (i32.load - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) + (loop $while-in$137 + (block $while-out$136 + (if + (i32.eq + (tee_local $0 + (i32.load + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$136) - ) - (call $_pop_arg_336 - (i32.add - (get_local $3) - (i32.shl - (get_local $1) - (i32.const 3) - ) + (br $while-out$136) ) - (get_local $0) - (get_local $2) - ) - (if - (i32.ge_s - (tee_local $1 - (i32.add + (call $_pop_arg_336 + (i32.add + (get_local $3) + (i32.shl (get_local $1) - (i32.const 1) + (i32.const 3) ) ) - (i32.const 10) + (get_local $0) + (get_local $2) ) - (block - (set_local $24 - (i32.const 1) + (if + (i32.ge_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (i32.const 10) + ) + (block + (set_local $24 + (i32.const 1) + ) + (br $label$break$L343) ) - (br $label$break$L343) ) + (br $while-in$137) ) - (br $while-in$137) ) (if (i32.lt_s (get_local $1) (i32.const 10) ) - (loop $while-out$138 $while-in$139 - (set_local $0 - (i32.add - (get_local $1) - (i32.const 1) + (loop $while-in$139 + (block $while-out$138 + (set_local $0 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (if - (i32.ne - (i32.load - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 2) + (if + (i32.ne + (i32.load + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 2) + ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $24 - (i32.const -1) + (block + (set_local $24 + (i32.const -1) + ) + (br $label$break$L343) ) - (br $label$break$L343) - ) - ) - (if - (i32.lt_s - (get_local $0) - (i32.const 10) - ) - (set_local $1 - (get_local $0) ) - (block - (set_local $24 - (i32.const 1) + (if + (i32.lt_s + (get_local $0) + (i32.const 10) + ) + (set_local $1 + (get_local $0) + ) + (block + (set_local $24 + (i32.const 1) + ) + (br $while-out$138) ) - (br $while-out$138) ) + (br $while-in$139) ) - (br $while-in$139) ) (set_local $24 (i32.const 1) @@ -9050,71 +9134,73 @@ (set_local $4 (get_local $1) ) - (loop $while-out$0 $while-in$1 - (set_local $0 - (call $___uremdi3 - (get_local $3) - (get_local $4) - (i32.const 10) - (i32.const 0) - ) - ) - (i32.store8 - (tee_local $2 - (i32.add - (get_local $2) - (i32.const -1) + (loop $while-in$1 + (block $while-out$0 + (set_local $0 + (call $___uremdi3 + (get_local $3) + (get_local $4) + (i32.const 10) + (i32.const 0) ) ) - (i32.and - (i32.or - (get_local $0) - (i32.const 48) + (i32.store8 + (tee_local $2 + (i32.add + (get_local $2) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (get_local $0) + (i32.const 48) + ) + (i32.const 255) ) - (i32.const 255) - ) - ) - (set_local $0 - (call $___udivdi3 - (get_local $3) - (get_local $4) - (i32.const 10) - (i32.const 0) - ) - ) - (set_local $1 - (i32.load - (i32.const 168) ) - ) - (if - (i32.or - (i32.gt_u + (set_local $0 + (call $___udivdi3 + (get_local $3) (get_local $4) - (i32.const 9) + (i32.const 10) + (i32.const 0) ) - (i32.and - (i32.eq + ) + (set_local $1 + (i32.load + (i32.const 168) + ) + ) + (if + (i32.or + (i32.gt_u (get_local $4) (i32.const 9) ) - (i32.gt_u - (get_local $3) - (i32.const -1) + (i32.and + (i32.eq + (get_local $4) + (i32.const 9) + ) + (i32.gt_u + (get_local $3) + (i32.const -1) + ) ) ) - ) - (block - (set_local $3 - (get_local $0) - ) - (set_local $4 - (get_local $1) + (block + (set_local $3 + (get_local $0) + ) + (set_local $4 + (get_local $1) + ) ) + (br $while-out$0) ) - (br $while-out$0) + (br $while-in$1) ) - (br $while-in$1) ) (set_local $3 (get_local $0) @@ -9138,53 +9224,55 @@ (set_local $1 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (i32.store8 - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) + (loop $while-in$3 + (block $while-out$2 + (i32.store8 + (tee_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) + (i32.and + (i32.or + (i32.and + (i32.rem_u + (get_local $3) + (i32.const 10) + ) + (i32.const -1) + ) + (i32.const 48) + ) + (i32.const 255) ) ) - (i32.and - (i32.or - (i32.and - (i32.rem_u - (get_local $3) - (i32.const 10) - ) - (i32.const -1) + (set_local $0 + (i32.and + (i32.div_u + (get_local $3) + (i32.const 10) ) - (i32.const 48) + (i32.const -1) ) - (i32.const 255) ) - ) - (set_local $0 - (i32.and - (i32.div_u + (if + (i32.lt_u (get_local $3) (i32.const 10) ) - (i32.const -1) - ) - ) - (if - (i32.lt_u - (get_local $3) - (i32.const 10) - ) - (block - (set_local $0 - (get_local $1) + (block + (set_local $0 + (get_local $1) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $0) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $0) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -9288,46 +9376,48 @@ (set_local $3 (get_local $5) ) - (loop $while-out$2 $while-in$3 - (set_local $4 - (i32.eq - (i32.and - (tee_local $1 - (if - (get_local $4) - (block - (drop - (call $___fwritex - (get_local $6) - (i32.const 256) + (loop $while-in$3 + (block $while-out$2 + (set_local $4 + (i32.eq + (i32.and + (tee_local $1 + (if + (get_local $4) + (block + (drop + (call $___fwritex + (get_local $6) + (i32.const 256) + (get_local $0) + ) + ) + (i32.load (get_local $0) ) ) - (i32.load - (get_local $0) - ) + (get_local $1) ) - (get_local $1) ) + (i32.const 32) ) - (i32.const 32) + (i32.const 0) ) - (i32.const 0) ) - ) - (if - (i32.le_u - (tee_local $3 - (i32.add - (get_local $3) - (i32.const -256) + (if + (i32.le_u + (tee_local $3 + (i32.add + (get_local $3) + (i32.const -256) + ) ) + (i32.const 255) ) - (i32.const 255) + (br $while-out$2) ) - (br $while-out$2) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $1 (i32.and @@ -10093,76 +10183,78 @@ (set_local $8 (get_local $0) ) - (loop $while-out$23 $while-in$24 - (if - (i32.eq - (tee_local $0 - (i32.load offset=16 - (get_local $4) - ) - ) - (i32.const 0) - ) + (loop $while-in$24 + (block $while-out$23 (if (i32.eq (tee_local $0 - (i32.load offset=20 + (i32.load offset=16 (get_local $4) ) ) (i32.const 0) ) - (block - (set_local $7 - (get_local $2) + (if + (i32.eq + (tee_local $0 + (i32.load offset=20 + (get_local $4) + ) + ) + (i32.const 0) ) - (set_local $10 - (get_local $8) + (block + (set_local $7 + (get_local $2) + ) + (set_local $10 + (get_local $8) + ) + (br $while-out$23) + ) + (set_local $1 + (get_local $0) ) - (br $while-out$23) ) (set_local $1 (get_local $0) ) ) - (set_local $1 - (get_local $0) - ) - ) - (set_local $0 - (i32.lt_u - (tee_local $4 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $1) + (set_local $0 + (i32.lt_u + (tee_local $4 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $6) ) - (get_local $6) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $4) - (get_local $2) - (get_local $0) + (set_local $2 + (select + (get_local $4) + (get_local $2) + (get_local $0) + ) ) - ) - (set_local $4 - (get_local $1) - ) - (set_local $8 - (select + (set_local $4 (get_local $1) - (get_local $8) - (get_local $0) ) + (set_local $8 + (select + (get_local $1) + (get_local $8) + (get_local $0) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -10245,56 +10337,58 @@ (get_local $2) ) ) - (loop $while-out$27 $while-in$28 - (if - (i32.ne - (tee_local $2 - (i32.load - (tee_local $5 - (i32.add - (get_local $4) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (i32.ne + (tee_local $2 + (i32.load + (tee_local $5 + (i32.add + (get_local $4) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $4 - (get_local $2) - ) - (set_local $8 - (get_local $5) + (block + (set_local $4 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (i32.eq - (tee_local $2 - (i32.load - (tee_local $5 - (i32.add - (get_local $4) - (i32.const 16) + (if + (i32.eq + (tee_local $2 + (i32.load + (tee_local $5 + (i32.add + (get_local $4) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$27) - (block - (set_local $4 - (get_local $2) - ) - (set_local $8 - (get_local $5) + (br $while-out$27) + (block + (set_local $4 + (get_local $2) + ) + (set_local $8 + (get_local $5) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -10934,83 +11028,85 @@ (set_local $36 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $16 - (i32.sub - (tee_local $3 - (i32.and - (i32.load offset=4 - (get_local $23) - ) - (i32.const -8) - ) - ) - (get_local $5) - ) - ) - (get_local $7) - ) + (loop $while-in$4 + (block $while-out$3 (if - (i32.eq - (get_local $3) - (get_local $5) + (i32.lt_u + (tee_local $16 + (i32.sub + (tee_local $3 + (i32.and + (i32.load offset=4 + (get_local $23) + ) + (i32.const -8) + ) + ) + (get_local $5) + ) + ) + (get_local $7) ) - (block - (set_local $26 - (get_local $16) + (if + (i32.eq + (get_local $3) + (get_local $5) ) - (set_local $24 - (get_local $23) + (block + (set_local $26 + (get_local $16) + ) + (set_local $24 + (get_local $23) + ) + (set_local $29 + (get_local $23) + ) + (set_local $11 + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $29 + (set_local $36 (get_local $23) ) - (set_local $11 - (i32.const 90) - ) - (br $label$break$L123) ) - (set_local $36 - (get_local $23) + (set_local $16 + (get_local $7) ) ) - (set_local $16 - (get_local $7) - ) - ) - (set_local $7 - (i32.eq - (tee_local $3 - (i32.load offset=20 - (get_local $23) + (set_local $7 + (i32.eq + (tee_local $3 + (i32.load offset=20 + (get_local $23) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $15 - (select - (get_local $15) - (get_local $3) - (i32.or - (get_local $7) - (i32.eq - (get_local $3) - (tee_local $3 - (i32.load - (i32.add + (set_local $15 + (select + (get_local $15) + (get_local $3) + (i32.or + (get_local $7) + (i32.eq + (get_local $3) + (tee_local $3 + (i32.load (i32.add - (get_local $23) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $11) - (i32.const 31) + (i32.add + (get_local $23) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $11) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -11018,51 +11114,51 @@ ) ) ) - ) - (set_local $11 - (i32.shl - (get_local $11) - (i32.xor - (i32.and - (tee_local $7 - (i32.eq - (get_local $3) - (i32.const 0) + (set_local $11 + (i32.shl + (get_local $11) + (i32.xor + (i32.and + (tee_local $7 + (i32.eq + (get_local $3) + (i32.const 0) + ) ) + (i32.const 1) ) (i32.const 1) ) - (i32.const 1) - ) - ) - ) - (if - (get_local $7) - (block - (set_local $31 - (get_local $16) - ) - (set_local $32 - (get_local $15) - ) - (set_local $28 - (get_local $36) - ) - (set_local $11 - (i32.const 86) ) - (br $while-out$3) ) - (block - (set_local $7 - (get_local $16) + (if + (get_local $7) + (block + (set_local $31 + (get_local $16) + ) + (set_local $32 + (get_local $15) + ) + (set_local $28 + (get_local $36) + ) + (set_local $11 + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $23 - (get_local $3) + (block + (set_local $7 + (get_local $16) + ) + (set_local $23 + (get_local $3) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -11249,90 +11345,92 @@ (get_local $11) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $11 - (i32.const 0) - ) - (set_local $0 - (i32.lt_u - (tee_local $3 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $24) + (loop $while-in$6 + (block $while-out$5 + (set_local $11 + (i32.const 0) + ) + (set_local $0 + (i32.lt_u + (tee_local $3 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $24) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $5) ) - (get_local $5) ) + (get_local $26) ) - (get_local $26) - ) - ) - (set_local $17 - (select - (get_local $3) - (get_local $26) - (get_local $0) ) - ) - (set_local $3 - (select - (get_local $24) - (get_local $29) - (get_local $0) - ) - ) - (if - (i32.ne - (tee_local $0 - (i32.load offset=16 - (get_local $24) - ) + (set_local $17 + (select + (get_local $3) + (get_local $26) + (get_local $0) ) - (i32.const 0) ) - (block - (set_local $26 - (get_local $17) - ) - (set_local $24 + (set_local $3 + (select + (get_local $24) + (get_local $29) (get_local $0) ) - (set_local $29 - (get_local $3) - ) - (br $while-in$6) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load offset=20 - (get_local $24) + (if + (i32.ne + (tee_local $0 + (i32.load offset=16 + (get_local $24) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $13 - (get_local $3) + (block + (set_local $26 + (get_local $17) + ) + (set_local $24 + (get_local $0) + ) + (set_local $29 + (get_local $3) + ) + (br $while-in$6) ) - (br $while-out$5) ) - (block - (set_local $26 - (get_local $17) + (if + (i32.eq + (tee_local $0 + (i32.load offset=20 + (get_local $24) + ) + ) + (i32.const 0) ) - (set_local $24 - (get_local $0) + (block + (set_local $13 + (get_local $3) + ) + (br $while-out$5) ) - (set_local $29 - (get_local $3) + (block + (set_local $26 + (get_local $17) + ) + (set_local $24 + (get_local $0) + ) + (set_local $29 + (get_local $3) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -11434,57 +11532,59 @@ (set_local $8 (get_local $2) ) - ) - (loop $while-out$9 $while-in$10 - (if - (i32.ne - (tee_local $2 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 20) - ) - ) - ) - ) - (i32.const 0) - ) - (block - (set_local $8 - (get_local $2) - ) - (set_local $9 - (get_local $7) - ) - (br $while-in$10) - ) - ) - (if - (i32.eq - (tee_local $2 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 16) + ) + (loop $while-in$10 + (block $while-out$9 + (if + (i32.ne + (tee_local $2 + (i32.load + (tee_local $7 + (i32.add + (get_local $8) + (i32.const 20) + ) ) ) ) + (i32.const 0) + ) + (block + (set_local $8 + (get_local $2) + ) + (set_local $9 + (get_local $7) + ) + (br $while-in$10) ) - (i32.const 0) ) - (br $while-out$9) - (block - (set_local $8 - (get_local $2) + (if + (i32.eq + (tee_local $2 + (i32.load + (tee_local $7 + (i32.add + (get_local $8) + (i32.const 16) + ) + ) + ) + ) + (i32.const 0) ) - (set_local $9 - (get_local $7) + (br $while-out$9) + (block + (set_local $8 + (get_local $2) + ) + (set_local $9 + (get_local $7) + ) ) ) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -12093,78 +12193,80 @@ (get_local $2) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $2) + ) + (i32.const -8) + ) + (get_local $17) + ) + (block + (set_local $22 (get_local $2) ) - (i32.const -8) + (set_local $11 + (i32.const 148) + ) + (br $while-out$17) ) - (get_local $17) ) - (block - (set_local $22 - (get_local $2) - ) - (set_local $11 - (i32.const 148) + (set_local $4 + (i32.shl + (get_local $1) + (i32.const 1) ) - (br $while-out$17) - ) - ) - (set_local $4 - (i32.shl - (get_local $1) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $1 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $1 (i32.add - (get_local $2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) + (i32.add + (get_local $2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $25 - (get_local $2) - ) - (set_local $37 - (get_local $1) - ) - (set_local $11 - (i32.const 145) - ) - (br $while-out$17) - ) - (block - (set_local $1 - (get_local $4) + (block + (set_local $25 + (get_local $2) + ) + (set_local $37 + (get_local $1) + ) + (set_local $11 + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $2 - (get_local $0) + (block + (set_local $1 + (get_local $4) + ) + (set_local $2 + (get_local $0) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -12603,62 +12705,64 @@ (set_local $16 (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (if - (i32.le_u - (tee_local $4 - (i32.load - (get_local $16) - ) - ) - (get_local $0) - ) + (loop $while-in$38 + (block $while-out$37 (if - (i32.gt_u - (i32.add - (get_local $4) + (i32.le_u + (tee_local $4 (i32.load - (tee_local $3 - (i32.add - (get_local $16) - (i32.const 4) - ) - ) + (get_local $16) ) ) (get_local $0) ) - (block - (set_local $4 - (get_local $16) + (if + (i32.gt_u + (i32.add + (get_local $4) + (i32.load + (tee_local $3 + (i32.add + (get_local $16) + (i32.const 4) + ) + ) + ) + ) + (get_local $0) ) - (set_local $16 - (get_local $3) + (block + (set_local $4 + (get_local $16) + ) + (set_local $16 + (get_local $3) + ) + (br $while-out$37) ) - (br $while-out$37) ) ) - ) - (if - (i32.eq - (tee_local $4 - (i32.load offset=8 - (get_local $16) + (if + (i32.eq + (tee_local $4 + (i32.load offset=8 + (get_local $16) + ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $11 - (i32.const 173) + (block + (set_local $11 + (i32.const 173) + ) + (br $label$break$L259) + ) + (set_local $16 + (get_local $4) ) - (br $label$break$L259) - ) - (set_local $16 - (get_local $4) ) + (br $while-in$38) ) - (br $while-in$38) ) (if (i32.lt_u @@ -13119,39 +13223,41 @@ (set_local $1 (i32.const 0) ) - (loop $while-out$77 $while-in$78 - (i32.store offset=12 - (tee_local $0 - (i32.add - (i32.const 216) - (i32.shl + (loop $while-in$78 + (block $while-out$77 + (i32.store offset=12 + (tee_local $0 + (i32.add + (i32.const 216) (i32.shl - (get_local $1) - (i32.const 1) + (i32.shl + (get_local $1) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) + (get_local $0) ) - (get_local $0) - ) - (i32.store offset=8 - (get_local $0) - (get_local $0) - ) - (if - (i32.eq - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (i32.store offset=8 + (get_local $0) + (get_local $0) + ) + (if + (i32.eq + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (i32.const 32) ) - (i32.const 32) + (br $while-out$77) ) - (br $while-out$77) + (br $while-in$78) ) - (br $while-in$78) ) (set_local $1 (i32.eq @@ -13225,62 +13331,64 @@ (set_local $7 (i32.const 624) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (get_local $14) - (i32.add - (tee_local $4 - (i32.load - (get_local $7) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (get_local $14) + (i32.add + (tee_local $4 + (i32.load + (get_local $7) + ) ) - ) - (tee_local $3 - (i32.load - (tee_local $5 - (i32.add - (get_local $7) - (i32.const 4) + (tee_local $3 + (i32.load + (tee_local $5 + (i32.add + (get_local $7) + (i32.const 4) + ) ) ) ) ) ) + (block + (set_local $1 + (get_local $4) + ) + (set_local $2 + (get_local $3) + ) + (set_local $42 + (get_local $5) + ) + (set_local $43 + (get_local $7) + ) + (set_local $11 + (i32.const 203) + ) + (br $while-out$46) + ) ) - (block - (set_local $1 - (get_local $4) - ) - (set_local $2 - (get_local $3) - ) - (set_local $42 - (get_local $5) - ) - (set_local $43 - (get_local $7) - ) - (set_local $11 - (i32.const 203) + (if + (i32.eq + (tee_local $4 + (i32.load offset=8 + (get_local $7) + ) + ) + (i32.const 0) ) (br $while-out$46) - ) - ) - (if - (i32.eq - (tee_local $4 - (i32.load offset=8 - (get_local $7) - ) + (set_local $7 + (get_local $4) ) - (i32.const 0) - ) - (br $while-out$46) - (set_local $7 - (get_local $4) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -13421,44 +13529,46 @@ (set_local $1 (i32.const 624) ) - (loop $while-out$48 $while-in$49 - (if - (i32.eq - (i32.load - (get_local $1) - ) - (get_local $3) - ) - (block - (set_local $44 - (get_local $1) - ) - (set_local $38 - (get_local $1) - ) - (set_local $11 - (i32.const 211) + (loop $while-in$49 + (block $while-out$48 + (if + (i32.eq + (i32.load + (get_local $1) + ) + (get_local $3) ) - (br $while-out$48) - ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load offset=8 + (block + (set_local $44 + (get_local $1) + ) + (set_local $38 (get_local $1) ) + (set_local $11 + (i32.const 211) + ) + (br $while-out$48) ) - (i32.const 0) ) - (block - (set_local $27 - (i32.const 624) + (if + (i32.eq + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) + ) + (i32.const 0) + ) + (block + (set_local $27 + (i32.const 624) + ) + (br $while-out$48) ) - (br $while-out$48) ) + (br $while-in$49) ) - (br $while-in$49) ) (if (i32.eq @@ -13874,56 +13984,58 @@ (get_local $1) ) ) - (loop $while-out$55 $while-in$56 - (if - (i32.ne - (tee_local $1 - (i32.load - (tee_local $20 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$56 + (block $while-out$55 + (if + (i32.ne + (tee_local $1 + (i32.load + (tee_local $20 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $1) - ) - (set_local $9 - (get_local $20) + (block + (set_local $2 + (get_local $1) + ) + (set_local $9 + (get_local $20) + ) + (br $while-in$56) ) - (br $while-in$56) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $20 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $20 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$55) - (block - (set_local $2 - (get_local $1) - ) - (set_local $9 - (get_local $20) + (br $while-out$55) + (block + (set_local $2 + (get_local $1) + ) + (set_local $9 + (get_local $20) + ) ) ) + (br $while-in$56) ) - (br $while-in$56) ) (if (i32.lt_u @@ -14524,78 +14636,80 @@ (get_local $2) ) ) - (loop $while-out$69 $while-in$70 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$70 + (block $while-out$69 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $2) + ) + (i32.const -8) + ) + (get_local $4) + ) + (block + (set_local $34 (get_local $2) ) - (i32.const -8) + (set_local $11 + (i32.const 281) + ) + (br $while-out$69) ) - (get_local $4) ) - (block - (set_local $34 - (get_local $2) - ) - (set_local $11 - (i32.const 281) + (set_local $8 + (i32.shl + (get_local $1) + (i32.const 1) ) - (br $while-out$69) - ) - ) - (set_local $8 - (i32.shl - (get_local $1) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $1 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $1 (i32.add - (get_local $2) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $1) - (i32.const 31) + (i32.add + (get_local $2) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $1) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $45 - (get_local $2) - ) - (set_local $40 - (get_local $1) - ) - (set_local $11 - (i32.const 278) - ) - (br $while-out$69) - ) - (block - (set_local $1 - (get_local $8) + (block + (set_local $45 + (get_local $2) + ) + (set_local $40 + (get_local $1) + ) + (set_local $11 + (i32.const 278) + ) + (br $while-out$69) ) - (set_local $2 - (get_local $0) + (block + (set_local $1 + (get_local $8) + ) + (set_local $2 + (get_local $0) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (if (i32.eq @@ -14699,42 +14813,44 @@ ) ) ) - (loop $while-out$71 $while-in$72 - (if - (i32.le_u - (tee_local $1 - (i32.load - (get_local $27) - ) - ) - (get_local $0) - ) + (loop $while-in$72 + (block $while-out$71 (if - (i32.gt_u + (i32.le_u (tee_local $1 - (i32.add - (get_local $1) - (i32.load offset=4 - (get_local $27) - ) + (i32.load + (get_local $27) ) ) (get_local $0) ) - (block - (set_local $2 - (get_local $1) + (if + (i32.gt_u + (tee_local $1 + (i32.add + (get_local $1) + (i32.load offset=4 + (get_local $27) + ) + ) + ) + (get_local $0) + ) + (block + (set_local $2 + (get_local $1) + ) + (br $while-out$71) ) - (br $while-out$71) ) ) - ) - (set_local $27 - (i32.load offset=8 - (get_local $27) + (set_local $27 + (i32.load offset=8 + (get_local $27) + ) ) + (br $while-in$72) ) - (br $while-in$72) ) (set_local $8 (i32.eq @@ -14915,27 +15031,29 @@ (i32.const 24) ) ) - (loop $while-out$73 $while-in$74 - (i32.store - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (i32.store + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) + (i32.const 7) ) - (i32.const 7) - ) - (if - (i32.ge_u - (i32.add - (get_local $1) - (i32.const 4) + (if + (i32.ge_u + (i32.add + (get_local $1) + (i32.const 4) + ) + (get_local $2) ) - (get_local $2) + (br $while-out$73) ) - (br $while-out$73) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.ne @@ -15266,78 +15384,80 @@ (get_local $4) ) ) - (loop $while-out$75 $while-in$76 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$76 + (block $while-out$75 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $4) + ) + (i32.const -8) + ) + (get_local $3) + ) + (block + (set_local $35 (get_local $4) ) - (i32.const -8) + (set_local $11 + (i32.const 307) + ) + (br $while-out$75) ) - (get_local $3) ) - (block - (set_local $35 - (get_local $4) - ) - (set_local $11 - (i32.const 307) + (set_local $8 + (i32.shl + (get_local $2) + (i32.const 1) ) - (br $while-out$75) - ) - ) - (set_local $8 - (i32.shl - (get_local $2) - (i32.const 1) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $2 - (i32.add + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $2 (i32.add - (get_local $4) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $2) - (i32.const 31) + (i32.add + (get_local $4) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $2) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $46 - (get_local $4) - ) - (set_local $41 - (get_local $2) - ) - (set_local $11 - (i32.const 304) - ) - (br $while-out$75) - ) - (block - (set_local $2 - (get_local $8) + (block + (set_local $46 + (get_local $4) + ) + (set_local $41 + (get_local $2) + ) + (set_local $11 + (i32.const 304) + ) + (br $while-out$75) ) - (set_local $4 - (get_local $1) + (block + (set_local $2 + (get_local $8) + ) + (set_local $4 + (get_local $1) + ) ) ) + (br $while-in$76) ) - (br $while-in$76) ) (if (i32.eq @@ -15875,56 +15995,58 @@ (get_local $0) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.ne - (tee_local $0 - (i32.load - (tee_local $13 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.ne + (tee_local $0 + (i32.load + (tee_local $13 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $7 - (get_local $13) + (block + (set_local $2 + (get_local $0) + ) + (set_local $7 + (get_local $13) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $13 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $13 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$4) - (block - (set_local $2 - (get_local $0) - ) - (set_local $7 - (get_local $13) + (br $while-out$4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $7 + (get_local $13) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -16549,56 +16671,58 @@ (get_local $1) ) ) - (loop $while-out$12 $while-in$13 - (if - (i32.ne - (tee_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $2) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (i32.ne + (tee_local $1 + (i32.load + (tee_local $7 + (i32.add + (get_local $2) + (i32.const 20) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $2 - (get_local $1) - ) - (set_local $8 - (get_local $7) + (block + (set_local $2 + (get_local $1) + ) + (set_local $8 + (get_local $7) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (i32.eq - (tee_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $2) - (i32.const 16) + (if + (i32.eq + (tee_local $1 + (i32.load + (tee_local $7 + (i32.add + (get_local $2) + (i32.const 16) + ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (br $while-out$12) - (block - (set_local $2 - (get_local $1) - ) - (set_local $8 - (get_local $7) + (br $while-out$12) + (block + (set_local $2 + (get_local $1) + ) + (set_local $8 + (get_local $7) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -17206,78 +17330,80 @@ (get_local $1) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) + ) + (get_local $5) + ) + (block + (set_local $15 (get_local $1) ) - (i32.const -8) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (get_local $5) ) - (block - (set_local $15 - (get_local $1) - ) - (set_local $0 - (i32.const 130) + (set_local $2 + (i32.shl + (get_local $6) + (i32.const 1) ) - (br $while-out$18) ) - ) - (set_local $2 - (i32.shl - (get_local $6) - (i32.const 1) - ) - ) - (if - (i32.eq - (tee_local $0 - (i32.load - (tee_local $6 - (i32.add + (if + (i32.eq + (tee_local $0 + (i32.load + (tee_local $6 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $6) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $6) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) + (i32.const 0) ) - (i32.const 0) - ) - (block - (set_local $18 - (get_local $1) - ) - (set_local $17 - (get_local $6) - ) - (set_local $0 - (i32.const 127) - ) - (br $while-out$18) - ) - (block - (set_local $6 - (get_local $2) + (block + (set_local $18 + (get_local $1) + ) + (set_local $17 + (get_local $6) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $1 - (get_local $0) + (block + (set_local $6 + (get_local $2) + ) + (set_local $1 + (get_local $0) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -17389,28 +17515,30 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $0 - (i32.eq - (tee_local $6 - (i32.load - (get_local $6) + (loop $while-in$21 + (block $while-out$20 + (set_local $0 + (i32.eq + (tee_local $6 + (i32.load + (get_local $6) + ) ) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const 8) + (set_local $6 + (i32.add + (get_local $6) + (i32.const 8) + ) ) + (if + (get_local $0) + (br $while-out$20) + ) + (br $while-in$21) ) - (if - (get_local $0) - (br $while-out$20) - ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -17526,66 +17654,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) @@ -17732,117 +17866,123 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eq - (get_local $2) - (i32.const 0) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eq + (get_local $2) + (i32.const 0) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -19151,152 +19291,154 @@ (set_local $0 (i32.const 0) ) - (loop $while-out$2 $while-in$3 - (set_local $6 - (i32.or - (i32.shr_u - (get_local $10) - (i32.const 31) - ) - (i32.shl - (get_local $9) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (set_local $6 + (i32.or + (i32.shr_u + (get_local $10) + (i32.const 31) + ) + (i32.shl + (get_local $9) + (i32.const 1) + ) ) ) - ) - (set_local $10 - (i32.or - (get_local $0) - (i32.shl - (get_local $10) - (i32.const 1) + (set_local $10 + (i32.or + (get_local $0) + (i32.shl + (get_local $10) + (i32.const 1) + ) ) ) - ) - (drop - (call $_i64Subtract - (get_local $3) - (get_local $8) - (tee_local $0 - (i32.or - (i32.const 0) + (drop + (call $_i64Subtract + (get_local $3) + (get_local $8) + (tee_local $0 (i32.or - (i32.shl - (get_local $11) - (i32.const 1) + (i32.const 0) + (i32.or + (i32.shl + (get_local $11) + (i32.const 1) + ) + (i32.shr_u + (get_local $9) + (i32.const 31) + ) ) + ) + ) + (tee_local $9 + (i32.or (i32.shr_u - (get_local $9) + (get_local $11) (i32.const 31) ) - ) - ) - ) - (tee_local $9 - (i32.or - (i32.shr_u - (get_local $11) - (i32.const 31) - ) - (i32.shl - (get_local $13) - (i32.const 1) + (i32.shl + (get_local $13) + (i32.const 1) + ) ) ) ) ) - ) - (set_local $7 - (i32.and - (tee_local $14 - (i32.or - (i32.shr_s - (tee_local $5 - (i32.load - (i32.const 168) + (set_local $7 + (i32.and + (tee_local $14 + (i32.or + (i32.shr_s + (tee_local $5 + (i32.load + (i32.const 168) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) ) + (i32.const 1) ) - (i32.const 1) ) - ) - (set_local $11 - (call $_i64Subtract - (get_local $0) - (get_local $9) - (i32.and - (get_local $14) - (get_local $1) - ) - (i32.and - (i32.or - (i32.shr_s - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (set_local $11 + (call $_i64Subtract + (get_local $0) + (get_local $9) + (i32.and + (get_local $14) + (get_local $1) + ) + (i32.and + (i32.or + (i32.shr_s + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (select - (i32.const -1) - (i32.const 0) - (i32.lt_s - (get_local $5) + (i32.shl + (select + (i32.const -1) (i32.const 0) + (i32.lt_s + (get_local $5) + (i32.const 0) + ) ) + (i32.const 1) ) - (i32.const 1) ) + (get_local $2) ) - (get_local $2) ) ) - ) - (set_local $13 - (i32.load - (i32.const 168) - ) - ) - (if - (i32.eq - (tee_local $12 - (i32.sub - (get_local $12) - (i32.const 1) - ) + (set_local $13 + (i32.load + (i32.const 168) ) - (i32.const 0) ) - (br $while-out$2) - (block - (set_local $9 - (get_local $6) + (if + (i32.eq + (tee_local $12 + (i32.sub + (get_local $12) + (i32.const 1) + ) + ) + (i32.const 0) ) - (set_local $0 - (get_local $7) + (br $while-out$2) + (block + (set_local $9 + (get_local $6) + ) + (set_local $0 + (get_local $7) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $1 (i32.const 0) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 70da0bd37..f37f143a9 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -608,73 +608,75 @@ (set_local $$i$012 (i32.const 0) ) - (loop $while-out$0 $while-in$1 - (set_local $$arrayidx - (i32.add - (i32.const 687) - (get_local $$i$012) - ) - ) - (set_local $$0 - (i32.load8_s - (get_local $$arrayidx) - ) - ) - (set_local $$conv - (i32.and - (get_local $$0) - (i32.const 255) + (loop $while-in$1 + (block $while-out$0 + (set_local $$arrayidx + (i32.add + (i32.const 687) + (get_local $$i$012) + ) ) - ) - (set_local $$cmp - (i32.eq - (get_local $$conv) - (get_local $$e) + (set_local $$0 + (i32.load8_s + (get_local $$arrayidx) + ) ) - ) - (if - (get_local $$cmp) - (block - (set_local $$i$012$lcssa - (get_local $$i$012) + (set_local $$conv + (i32.and + (get_local $$0) + (i32.const 255) ) - (set_local $label - (i32.const 2) + ) + (set_local $$cmp + (i32.eq + (get_local $$conv) + (get_local $$e) ) - (br $while-out$0) ) - ) - (set_local $$inc - (i32.add - (get_local $$i$012) - (i32.const 1) + (if + (get_local $$cmp) + (block + (set_local $$i$012$lcssa + (get_local $$i$012) + ) + (set_local $label + (i32.const 2) + ) + (br $while-out$0) + ) ) - ) - (set_local $$tobool - (i32.eq - (get_local $$inc) - (i32.const 87) + (set_local $$inc + (i32.add + (get_local $$i$012) + (i32.const 1) + ) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$i$111 + (set_local $$tobool + (i32.eq + (get_local $$inc) (i32.const 87) ) - (set_local $$s$010 - (i32.const 775) + ) + (if + (get_local $$tobool) + (block + (set_local $$i$111 + (i32.const 87) + ) + (set_local $$s$010 + (i32.const 775) + ) + (set_local $label + (i32.const 5) + ) + (br $while-out$0) ) - (set_local $label - (i32.const 5) + (set_local $$i$012 + (get_local $$inc) ) - (br $while-out$0) - ) - (set_local $$i$012 - (get_local $$inc) ) + (br $while-in$1) ) - (br $while-in$1) ) (if (i32.eq @@ -712,84 +714,88 @@ (get_local $label) (i32.const 5) ) - (loop $while-out$2 $while-in$3 - (set_local $label - (i32.const 0) - ) - (set_local $$s$1 - (get_local $$s$010) - ) - (loop $while-out$4 $while-in$5 - (set_local $$1 - (i32.load8_s - (get_local $$s$1) - ) + (loop $while-in$3 + (block $while-out$2 + (set_local $label + (i32.const 0) ) - (set_local $$tobool8 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$1) - (i32.const 24) + (set_local $$s$1 + (get_local $$s$010) + ) + (loop $while-in$5 + (block $while-out$4 + (set_local $$1 + (i32.load8_s + (get_local $$s$1) ) - (i32.const 24) ) - (i32.const 0) + (set_local $$tobool8 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (set_local $$incdec$ptr + (i32.add + (get_local $$s$1) + (i32.const 1) + ) + ) + (if + (get_local $$tobool8) + (block + (set_local $$incdec$ptr$lcssa + (get_local $$incdec$ptr) + ) + (br $while-out$4) + ) + (set_local $$s$1 + (get_local $$incdec$ptr) + ) + ) + (br $while-in$5) ) ) - (set_local $$incdec$ptr + (set_local $$dec (i32.add - (get_local $$s$1) - (i32.const 1) + (get_local $$i$111) + (i32.const -1) + ) + ) + (set_local $$tobool5 + (i32.eq + (get_local $$dec) + (i32.const 0) ) ) (if - (get_local $$tobool8) + (get_local $$tobool5) (block - (set_local $$incdec$ptr$lcssa - (get_local $$incdec$ptr) + (set_local $$s$0$lcssa + (get_local $$incdec$ptr$lcssa) ) - (br $while-out$4) - ) - (set_local $$s$1 - (get_local $$incdec$ptr) - ) - ) - (br $while-in$5) - ) - (set_local $$dec - (i32.add - (get_local $$i$111) - (i32.const -1) - ) - ) - (set_local $$tobool5 - (i32.eq - (get_local $$dec) - (i32.const 0) - ) - ) - (if - (get_local $$tobool5) - (block - (set_local $$s$0$lcssa - (get_local $$incdec$ptr$lcssa) - ) - (br $while-out$2) - ) - (block - (set_local $$i$111 - (get_local $$dec) - ) - (set_local $$s$010 - (get_local $$incdec$ptr$lcssa) + (br $while-out$2) ) - (set_local $label - (i32.const 5) + (block + (set_local $$i$111 + (get_local $$dec) + ) + (set_local $$s$010 + (get_local $$incdec$ptr$lcssa) + ) + (set_local $label + (i32.const 5) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) (return @@ -1346,139 +1352,141 @@ (set_local $$r$021 (get_local $$cond10) ) - (loop $while-out$2 $while-in$3 - (set_local $$lock13 - (i32.add - (get_local $$f$addr$022) - (i32.const 76) + (loop $while-in$3 + (block $while-out$2 + (set_local $$lock13 + (i32.add + (get_local $$f$addr$022) + (i32.const 76) + ) ) - ) - (set_local $$3 - (i32.load - (get_local $$lock13) + (set_local $$3 + (i32.load + (get_local $$lock13) + ) ) - ) - (set_local $$cmp14 - (i32.gt_s - (get_local $$3) - (i32.const -1) + (set_local $$cmp14 + (i32.gt_s + (get_local $$3) + (i32.const -1) + ) ) - ) - (if - (get_local $$cmp14) - (block - (set_local $$call16 - (call $___lockfile - (get_local $$f$addr$022) + (if + (get_local $$cmp14) + (block + (set_local $$call16 + (call $___lockfile + (get_local $$f$addr$022) + ) + ) + (set_local $$cond19 + (get_local $$call16) ) ) (set_local $$cond19 - (get_local $$call16) + (i32.const 0) ) ) - (set_local $$cond19 - (i32.const 0) - ) - ) - (set_local $$wpos - (i32.add - (get_local $$f$addr$022) - (i32.const 20) + (set_local $$wpos + (i32.add + (get_local $$f$addr$022) + (i32.const 20) + ) ) - ) - (set_local $$4 - (i32.load - (get_local $$wpos) + (set_local $$4 + (i32.load + (get_local $$wpos) + ) ) - ) - (set_local $$wbase - (i32.add - (get_local $$f$addr$022) - (i32.const 28) + (set_local $$wbase + (i32.add + (get_local $$f$addr$022) + (i32.const 28) + ) ) - ) - (set_local $$5 - (i32.load - (get_local $$wbase) + (set_local $$5 + (i32.load + (get_local $$wbase) + ) ) - ) - (set_local $$cmp20 - (i32.gt_u - (get_local $$4) - (get_local $$5) + (set_local $$cmp20 + (i32.gt_u + (get_local $$4) + (get_local $$5) + ) ) - ) - (if - (get_local $$cmp20) - (block - (set_local $$call22 - (call $___fflush_unlocked - (get_local $$f$addr$022) + (if + (get_local $$cmp20) + (block + (set_local $$call22 + (call $___fflush_unlocked + (get_local $$f$addr$022) + ) ) - ) - (set_local $$or - (i32.or - (get_local $$call22) - (get_local $$r$021) + (set_local $$or + (i32.or + (get_local $$call22) + (get_local $$r$021) + ) + ) + (set_local $$r$1 + (get_local $$or) ) ) (set_local $$r$1 - (get_local $$or) + (get_local $$r$021) ) ) - (set_local $$r$1 - (get_local $$r$021) - ) - ) - (set_local $$tobool24 - (i32.eq - (get_local $$cond19) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool24) - ) - (call $___unlockfile - (get_local $$f$addr$022) - ) - ) - (set_local $$next - (i32.add - (get_local $$f$addr$022) - (i32.const 56) + (set_local $$tobool24 + (i32.eq + (get_local $$cond19) + (i32.const 0) + ) ) - ) - (set_local $$f$addr$0 - (i32.load - (get_local $$next) + (if + (i32.eqz + (get_local $$tobool24) + ) + (call $___unlockfile + (get_local $$f$addr$022) + ) ) - ) - (set_local $$tobool11 - (i32.eq - (get_local $$f$addr$0) - (i32.const 0) + (set_local $$next + (i32.add + (get_local $$f$addr$022) + (i32.const 56) + ) ) - ) - (if - (get_local $$tobool11) - (block - (set_local $$r$0$lcssa - (get_local $$r$1) + (set_local $$f$addr$0 + (i32.load + (get_local $$next) ) - (br $while-out$2) ) - (block - (set_local $$f$addr$022 + (set_local $$tobool11 + (i32.eq (get_local $$f$addr$0) + (i32.const 0) + ) + ) + (if + (get_local $$tobool11) + (block + (set_local $$r$0$lcssa + (get_local $$r$1) + ) + (br $while-out$2) ) - (set_local $$r$021 - (get_local $$r$1) + (block + (set_local $$f$addr$022 + (get_local $$f$addr$0) + ) + (set_local $$r$021 + (get_local $$r$1) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -1841,331 +1849,333 @@ (set_local $$rem$0 (get_local $$add) ) - (loop $while-out$0 $while-in$1 - (set_local $$2 - (i32.load - (i32.const 16) + (loop $while-in$1 + (block $while-out$0 + (set_local $$2 + (i32.load + (i32.const 16) + ) ) - ) - (set_local $$tobool - (i32.eq - (get_local $$2) - (i32.const 0) + (set_local $$tobool + (i32.eq + (get_local $$2) + (i32.const 0) + ) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$4 - (i32.load - (get_local $$fd8) + (if + (get_local $$tobool) + (block + (set_local $$4 + (i32.load + (get_local $$fd8) + ) ) - ) - (i32.store - (get_local $$vararg_buffer3) - (get_local $$4) - ) - (set_local $$vararg_ptr6 - (i32.add + (i32.store (get_local $$vararg_buffer3) - (i32.const 4) + (get_local $$4) ) - ) - (i32.store - (get_local $$vararg_ptr6) - (get_local $$iov$0) - ) - (set_local $$vararg_ptr7 - (i32.add - (get_local $$vararg_buffer3) - (i32.const 8) + (set_local $$vararg_ptr6 + (i32.add + (get_local $$vararg_buffer3) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$vararg_ptr7) - (get_local $$iovcnt$0) - ) - (set_local $$call9 - (call_import $___syscall146 - (i32.const 146) - (get_local $$vararg_buffer3) + (i32.store + (get_local $$vararg_ptr6) + (get_local $$iov$0) ) - ) - (set_local $$call10 - (call $___syscall_ret - (get_local $$call9) + (set_local $$vararg_ptr7 + (i32.add + (get_local $$vararg_buffer3) + (i32.const 8) + ) ) - ) - (set_local $$cnt$0 - (get_local $$call10) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 5) - (get_local $$f) - ) - (set_local $$3 - (i32.load - (get_local $$fd8) + (i32.store + (get_local $$vararg_ptr7) + (get_local $$iovcnt$0) ) - ) - (i32.store - (get_local $$vararg_buffer) - (get_local $$3) - ) - (set_local $$vararg_ptr1 - (i32.add - (get_local $$vararg_buffer) - (i32.const 4) + (set_local $$call9 + (call_import $___syscall146 + (i32.const 146) + (get_local $$vararg_buffer3) + ) ) - ) - (i32.store - (get_local $$vararg_ptr1) - (get_local $$iov$0) - ) - (set_local $$vararg_ptr2 - (i32.add - (get_local $$vararg_buffer) - (i32.const 8) + (set_local $$call10 + (call $___syscall_ret + (get_local $$call9) + ) + ) + (set_local $$cnt$0 + (get_local $$call10) ) ) - (i32.store - (get_local $$vararg_ptr2) - (get_local $$iovcnt$0) - ) - (set_local $$call - (call_import $___syscall146 - (i32.const 146) + (block + (call_import $_pthread_cleanup_push + (i32.const 5) + (get_local $$f) + ) + (set_local $$3 + (i32.load + (get_local $$fd8) + ) + ) + (i32.store (get_local $$vararg_buffer) + (get_local $$3) ) - ) - (set_local $$call7 - (call $___syscall_ret - (get_local $$call) + (set_local $$vararg_ptr1 + (i32.add + (get_local $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (get_local $$vararg_ptr1) + (get_local $$iov$0) + ) + (set_local $$vararg_ptr2 + (i32.add + (get_local $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (get_local $$vararg_ptr2) + (get_local $$iovcnt$0) + ) + (set_local $$call + (call_import $___syscall146 + (i32.const 146) + (get_local $$vararg_buffer) + ) + ) + (set_local $$call7 + (call $___syscall_ret + (get_local $$call) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (set_local $$cnt$0 + (get_local $$call7) ) ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (set_local $$cnt$0 - (get_local $$call7) - ) - ) - ) - (set_local $$cmp - (i32.eq - (get_local $$rem$0) - (get_local $$cnt$0) - ) - ) - (if - (get_local $$cmp) - (block - (set_local $label - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (set_local $$cmp17 - (i32.lt_s - (get_local $$cnt$0) - (i32.const 0) ) - ) - (if - (get_local $$cmp17) - (block - (set_local $$iov$0$lcssa57 - (get_local $$iov$0) - ) - (set_local $$iovcnt$0$lcssa58 - (get_local $$iovcnt$0) - ) - (set_local $label - (i32.const 8) + (set_local $$cmp + (i32.eq + (get_local $$rem$0) + (get_local $$cnt$0) ) - (br $while-out$0) - ) - ) - (set_local $$sub26 - (i32.sub - (get_local $$rem$0) - (get_local $$cnt$0) - ) - ) - (set_local $$iov_len28 - (i32.add - (get_local $$iov$0) - (i32.const 4) - ) - ) - (set_local $$10 - (i32.load - (get_local $$iov_len28) - ) - ) - (set_local $$cmp29 - (i32.gt_u - (get_local $$cnt$0) - (get_local $$10) ) - ) - (if - (get_local $$cmp29) - (block - (set_local $$11 - (i32.load - (get_local $$buf31) + (if + (get_local $$cmp) + (block + (set_local $label + (i32.const 6) ) + (br $while-out$0) ) - (i32.store - (get_local $$wbase) - (get_local $$11) - ) - (i32.store - (get_local $$wpos) - (get_local $$11) - ) - (set_local $$sub36 - (i32.sub - (get_local $$cnt$0) - (get_local $$10) - ) + ) + (set_local $$cmp17 + (i32.lt_s + (get_local $$cnt$0) + (i32.const 0) ) - (set_local $$incdec$ptr - (i32.add + ) + (if + (get_local $$cmp17) + (block + (set_local $$iov$0$lcssa57 (get_local $$iov$0) - (i32.const 8) ) - ) - (set_local $$dec - (i32.add + (set_local $$iovcnt$0$lcssa58 (get_local $$iovcnt$0) - (i32.const -1) - ) - ) - (set_local $$iov_len50$phi$trans$insert - (i32.add - (get_local $$iov$0) - (i32.const 12) ) - ) - (set_local $$$pre - (i32.load - (get_local $$iov_len50$phi$trans$insert) + (set_local $label + (i32.const 8) ) + (br $while-out$0) ) - (set_local $$14 - (get_local $$$pre) - ) - (set_local $$cnt$1 - (get_local $$sub36) + ) + (set_local $$sub26 + (i32.sub + (get_local $$rem$0) + (get_local $$cnt$0) ) - (set_local $$iov$1 - (get_local $$incdec$ptr) + ) + (set_local $$iov_len28 + (i32.add + (get_local $$iov$0) + (i32.const 4) ) - (set_local $$iovcnt$1 - (get_local $$dec) + ) + (set_local $$10 + (i32.load + (get_local $$iov_len28) ) ) - (block - (set_local $$cmp38 - (i32.eq - (get_local $$iovcnt$0) - (i32.const 2) - ) + (set_local $$cmp29 + (i32.gt_u + (get_local $$cnt$0) + (get_local $$10) ) - (if - (get_local $$cmp38) - (block - (set_local $$12 - (i32.load - (get_local $$wbase) - ) - ) - (set_local $$add$ptr41 - (i32.add - (get_local $$12) - (get_local $$cnt$0) - ) - ) - (i32.store - (get_local $$wbase) - (get_local $$add$ptr41) - ) - (set_local $$14 - (get_local $$10) + ) + (if + (get_local $$cmp29) + (block + (set_local $$11 + (i32.load + (get_local $$buf31) ) - (set_local $$cnt$1 + ) + (i32.store + (get_local $$wbase) + (get_local $$11) + ) + (i32.store + (get_local $$wpos) + (get_local $$11) + ) + (set_local $$sub36 + (i32.sub (get_local $$cnt$0) + (get_local $$10) ) - (set_local $$iov$1 + ) + (set_local $$incdec$ptr + (i32.add (get_local $$iov$0) - ) - (set_local $$iovcnt$1 - (i32.const 2) + (i32.const 8) ) ) - (block - (set_local $$14 - (get_local $$10) - ) - (set_local $$cnt$1 - (get_local $$cnt$0) + (set_local $$dec + (i32.add + (get_local $$iovcnt$0) + (i32.const -1) ) - (set_local $$iov$1 + ) + (set_local $$iov_len50$phi$trans$insert + (i32.add (get_local $$iov$0) + (i32.const 12) + ) + ) + (set_local $$$pre + (i32.load + (get_local $$iov_len50$phi$trans$insert) ) - (set_local $$iovcnt$1 + ) + (set_local $$14 + (get_local $$$pre) + ) + (set_local $$cnt$1 + (get_local $$sub36) + ) + (set_local $$iov$1 + (get_local $$incdec$ptr) + ) + (set_local $$iovcnt$1 + (get_local $$dec) + ) + ) + (block + (set_local $$cmp38 + (i32.eq (get_local $$iovcnt$0) + (i32.const 2) + ) + ) + (if + (get_local $$cmp38) + (block + (set_local $$12 + (i32.load + (get_local $$wbase) + ) + ) + (set_local $$add$ptr41 + (i32.add + (get_local $$12) + (get_local $$cnt$0) + ) + ) + (i32.store + (get_local $$wbase) + (get_local $$add$ptr41) + ) + (set_local $$14 + (get_local $$10) + ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) + (set_local $$iov$1 + (get_local $$iov$0) + ) + (set_local $$iovcnt$1 + (i32.const 2) + ) + ) + (block + (set_local $$14 + (get_local $$10) + ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) + (set_local $$iov$1 + (get_local $$iov$0) + ) + (set_local $$iovcnt$1 + (get_local $$iovcnt$0) + ) ) ) ) ) - ) - (set_local $$13 - (i32.load + (set_local $$13 + (i32.load + (get_local $$iov$1) + ) + ) + (set_local $$add$ptr46 + (i32.add + (get_local $$13) + (get_local $$cnt$1) + ) + ) + (i32.store (get_local $$iov$1) + (get_local $$add$ptr46) ) - ) - (set_local $$add$ptr46 - (i32.add - (get_local $$13) - (get_local $$cnt$1) + (set_local $$iov_len50 + (i32.add + (get_local $$iov$1) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$iov$1) - (get_local $$add$ptr46) - ) - (set_local $$iov_len50 - (i32.add + (set_local $$sub51 + (i32.sub + (get_local $$14) + (get_local $$cnt$1) + ) + ) + (i32.store + (get_local $$iov_len50) + (get_local $$sub51) + ) + (set_local $$iov$0 (get_local $$iov$1) - (i32.const 4) ) - ) - (set_local $$sub51 - (i32.sub - (get_local $$14) - (get_local $$cnt$1) + (set_local $$iovcnt$0 + (get_local $$iovcnt$1) ) + (set_local $$rem$0 + (get_local $$sub26) + ) + (br $while-in$1) ) - (i32.store - (get_local $$iov_len50) - (get_local $$sub51) - ) - (set_local $$iov$0 - (get_local $$iov$1) - ) - (set_local $$iovcnt$0 - (get_local $$iovcnt$1) - ) - (set_local $$rem$0 - (get_local $$sub26) - ) - (br $while-in$1) ) (if (i32.eq @@ -2407,21 +2417,23 @@ (i32.const 40) ) ) - (loop $do-out$0 $do-in$1 - (i32.store - (get_local $dest) - (i32.const 0) - ) - (set_local $dest - (i32.add + (loop $do-in$1 + (block $do-out$0 + (i32.store (get_local $dest) - (i32.const 4) + (i32.const 0) ) - ) - (br_if $do-in$1 - (i32.lt_s - (get_local $dest) - (get_local $stop) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 4) + ) + ) + (br_if $do-in$1 + (i32.lt_s + (get_local $dest) + (get_local $stop) + ) ) ) ) @@ -2987,73 +2999,75 @@ (set_local $$i$0 (get_local $$l) ) - (loop $while-out$2 $while-in$3 - (set_local $$tobool9 - (i32.eq - (get_local $$i$0) - (i32.const 0) - ) - ) - (if - (get_local $$tobool9) - (block - (set_local $$9 - (get_local $$4) - ) - (set_local $$i$1 + (loop $while-in$3 + (block $while-out$2 + (set_local $$tobool9 + (i32.eq + (get_local $$i$0) (i32.const 0) ) - (set_local $$l$addr$0 - (get_local $$l) - ) - (set_local $$s$addr$0 - (get_local $$s) + ) + (if + (get_local $$tobool9) + (block + (set_local $$9 + (get_local $$4) + ) + (set_local $$i$1 + (i32.const 0) + ) + (set_local $$l$addr$0 + (get_local $$l) + ) + (set_local $$s$addr$0 + (get_local $$s) + ) + (br $label$break$L10) ) - (br $label$break$L10) ) - ) - (set_local $$sub - (i32.add - (get_local $$i$0) - (i32.const -1) + (set_local $$sub + (i32.add + (get_local $$i$0) + (i32.const -1) + ) ) - ) - (set_local $$arrayidx - (i32.add - (get_local $$s) - (get_local $$sub) + (set_local $$arrayidx + (i32.add + (get_local $$s) + (get_local $$sub) + ) ) - ) - (set_local $$7 - (i32.load8_s - (get_local $$arrayidx) + (set_local $$7 + (i32.load8_s + (get_local $$arrayidx) + ) ) - ) - (set_local $$cmp11 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$7) + (set_local $$cmp11 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) ) - (i32.const 10) ) - ) - (if - (get_local $$cmp11) - (block - (set_local $$i$0$lcssa36 - (get_local $$i$0) + (if + (get_local $$cmp11) + (block + (set_local $$i$0$lcssa36 + (get_local $$i$0) + ) + (br $while-out$2) + ) + (set_local $$i$0 + (get_local $$sub) ) - (br $while-out$2) - ) - (set_local $$i$0 - (get_local $$sub) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$write15 (i32.add @@ -3963,111 +3977,113 @@ (set_local $$s$044 (get_local $$src) ) - (loop $while-out$1 $while-in$2 - (set_local $$2 - (i32.load8_s - (get_local $$s$044) + (loop $while-in$2 + (block $while-out$1 + (set_local $$2 + (i32.load8_s + (get_local $$s$044) + ) ) - ) - (set_local $$cmp - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$2) + (set_local $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$2) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $$1) + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) ) - ) - (if - (get_local $$cmp) - (block - (set_local $$n$addr$0$lcssa61 - (get_local $$n$addr$043) + (if + (get_local $$cmp) + (block + (set_local $$n$addr$0$lcssa61 + (get_local $$n$addr$043) + ) + (set_local $$s$0$lcssa60 + (get_local $$s$044) + ) + (set_local $label + (i32.const 6) + ) + (br $label$break$L1) ) - (set_local $$s$0$lcssa60 + ) + (set_local $$incdec$ptr + (i32.add (get_local $$s$044) + (i32.const 1) ) - (set_local $label - (i32.const 6) - ) - (br $label$break$L1) ) - ) - (set_local $$incdec$ptr - (i32.add - (get_local $$s$044) - (i32.const 1) + (set_local $$dec + (i32.add + (get_local $$n$addr$043) + (i32.const -1) + ) ) - ) - (set_local $$dec - (i32.add - (get_local $$n$addr$043) - (i32.const -1) + (set_local $$3 + (get_local $$incdec$ptr) ) - ) - (set_local $$3 - (get_local $$incdec$ptr) - ) - (set_local $$and - (i32.and - (get_local $$3) - (i32.const 3) + (set_local $$and + (i32.and + (get_local $$3) + (i32.const 3) + ) ) - ) - (set_local $$tobool - (i32.ne - (get_local $$and) - (i32.const 0) + (set_local $$tobool + (i32.ne + (get_local $$and) + (i32.const 0) + ) ) - ) - (set_local $$tobool2 - (i32.ne - (get_local $$dec) - (i32.const 0) - ) - ) - (set_local $$or$cond - (i32.and - (get_local $$tobool2) - (get_local $$tobool) - ) - ) - (if - (get_local $$or$cond) - (block - (set_local $$n$addr$043 + (set_local $$tobool2 + (i32.ne (get_local $$dec) - ) - (set_local $$s$044 - (get_local $$incdec$ptr) + (i32.const 0) ) ) - (block - (set_local $$n$addr$0$lcssa - (get_local $$dec) - ) - (set_local $$s$0$lcssa - (get_local $$incdec$ptr) - ) - (set_local $$tobool2$lcssa + (set_local $$or$cond + (i32.and (get_local $$tobool2) + (get_local $$tobool) ) - (set_local $label - (i32.const 5) + ) + (if + (get_local $$or$cond) + (block + (set_local $$n$addr$043 + (get_local $$dec) + ) + (set_local $$s$044 + (get_local $$incdec$ptr) + ) + ) + (block + (set_local $$n$addr$0$lcssa + (get_local $$dec) + ) + (set_local $$s$0$lcssa + (get_local $$incdec$ptr) + ) + (set_local $$tobool2$lcssa + (get_local $$tobool2) + ) + (set_local $label + (i32.const 5) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -4183,104 +4199,106 @@ (set_local $$w$034 (get_local $$s$0$lcssa60) ) - (loop $while-out$5 $while-in$6 - (set_local $$6 - (i32.load - (get_local $$w$034) - ) - ) - (set_local $$xor - (i32.xor - (get_local $$6) - (get_local $$mul) + (loop $while-in$6 + (block $while-out$5 + (set_local $$6 + (i32.load + (get_local $$w$034) + ) ) - ) - (set_local $$sub - (i32.add - (get_local $$xor) - (i32.const -16843009) + (set_local $$xor + (i32.xor + (get_local $$6) + (get_local $$mul) + ) ) - ) - (set_local $$neg - (i32.and - (get_local $$xor) - (i32.const -2139062144) + (set_local $$sub + (i32.add + (get_local $$xor) + (i32.const -16843009) + ) ) - ) - (set_local $$and15 - (i32.xor - (get_local $$neg) - (i32.const -2139062144) + (set_local $$neg + (i32.and + (get_local $$xor) + (i32.const -2139062144) + ) ) - ) - (set_local $$and16 - (i32.and - (get_local $$and15) - (get_local $$sub) + (set_local $$and15 + (i32.xor + (get_local $$neg) + (i32.const -2139062144) + ) ) - ) - (set_local $$lnot - (i32.eq - (get_local $$and16) - (i32.const 0) + (set_local $$and16 + (i32.and + (get_local $$and15) + (get_local $$sub) + ) ) - ) - (if - (i32.eqz - (get_local $$lnot) + (set_local $$lnot + (i32.eq + (get_local $$and16) + (i32.const 0) + ) ) - (block - (set_local $$n$addr$133$lcssa - (get_local $$n$addr$133) + (if + (i32.eqz + (get_local $$lnot) ) - (set_local $$w$034$lcssa - (get_local $$w$034) + (block + (set_local $$n$addr$133$lcssa + (get_local $$n$addr$133) + ) + (set_local $$w$034$lcssa + (get_local $$w$034) + ) + (br $while-out$5) ) - (br $while-out$5) - ) - ) - (set_local $$incdec$ptr21 - (i32.add - (get_local $$w$034) - (i32.const 4) - ) - ) - (set_local $$sub22 - (i32.add - (get_local $$n$addr$133) - (i32.const -4) - ) - ) - (set_local $$cmp11 - (i32.gt_u - (get_local $$sub22) - (i32.const 3) ) - ) - (if - (get_local $$cmp11) - (block - (set_local $$n$addr$133 - (get_local $$sub22) + (set_local $$incdec$ptr21 + (i32.add + (get_local $$w$034) + (i32.const 4) ) - (set_local $$w$034 - (get_local $$incdec$ptr21) + ) + (set_local $$sub22 + (i32.add + (get_local $$n$addr$133) + (i32.const -4) ) ) - (block - (set_local $$n$addr$1$lcssa + (set_local $$cmp11 + (i32.gt_u (get_local $$sub22) + (i32.const 3) ) - (set_local $$w$0$lcssa - (get_local $$incdec$ptr21) + ) + (if + (get_local $$cmp11) + (block + (set_local $$n$addr$133 + (get_local $$sub22) + ) + (set_local $$w$034 + (get_local $$incdec$ptr21) + ) ) - (set_local $label - (i32.const 11) + (block + (set_local $$n$addr$1$lcssa + (get_local $$sub22) + ) + (set_local $$w$0$lcssa + (get_local $$incdec$ptr21) + ) + (set_local $label + (i32.const 11) + ) + (br $label$break$L11) ) - (br $label$break$L11) ) + (br $while-in$6) ) - (br $while-in$6) ) (set_local $$n$addr$227 (get_local $$n$addr$133$lcssa) @@ -4336,81 +4354,83 @@ ) ) ) - (loop $while-out$7 $while-in$8 - (set_local $$7 - (i32.load8_s - (get_local $$s$128) + (loop $while-in$8 + (block $while-out$7 + (set_local $$7 + (i32.load8_s + (get_local $$s$128) + ) ) - ) - (set_local $$cmp28 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$7) + (set_local $$cmp28 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $$5) + (i32.shr_s + (i32.shl + (get_local $$5) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) ) - ) - (if - (get_local $$cmp28) - (block - (set_local $$n$addr$3 - (get_local $$n$addr$227) + (if + (get_local $$cmp28) + (block + (set_local $$n$addr$3 + (get_local $$n$addr$227) + ) + (set_local $$s$2 + (get_local $$s$128) + ) + (br $label$break$L8) ) - (set_local $$s$2 + ) + (set_local $$incdec$ptr33 + (i32.add (get_local $$s$128) + (i32.const 1) ) - (br $label$break$L8) - ) - ) - (set_local $$incdec$ptr33 - (i32.add - (get_local $$s$128) - (i32.const 1) - ) - ) - (set_local $$dec34 - (i32.add - (get_local $$n$addr$227) - (i32.const -1) ) - ) - (set_local $$tobool25 - (i32.eq - (get_local $$dec34) - (i32.const 0) + (set_local $$dec34 + (i32.add + (get_local $$n$addr$227) + (i32.const -1) + ) ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$n$addr$3 + (set_local $$tobool25 + (i32.eq + (get_local $$dec34) (i32.const 0) ) - (set_local $$s$2 - (get_local $$incdec$ptr33) - ) - (br $while-out$7) ) - (block - (set_local $$n$addr$227 - (get_local $$dec34) + (if + (get_local $$tobool25) + (block + (set_local $$n$addr$3 + (i32.const 0) + ) + (set_local $$s$2 + (get_local $$incdec$ptr33) + ) + (br $while-out$7) ) - (set_local $$s$128 - (get_local $$incdec$ptr33) + (block + (set_local $$n$addr$227 + (get_local $$dec34) + ) + (set_local $$s$128 + (get_local $$incdec$ptr33) + ) ) ) + (br $while-in$8) ) - (br $while-in$8) ) ) ) @@ -5966,1194 +5986,1187 @@ (set_local $$l10n$0 (i32.const 0) ) - (loop $label$break$L1 $label$continue$L1 - (set_local $$cmp - (i32.gt_s - (get_local $$cnt$0) - (i32.const -1) + (loop $label$continue$L1 + (block $label$break$L1 + (set_local $$cmp + (i32.gt_s + (get_local $$cnt$0) + (i32.const -1) + ) ) - ) - (block $do-once$0 - (if - (get_local $$cmp) - (block - (set_local $$sub - (i32.sub - (i32.const 2147483647) - (get_local $$cnt$0) - ) - ) - (set_local $$cmp1 - (i32.gt_s - (get_local $$l$0) - (get_local $$sub) - ) - ) - (if - (get_local $$cmp1) - (block - (set_local $$call - (call $___errno_location) - ) - (i32.store - (get_local $$call) - (i32.const 75) + (block $do-once$0 + (if + (get_local $$cmp) + (block + (set_local $$sub + (i32.sub + (i32.const 2147483647) + (get_local $$cnt$0) ) - (set_local $$cnt$1 - (i32.const -1) + ) + (set_local $$cmp1 + (i32.gt_s + (get_local $$l$0) + (get_local $$sub) ) - (br $do-once$0) ) - (block - (set_local $$add - (i32.add - (get_local $$l$0) - (get_local $$cnt$0) + (if + (get_local $$cmp1) + (block + (set_local $$call + (call $___errno_location) + ) + (i32.store + (get_local $$call) + (i32.const 75) + ) + (set_local $$cnt$1 + (i32.const -1) ) + (br $do-once$0) ) - (set_local $$cnt$1 - (get_local $$add) + (block + (set_local $$add + (i32.add + (get_local $$l$0) + (get_local $$cnt$0) + ) + ) + (set_local $$cnt$1 + (get_local $$add) + ) + (br $do-once$0) ) - (br $do-once$0) ) ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) ) - (set_local $$cnt$1 - (get_local $$cnt$0) + ) + (set_local $$0 + (i32.load8_s + (get_local $$incdec$ptr169275) ) ) - ) - (set_local $$0 - (i32.load8_s - (get_local $$incdec$ptr169275) - ) - ) - (set_local $$tobool - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$0) + (set_local $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$0) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 0) ) - (i32.const 0) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$cnt$1$lcssa - (get_local $$cnt$1) - ) - (set_local $$l10n$0$lcssa - (get_local $$l10n$0) + (if + (get_local $$tobool) + (block + (set_local $$cnt$1$lcssa + (get_local $$cnt$1) + ) + (set_local $$l10n$0$lcssa + (get_local $$l10n$0) + ) + (set_local $label + (i32.const 242) + ) + (br $label$break$L1) ) - (set_local $label - (i32.const 242) + (block + (set_local $$1 + (get_local $$0) + ) + (set_local $$incdec$ptr169274 + (get_local $$incdec$ptr169275) + ) ) - (br $label$break$L1) ) - (block - (set_local $$1 - (get_local $$0) - ) - (set_local $$incdec$ptr169274 - (get_local $$incdec$ptr169275) + (loop $label$continue$L9 + (block $label$break$L9 + (block $switch$2 + (block $switch-default$5 + (block $switch-default$5 + (block $switch-case$4 + (block $switch-case$3 + (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 + (i32.sub + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (set_local $$incdec$ptr169276301 + (get_local $$incdec$ptr169274) + ) + (set_local $$z$0302 + (get_local $$incdec$ptr169274) + ) + (set_local $label + (i32.const 9) + ) + (br $label$break$L9) + (br $switch$2) + ) + ) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$incdec$ptr169274) + ) + (set_local $$z$0$lcssa + (get_local $$incdec$ptr169274) + ) + (br $label$break$L9) + (br $switch$2) + ) + ) + (nop) + ) + ) + (set_local $$incdec$ptr + (i32.add + (get_local $$incdec$ptr169274) + (i32.const 1) + ) + ) + (set_local $$$pre + (i32.load8_s + (get_local $$incdec$ptr) + ) + ) + (set_local $$1 + (get_local $$$pre) + ) + (set_local $$incdec$ptr169274 + (get_local $$incdec$ptr) + ) + (br $label$continue$L9) ) ) - ) - (loop $label$break$L9 $label$continue$L9 - (block $switch$2 - (block $switch-default$5 - (block $switch-default$5 - (block $switch-case$4 - (block $switch-case$3 - (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 - (i32.sub - (i32.shr_s - (i32.shl - (get_local $$1) - (i32.const 24) - ) + (block $label$break$L12 + (if + (i32.eq + (get_local $label) + (i32.const 9) + ) + (loop $while-in$8 + (block $while-out$7 + (set_local $label + (i32.const 0) + ) + (set_local $$arrayidx16 + (i32.add + (get_local $$incdec$ptr169276301) + (i32.const 1) + ) + ) + (set_local $$2 + (i32.load8_s + (get_local $$arrayidx16) + ) + ) + (set_local $$cmp18 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$2) (i32.const 24) ) - (i32.const 0) + (i32.const 24) ) + (i32.const 37) ) ) - (block - (set_local $$incdec$ptr169276301 - (get_local $$incdec$ptr169274) + (if + (i32.eqz + (get_local $$cmp18) ) - (set_local $$z$0302 - (get_local $$incdec$ptr169274) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$incdec$ptr169276301) + ) + (set_local $$z$0$lcssa + (get_local $$z$0302) + ) + (br $label$break$L12) ) - (set_local $label - (i32.const 9) + ) + (set_local $$incdec$ptr23 + (i32.add + (get_local $$z$0302) + (i32.const 1) ) - (br $label$break$L9) - (br $switch$2) ) - ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$incdec$ptr169274) + (set_local $$add$ptr + (i32.add + (get_local $$incdec$ptr169276301) + (i32.const 2) + ) + ) + (set_local $$3 + (i32.load8_s + (get_local $$add$ptr) + ) + ) + (set_local $$cmp13 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 37) + ) ) - (set_local $$z$0$lcssa - (get_local $$incdec$ptr169274) + (if + (get_local $$cmp13) + (block + (set_local $$incdec$ptr169276301 + (get_local $$add$ptr) + ) + (set_local $$z$0302 + (get_local $$incdec$ptr23) + ) + (set_local $label + (i32.const 9) + ) + ) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$add$ptr) + ) + (set_local $$z$0$lcssa + (get_local $$incdec$ptr23) + ) + (br $while-out$7) + ) ) - (br $label$break$L9) - (br $switch$2) + (br $while-in$8) + ) + ) + ) + ) + (set_local $$sub$ptr$lhs$cast + (get_local $$z$0$lcssa) + ) + (set_local $$sub$ptr$rhs$cast + (get_local $$incdec$ptr169275) + ) + (set_local $$sub$ptr$sub + (i32.sub + (get_local $$sub$ptr$lhs$cast) + (get_local $$sub$ptr$rhs$cast) + ) + ) + (if + (get_local $$tobool25) + (block + (set_local $$4 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i + (i32.and + (get_local $$4) + (i32.const 32) + ) + ) + (set_local $$tobool$i + (i32.eq + (get_local $$and$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i) + (call $___fwritex + (get_local $$incdec$ptr169275) + (get_local $$sub$ptr$sub) + (get_local $$f) ) ) - (nop) ) ) - (set_local $$incdec$ptr + (set_local $$tobool28 + (i32.eq + (get_local $$z$0$lcssa) + (get_local $$incdec$ptr169275) + ) + ) + (if + (i32.eqz + (get_local $$tobool28) + ) + (block + (set_local $$l10n$0$phi + (get_local $$l10n$0) + ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169276$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$0$phi) + ) + (br $label$continue$L1) + ) + ) + (set_local $$arrayidx31 (i32.add - (get_local $$incdec$ptr169274) + (get_local $$incdec$ptr169276$lcssa) (i32.const 1) ) ) - (set_local $$$pre + (set_local $$5 (i32.load8_s - (get_local $$incdec$ptr) + (get_local $$arrayidx31) ) ) - (set_local $$1 - (get_local $$$pre) + (set_local $$conv32 + (i32.shr_s + (i32.shl + (get_local $$5) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$incdec$ptr169274 - (get_local $$incdec$ptr) + (set_local $$isdigittmp + (i32.add + (get_local $$conv32) + (i32.const -48) + ) ) - (br $label$continue$L9) - ) - (block $label$break$L12 - (if - (i32.eq - (get_local $label) - (i32.const 9) + (set_local $$isdigit + (i32.lt_u + (get_local $$isdigittmp) + (i32.const 10) ) - (loop $while-out$7 $while-in$8 - (set_local $label - (i32.const 0) - ) - (set_local $$arrayidx16 + ) + (if + (get_local $$isdigit) + (block + (set_local $$arrayidx35 (i32.add - (get_local $$incdec$ptr169276301) - (i32.const 1) + (get_local $$incdec$ptr169276$lcssa) + (i32.const 2) ) ) - (set_local $$2 + (set_local $$6 (i32.load8_s - (get_local $$arrayidx16) + (get_local $$arrayidx35) ) ) - (set_local $$cmp18 + (set_local $$cmp37 (i32.eq (i32.shr_s (i32.shl - (get_local $$2) + (get_local $$6) (i32.const 24) ) (i32.const 24) ) - (i32.const 37) + (i32.const 36) ) ) - (if - (i32.eqz - (get_local $$cmp18) + (set_local $$add$ptr43 + (i32.add + (get_local $$incdec$ptr169276$lcssa) + (i32.const 3) ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$incdec$ptr169276301) - ) - (set_local $$z$0$lcssa - (get_local $$z$0302) - ) - (br $label$break$L12) + ) + (set_local $$add$ptr43$arrayidx31 + (if + (get_local $$cmp37) + (get_local $$add$ptr43) + (get_local $$arrayidx31) ) ) - (set_local $$incdec$ptr23 - (i32.add - (get_local $$z$0302) + (set_local $$$l10n$0 + (if + (get_local $$cmp37) (i32.const 1) + (get_local $$l10n$0) ) ) - (set_local $$add$ptr - (i32.add - (get_local $$incdec$ptr169276301) - (i32.const 2) + (set_local $$isdigittmp$ + (if + (get_local $$cmp37) + (get_local $$isdigittmp) + (i32.const -1) ) ) - (set_local $$3 + (set_local $$$pre357 (i32.load8_s - (get_local $$add$ptr) + (get_local $$add$ptr43$arrayidx31) ) ) - (set_local $$cmp13 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$3) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 37) - ) - ) - (if - (get_local $$cmp13) - (block - (set_local $$incdec$ptr169276301 - (get_local $$add$ptr) - ) - (set_local $$z$0302 - (get_local $$incdec$ptr23) - ) - (set_local $label - (i32.const 9) - ) - ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$add$ptr) - ) - (set_local $$z$0$lcssa - (get_local $$incdec$ptr23) - ) - (br $while-out$7) - ) - ) - (br $while-in$8) - ) - ) - ) - (set_local $$sub$ptr$lhs$cast - (get_local $$z$0$lcssa) - ) - (set_local $$sub$ptr$rhs$cast - (get_local $$incdec$ptr169275) - ) - (set_local $$sub$ptr$sub - (i32.sub - (get_local $$sub$ptr$lhs$cast) - (get_local $$sub$ptr$rhs$cast) - ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$4 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i - (i32.and - (get_local $$4) - (i32.const 32) - ) - ) - (set_local $$tobool$i - (i32.eq - (get_local $$and$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i) - (call $___fwritex - (get_local $$incdec$ptr169275) - (get_local $$sub$ptr$sub) - (get_local $$f) + (set_local $$7 + (get_local $$$pre357) ) - ) - ) - ) - (set_local $$tobool28 - (i32.eq - (get_local $$z$0$lcssa) - (get_local $$incdec$ptr169275) - ) - ) - (if - (i32.eqz - (get_local $$tobool28) - ) - (block - (set_local $$l10n$0$phi - (get_local $$l10n$0) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169276$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$0$phi) - ) - (br $label$continue$L1) - ) - ) - (set_local $$arrayidx31 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 1) - ) - ) - (set_local $$5 - (i32.load8_s - (get_local $$arrayidx31) - ) - ) - (set_local $$conv32 - (i32.shr_s - (i32.shl - (get_local $$5) - (i32.const 24) - ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp - (i32.add - (get_local $$conv32) - (i32.const -48) - ) - ) - (set_local $$isdigit - (i32.lt_u - (get_local $$isdigittmp) - (i32.const 10) - ) - ) - (if - (get_local $$isdigit) - (block - (set_local $$arrayidx35 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 2) + (set_local $$argpos$0 + (get_local $$isdigittmp$) ) - ) - (set_local $$6 - (i32.load8_s - (get_local $$arrayidx35) + (set_local $$l10n$1 + (get_local $$$l10n$0) ) - ) - (set_local $$cmp37 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$6) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 36) + (set_local $$storemerge + (get_local $$add$ptr43$arrayidx31) ) ) - (set_local $$add$ptr43 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 3) + (block + (set_local $$7 + (get_local $$5) ) - ) - (set_local $$add$ptr43$arrayidx31 - (if - (get_local $$cmp37) - (get_local $$add$ptr43) - (get_local $$arrayidx31) + (set_local $$argpos$0 + (i32.const -1) ) - ) - (set_local $$$l10n$0 - (if - (get_local $$cmp37) - (i32.const 1) + (set_local $$l10n$1 (get_local $$l10n$0) ) - ) - (set_local $$isdigittmp$ - (if - (get_local $$cmp37) - (get_local $$isdigittmp) - (i32.const -1) + (set_local $$storemerge + (get_local $$arrayidx31) ) ) - (set_local $$$pre357 - (i32.load8_s - (get_local $$add$ptr43$arrayidx31) + ) + (set_local $$conv48$307 + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) ) - ) - (set_local $$7 - (get_local $$$pre357) - ) - (set_local $$argpos$0 - (get_local $$isdigittmp$) - ) - (set_local $$l10n$1 - (get_local $$$l10n$0) - ) - (set_local $$storemerge - (get_local $$add$ptr43$arrayidx31) + (i32.const 24) ) ) - (block - (set_local $$7 - (get_local $$5) - ) - (set_local $$argpos$0 - (i32.const -1) - ) - (set_local $$l10n$1 - (get_local $$l10n$0) - ) - (set_local $$storemerge - (get_local $$arrayidx31) + (set_local $$8 + (i32.and + (get_local $$conv48$307) + (i32.const -32) ) ) - ) - (set_local $$conv48$307 - (i32.shr_s - (i32.shl - (get_local $$7) - (i32.const 24) + (set_local $$cmp50$308 + (i32.eq + (get_local $$8) + (i32.const 32) ) - (i32.const 24) - ) - ) - (set_local $$8 - (i32.and - (get_local $$conv48$307) - (i32.const -32) - ) - ) - (set_local $$cmp50$308 - (i32.eq - (get_local $$8) - (i32.const 32) ) - ) - (block $label$break$L25 - (if - (get_local $$cmp50$308) - (block - (set_local $$9 - (get_local $$7) - ) - (set_local $$conv48311 - (get_local $$conv48$307) - ) - (set_local $$fl$0310 - (i32.const 0) - ) - (set_local $$storemerge$186309 - (get_local $$storemerge) - ) - (loop $while-out$10 $while-in$11 - (set_local $$sub54 - (i32.add - (get_local $$conv48311) - (i32.const -32) - ) + (block $label$break$L25 + (if + (get_local $$cmp50$308) + (block + (set_local $$9 + (get_local $$7) ) - (set_local $$shl - (i32.shl - (i32.const 1) - (get_local $$sub54) - ) + (set_local $$conv48311 + (get_local $$conv48$307) ) - (set_local $$and - (i32.and - (get_local $$shl) - (i32.const 75913) - ) + (set_local $$fl$0310 + (i32.const 0) ) - (set_local $$tobool55 - (i32.eq - (get_local $$and) - (i32.const 0) - ) + (set_local $$storemerge$186309 + (get_local $$storemerge) ) - (if - (get_local $$tobool55) - (block - (set_local $$12 - (get_local $$9) + (loop $while-in$11 + (block $while-out$10 + (set_local $$sub54 + (i32.add + (get_local $$conv48311) + (i32.const -32) + ) ) - (set_local $$fl$0284 - (get_local $$fl$0310) + (set_local $$shl + (i32.shl + (i32.const 1) + (get_local $$sub54) + ) ) - (set_local $$storemerge$186282 - (get_local $$storemerge$186309) + (set_local $$and + (i32.and + (get_local $$shl) + (i32.const 75913) + ) ) - (br $label$break$L25) - ) - ) - (set_local $$conv58 - (i32.shr_s - (i32.shl - (get_local $$9) - (i32.const 24) + (set_local $$tobool55 + (i32.eq + (get_local $$and) + (i32.const 0) + ) ) - (i32.const 24) - ) - ) - (set_local $$sub59 - (i32.add - (get_local $$conv58) - (i32.const -32) - ) - ) - (set_local $$shl60 - (i32.shl - (i32.const 1) - (get_local $$sub59) - ) - ) - (set_local $$or - (i32.or - (get_local $$shl60) - (get_local $$fl$0310) - ) - ) - (set_local $$incdec$ptr62 - (i32.add - (get_local $$storemerge$186309) - (i32.const 1) - ) - ) - (set_local $$10 - (i32.load8_s - (get_local $$incdec$ptr62) - ) - ) - (set_local $$conv48 - (i32.shr_s - (i32.shl - (get_local $$10) - (i32.const 24) + (if + (get_local $$tobool55) + (block + (set_local $$12 + (get_local $$9) + ) + (set_local $$fl$0284 + (get_local $$fl$0310) + ) + (set_local $$storemerge$186282 + (get_local $$storemerge$186309) + ) + (br $label$break$L25) + ) ) - (i32.const 24) - ) - ) - (set_local $$11 - (i32.and - (get_local $$conv48) - (i32.const -32) - ) - ) - (set_local $$cmp50 - (i32.eq - (get_local $$11) - (i32.const 32) - ) - ) - (if - (get_local $$cmp50) - (block - (set_local $$9 - (get_local $$10) + (set_local $$conv58 + (i32.shr_s + (i32.shl + (get_local $$9) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$conv48311 - (get_local $$conv48) + (set_local $$sub59 + (i32.add + (get_local $$conv58) + (i32.const -32) + ) ) - (set_local $$fl$0310 - (get_local $$or) + (set_local $$shl60 + (i32.shl + (i32.const 1) + (get_local $$sub59) + ) ) - (set_local $$storemerge$186309 - (get_local $$incdec$ptr62) + (set_local $$or + (i32.or + (get_local $$shl60) + (get_local $$fl$0310) + ) ) - ) - (block - (set_local $$12 - (get_local $$10) + (set_local $$incdec$ptr62 + (i32.add + (get_local $$storemerge$186309) + (i32.const 1) + ) + ) + (set_local $$10 + (i32.load8_s + (get_local $$incdec$ptr62) + ) + ) + (set_local $$conv48 + (i32.shr_s + (i32.shl + (get_local $$10) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$fl$0284 - (get_local $$or) + (set_local $$11 + (i32.and + (get_local $$conv48) + (i32.const -32) + ) + ) + (set_local $$cmp50 + (i32.eq + (get_local $$11) + (i32.const 32) + ) ) - (set_local $$storemerge$186282 - (get_local $$incdec$ptr62) + (if + (get_local $$cmp50) + (block + (set_local $$9 + (get_local $$10) + ) + (set_local $$conv48311 + (get_local $$conv48) + ) + (set_local $$fl$0310 + (get_local $$or) + ) + (set_local $$storemerge$186309 + (get_local $$incdec$ptr62) + ) + ) + (block + (set_local $$12 + (get_local $$10) + ) + (set_local $$fl$0284 + (get_local $$or) + ) + (set_local $$storemerge$186282 + (get_local $$incdec$ptr62) + ) + (br $while-out$10) + ) ) - (br $while-out$10) + (br $while-in$11) ) ) - (br $while-in$11) - ) - ) - (block - (set_local $$12 - (get_local $$7) - ) - (set_local $$fl$0284 - (i32.const 0) ) - (set_local $$storemerge$186282 - (get_local $$storemerge) + (block + (set_local $$12 + (get_local $$7) + ) + (set_local $$fl$0284 + (i32.const 0) + ) + (set_local $$storemerge$186282 + (get_local $$storemerge) + ) ) ) ) - ) - (set_local $$cmp65 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$12) + (set_local $$cmp65 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$12) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 42) ) - (i32.const 42) ) - ) - (block $do-once$12 - (if - (get_local $$cmp65) - (block - (set_local $$arrayidx68 - (i32.add - (get_local $$storemerge$186282) - (i32.const 1) + (block $do-once$12 + (if + (get_local $$cmp65) + (block + (set_local $$arrayidx68 + (i32.add + (get_local $$storemerge$186282) + (i32.const 1) + ) ) - ) - (set_local $$13 - (i32.load8_s - (get_local $$arrayidx68) + (set_local $$13 + (i32.load8_s + (get_local $$arrayidx68) + ) ) - ) - (set_local $$conv69 - (i32.shr_s - (i32.shl - (get_local $$13) + (set_local $$conv69 + (i32.shr_s + (i32.shl + (get_local $$13) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$isdigittmp189 - (i32.add - (get_local $$conv69) - (i32.const -48) + (set_local $$isdigittmp189 + (i32.add + (get_local $$conv69) + (i32.const -48) + ) ) - ) - (set_local $$isdigit190 - (i32.lt_u - (get_local $$isdigittmp189) - (i32.const 10) + (set_local $$isdigit190 + (i32.lt_u + (get_local $$isdigittmp189) + (i32.const 10) + ) ) - ) - (if - (get_local $$isdigit190) - (block - (set_local $$arrayidx73 - (i32.add - (get_local $$storemerge$186282) - (i32.const 2) + (if + (get_local $$isdigit190) + (block + (set_local $$arrayidx73 + (i32.add + (get_local $$storemerge$186282) + (i32.const 2) + ) ) - ) - (set_local $$14 - (i32.load8_s - (get_local $$arrayidx73) + (set_local $$14 + (i32.load8_s + (get_local $$arrayidx73) + ) ) - ) - (set_local $$cmp75 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$14) + (set_local $$cmp75 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$14) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 36) ) - (i32.const 36) ) - ) - (if - (get_local $$cmp75) - (block - (set_local $$arrayidx81 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$isdigittmp189) - (i32.const 2) + (if + (get_local $$cmp75) + (block + (set_local $$arrayidx81 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$isdigittmp189) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx81) - (i32.const 10) - ) - (set_local $$15 - (i32.load8_s - (get_local $$arrayidx68) + (i32.store + (get_local $$arrayidx81) + (i32.const 10) ) - ) - (set_local $$conv83 - (i32.shr_s - (i32.shl - (get_local $$15) + (set_local $$15 + (i32.load8_s + (get_local $$arrayidx68) + ) + ) + (set_local $$conv83 + (i32.shr_s + (i32.shl + (get_local $$15) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$sub84 - (i32.add - (get_local $$conv83) - (i32.const -48) + (set_local $$sub84 + (i32.add + (get_local $$conv83) + (i32.const -48) + ) ) - ) - (set_local $$i86 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$sub84) - (i32.const 3) + (set_local $$i86 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$sub84) + (i32.const 3) + ) ) ) - ) - (set_local $$16 - (get_local $$i86) - ) - (set_local $$17 - (get_local $$16) - ) - (set_local $$18 - (i32.load - (get_local $$17) + (set_local $$16 + (get_local $$i86) ) - ) - (set_local $$19 - (i32.add + (set_local $$17 (get_local $$16) - (i32.const 4) ) - ) - (set_local $$20 - (get_local $$19) - ) - (set_local $$21 - (i32.load - (get_local $$20) + (set_local $$18 + (i32.load + (get_local $$17) + ) ) - ) - (set_local $$add$ptr88 - (i32.add - (get_local $$storemerge$186282) - (i32.const 3) + (set_local $$19 + (i32.add + (get_local $$16) + (i32.const 4) + ) + ) + (set_local $$20 + (get_local $$19) + ) + (set_local $$21 + (i32.load + (get_local $$20) + ) + ) + (set_local $$add$ptr88 + (i32.add + (get_local $$storemerge$186282) + (i32.const 3) + ) + ) + (set_local $$l10n$2 + (i32.const 1) + ) + (set_local $$storemerge$191 + (get_local $$add$ptr88) + ) + (set_local $$w$0 + (get_local $$18) ) ) - (set_local $$l10n$2 - (i32.const 1) - ) - (set_local $$storemerge$191 - (get_local $$add$ptr88) - ) - (set_local $$w$0 - (get_local $$18) + (set_local $label + (i32.const 24) ) ) - (set_local $label - (i32.const 24) - ) ) - ) - (set_local $label - (i32.const 24) - ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 24) - ) - (block (set_local $label - (i32.const 0) + (i32.const 24) ) - (set_local $$tobool90 - (i32.eq - (get_local $$l10n$1) - (i32.const 0) - ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 24) ) - (if - (i32.eqz - (get_local $$tobool90) + (block + (set_local $label + (i32.const 0) ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$tobool90 + (i32.eq + (get_local $$l10n$1) + (i32.const 0) ) - (br $label$break$L1) ) - ) - (if - (i32.eqz - (get_local $$tobool25) + (if + (i32.eqz + (get_local $$tobool90) + ) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) + (if + (i32.eqz + (get_local $$tobool25) + ) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$arrayidx68) + ) + (set_local $$l10n$3 + (i32.const 0) + ) + (set_local $$w$1 + (i32.const 0) + ) + (br $do-once$12) ) - (set_local $$incdec$ptr169269 - (get_local $$arrayidx68) + ) + (set_local $$arglist_current + (i32.load + (get_local $$ap) ) - (set_local $$l10n$3 + ) + (set_local $$22 + (get_local $$arglist_current) + ) + (set_local $$23 + (i32.add (i32.const 0) + (i32.const 4) + ) + ) + (set_local $$expanded4 + (get_local $$23) + ) + (set_local $$expanded + (i32.sub + (get_local $$expanded4) + (i32.const 1) + ) + ) + (set_local $$24 + (i32.add + (get_local $$22) + (get_local $$expanded) ) - (set_local $$w$1 + ) + (set_local $$25 + (i32.add (i32.const 0) + (i32.const 4) ) - (br $do-once$12) ) - ) - (set_local $$arglist_current - (i32.load - (get_local $$ap) + (set_local $$expanded8 + (get_local $$25) ) - ) - (set_local $$22 - (get_local $$arglist_current) - ) - (set_local $$23 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$expanded7 + (i32.sub + (get_local $$expanded8) + (i32.const 1) + ) ) - ) - (set_local $$expanded4 - (get_local $$23) - ) - (set_local $$expanded - (i32.sub - (get_local $$expanded4) - (i32.const 1) + (set_local $$expanded6 + (i32.xor + (get_local $$expanded7) + (i32.const -1) + ) ) - ) - (set_local $$24 - (i32.add - (get_local $$22) - (get_local $$expanded) + (set_local $$26 + (i32.and + (get_local $$24) + (get_local $$expanded6) + ) ) - ) - (set_local $$25 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$27 + (get_local $$26) ) - ) - (set_local $$expanded8 - (get_local $$25) - ) - (set_local $$expanded7 - (i32.sub - (get_local $$expanded8) - (i32.const 1) + (set_local $$28 + (i32.load + (get_local $$27) + ) ) - ) - (set_local $$expanded6 - (i32.xor - (get_local $$expanded7) - (i32.const -1) + (set_local $$arglist_next + (i32.add + (get_local $$27) + (i32.const 4) + ) ) - ) - (set_local $$26 - (i32.and - (get_local $$24) - (get_local $$expanded6) + (i32.store + (get_local $$ap) + (get_local $$arglist_next) ) - ) - (set_local $$27 - (get_local $$26) - ) - (set_local $$28 - (i32.load - (get_local $$27) + (set_local $$l10n$2 + (i32.const 0) ) - ) - (set_local $$arglist_next - (i32.add - (get_local $$27) - (i32.const 4) + (set_local $$storemerge$191 + (get_local $$arrayidx68) + ) + (set_local $$w$0 + (get_local $$28) ) ) - (i32.store - (get_local $$ap) - (get_local $$arglist_next) - ) - (set_local $$l10n$2 + ) + (set_local $$cmp97 + (i32.lt_s + (get_local $$w$0) (i32.const 0) ) - (set_local $$storemerge$191 - (get_local $$arrayidx68) - ) - (set_local $$w$0 - (get_local $$28) - ) - ) - ) - (set_local $$cmp97 - (i32.lt_s - (get_local $$w$0) - (i32.const 0) ) - ) - (if - (get_local $$cmp97) - (block - (set_local $$or100 - (i32.or - (get_local $$fl$0284) - (i32.const 8192) + (if + (get_local $$cmp97) + (block + (set_local $$or100 + (i32.or + (get_local $$fl$0284) + (i32.const 8192) + ) + ) + (set_local $$sub101 + (i32.sub + (i32.const 0) + (get_local $$w$0) + ) + ) + (set_local $$fl$1 + (get_local $$or100) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$191) + ) + (set_local $$l10n$3 + (get_local $$l10n$2) + ) + (set_local $$w$1 + (get_local $$sub101) ) ) - (set_local $$sub101 - (i32.sub - (i32.const 0) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$191) + ) + (set_local $$l10n$3 + (get_local $$l10n$2) + ) + (set_local $$w$1 (get_local $$w$0) ) ) - (set_local $$fl$1 - (get_local $$or100) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$191) - ) - (set_local $$l10n$3 - (get_local $$l10n$2) - ) - (set_local $$w$1 - (get_local $$sub101) - ) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$191) - ) - (set_local $$l10n$3 - (get_local $$l10n$2) - ) - (set_local $$w$1 - (get_local $$w$0) - ) ) ) - ) - (block - (set_local $$conv$4$i - (i32.shr_s - (i32.shl - (get_local $$12) + (block + (set_local $$conv$4$i + (i32.shr_s + (i32.shl + (get_local $$12) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp$5$i - (i32.add - (get_local $$conv$4$i) - (i32.const -48) - ) - ) - (set_local $$isdigit$6$i - (i32.lt_u - (get_local $$isdigittmp$5$i) - (i32.const 10) ) - ) - (if - (get_local $$isdigit$6$i) - (block - (set_local $$29 - (get_local $$storemerge$186282) - ) - (set_local $$i$07$i - (i32.const 0) + (set_local $$isdigittmp$5$i + (i32.add + (get_local $$conv$4$i) + (i32.const -48) ) - (set_local $$isdigittmp8$i + ) + (set_local $$isdigit$6$i + (i32.lt_u (get_local $$isdigittmp$5$i) + (i32.const 10) ) - (loop $while-out$14 $while-in$15 - (set_local $$mul$i - (i32.mul - (get_local $$i$07$i) - (i32.const 10) - ) - ) - (set_local $$add$i - (i32.add - (get_local $$mul$i) - (get_local $$isdigittmp8$i) - ) + ) + (if + (get_local $$isdigit$6$i) + (block + (set_local $$29 + (get_local $$storemerge$186282) ) - (set_local $$incdec$ptr$i - (i32.add - (get_local $$29) - (i32.const 1) - ) + (set_local $$i$07$i + (i32.const 0) ) - (set_local $$30 - (i32.load8_s - (get_local $$incdec$ptr$i) - ) + (set_local $$isdigittmp8$i + (get_local $$isdigittmp$5$i) ) - (set_local $$conv$i - (i32.shr_s - (i32.shl - (get_local $$30) - (i32.const 24) + (loop $while-in$15 + (block $while-out$14 + (set_local $$mul$i + (i32.mul + (get_local $$i$07$i) + (i32.const 10) + ) ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp$i - (i32.add - (get_local $$conv$i) - (i32.const -48) + (set_local $$add$i + (i32.add + (get_local $$mul$i) + (get_local $$isdigittmp8$i) + ) + ) + (set_local $$incdec$ptr$i + (i32.add + (get_local $$29) + (i32.const 1) + ) + ) + (set_local $$30 + (i32.load8_s + (get_local $$incdec$ptr$i) + ) + ) + (set_local $$conv$i + (i32.shr_s + (i32.shl + (get_local $$30) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (set_local $$isdigittmp$i + (i32.add + (get_local $$conv$i) + (i32.const -48) + ) + ) + (set_local $$isdigit$i + (i32.lt_u + (get_local $$isdigittmp$i) + (i32.const 10) + ) + ) + (if + (get_local $$isdigit$i) + (block + (set_local $$29 + (get_local $$incdec$ptr$i) + ) + (set_local $$i$07$i + (get_local $$add$i) + ) + (set_local $$isdigittmp8$i + (get_local $$isdigittmp$i) + ) + ) + (block + (set_local $$add$i$lcssa + (get_local $$add$i) + ) + (set_local $$incdec$ptr$i$lcssa + (get_local $$incdec$ptr$i) + ) + (br $while-out$14) + ) + ) + (br $while-in$15) ) ) - (set_local $$isdigit$i - (i32.lt_u - (get_local $$isdigittmp$i) - (i32.const 10) + (set_local $$cmp105 + (i32.lt_s + (get_local $$add$i$lcssa) + (i32.const 0) ) ) (if - (get_local $$isdigit$i) + (get_local $$cmp105) (block - (set_local $$29 - (get_local $$incdec$ptr$i) - ) - (set_local $$i$07$i - (get_local $$add$i) - ) - (set_local $$isdigittmp8$i - (get_local $$isdigittmp$i) + (set_local $$retval$0 + (i32.const -1) ) + (br $label$break$L1) ) (block - (set_local $$add$i$lcssa - (get_local $$add$i) + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$incdec$ptr$i$lcssa) ) - (set_local $$incdec$ptr$i$lcssa - (get_local $$incdec$ptr$i) + (set_local $$l10n$3 + (get_local $$l10n$1) + ) + (set_local $$w$1 + (get_local $$add$i$lcssa) ) - (br $while-out$14) ) ) - (br $while-in$15) ) - (set_local $$cmp105 - (i32.lt_s - (get_local $$add$i$lcssa) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$186282) + ) + (set_local $$l10n$3 + (get_local $$l10n$1) + ) + (set_local $$w$1 (i32.const 0) ) ) - (if - (get_local $$cmp105) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$incdec$ptr$i$lcssa) - ) - (set_local $$l10n$3 - (get_local $$l10n$1) - ) - (set_local $$w$1 - (get_local $$add$i$lcssa) - ) - ) - ) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$186282) - ) - (set_local $$l10n$3 - (get_local $$l10n$1) - ) - (set_local $$w$1 - (i32.const 0) - ) ) ) ) ) - ) - (set_local $$31 - (i32.load8_s - (get_local $$incdec$ptr169269) + (set_local $$31 + (i32.load8_s + (get_local $$incdec$ptr169269) + ) ) - ) - (set_local $$cmp111 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$31) + (set_local $$cmp111 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$31) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 46) ) - (i32.const 46) ) - ) - (block $label$break$L46 - (if - (get_local $$cmp111) - (block - (set_local $$arrayidx114 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 1) - ) - ) - (set_local $$32 - (i32.load8_s - (get_local $$arrayidx114) - ) - ) - (set_local $$cmp116 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$32) - (i32.const 24) - ) - (i32.const 24) + (block $label$break$L46 + (if + (get_local $$cmp111) + (block + (set_local $$arrayidx114 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 1) ) - (i32.const 42) ) - ) - (if - (i32.eqz - (get_local $$cmp116) + (set_local $$32 + (i32.load8_s + (get_local $$arrayidx114) + ) ) - (block - (set_local $$conv$4$i$197 + (set_local $$cmp116 + (i32.eq (i32.shr_s (i32.shl (get_local $$32) @@ -7161,415 +7174,528 @@ ) (i32.const 24) ) + (i32.const 42) ) - (set_local $$isdigittmp$5$i$198 - (i32.add - (get_local $$conv$4$i$197) - (i32.const -48) - ) - ) - (set_local $$isdigit$6$i$199 - (i32.lt_u - (get_local $$isdigittmp$5$i$198) - (i32.const 10) - ) - ) - (if - (get_local $$isdigit$6$i$199) - (block - (set_local $$49 - (get_local $$arrayidx114) - ) - (set_local $$i$07$i$201 - (i32.const 0) - ) - (set_local $$isdigittmp8$i$200 - (get_local $$isdigittmp$5$i$198) - ) - ) - (block - (set_local $$incdec$ptr169272 - (get_local $$arrayidx114) - ) - (set_local $$p$0 - (i32.const 0) - ) - (br $label$break$L46) - ) + ) + (if + (i32.eqz + (get_local $$cmp116) ) - (loop $while-out$17 $while-in$18 - (set_local $$mul$i$202 - (i32.mul - (get_local $$i$07$i$201) - (i32.const 10) - ) - ) - (set_local $$add$i$203 - (i32.add - (get_local $$mul$i$202) - (get_local $$isdigittmp8$i$200) - ) - ) - (set_local $$incdec$ptr$i$204 - (i32.add - (get_local $$49) - (i32.const 1) - ) - ) - (set_local $$50 - (i32.load8_s - (get_local $$incdec$ptr$i$204) - ) - ) - (set_local $$conv$i$205 + (block + (set_local $$conv$4$i$197 (i32.shr_s (i32.shl - (get_local $$50) + (get_local $$32) (i32.const 24) ) (i32.const 24) ) ) - (set_local $$isdigittmp$i$206 + (set_local $$isdigittmp$5$i$198 (i32.add - (get_local $$conv$i$205) + (get_local $$conv$4$i$197) (i32.const -48) ) ) - (set_local $$isdigit$i$207 + (set_local $$isdigit$6$i$199 (i32.lt_u - (get_local $$isdigittmp$i$206) + (get_local $$isdigittmp$5$i$198) (i32.const 10) ) ) (if - (get_local $$isdigit$i$207) + (get_local $$isdigit$6$i$199) (block (set_local $$49 - (get_local $$incdec$ptr$i$204) + (get_local $$arrayidx114) ) (set_local $$i$07$i$201 - (get_local $$add$i$203) + (i32.const 0) ) (set_local $$isdigittmp8$i$200 - (get_local $$isdigittmp$i$206) + (get_local $$isdigittmp$5$i$198) ) ) (block (set_local $$incdec$ptr169272 - (get_local $$incdec$ptr$i$204) + (get_local $$arrayidx114) ) (set_local $$p$0 - (get_local $$add$i$203) + (i32.const 0) ) (br $label$break$L46) ) ) - (br $while-in$18) + (loop $while-in$18 + (block $while-out$17 + (set_local $$mul$i$202 + (i32.mul + (get_local $$i$07$i$201) + (i32.const 10) + ) + ) + (set_local $$add$i$203 + (i32.add + (get_local $$mul$i$202) + (get_local $$isdigittmp8$i$200) + ) + ) + (set_local $$incdec$ptr$i$204 + (i32.add + (get_local $$49) + (i32.const 1) + ) + ) + (set_local $$50 + (i32.load8_s + (get_local $$incdec$ptr$i$204) + ) + ) + (set_local $$conv$i$205 + (i32.shr_s + (i32.shl + (get_local $$50) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (set_local $$isdigittmp$i$206 + (i32.add + (get_local $$conv$i$205) + (i32.const -48) + ) + ) + (set_local $$isdigit$i$207 + (i32.lt_u + (get_local $$isdigittmp$i$206) + (i32.const 10) + ) + ) + (if + (get_local $$isdigit$i$207) + (block + (set_local $$49 + (get_local $$incdec$ptr$i$204) + ) + (set_local $$i$07$i$201 + (get_local $$add$i$203) + ) + (set_local $$isdigittmp8$i$200 + (get_local $$isdigittmp$i$206) + ) + ) + (block + (set_local $$incdec$ptr169272 + (get_local $$incdec$ptr$i$204) + ) + (set_local $$p$0 + (get_local $$add$i$203) + ) + (br $label$break$L46) + ) + ) + (br $while-in$18) + ) + ) ) ) - ) - (set_local $$arrayidx119 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 2) + (set_local $$arrayidx119 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 2) + ) ) - ) - (set_local $$33 - (i32.load8_s - (get_local $$arrayidx119) + (set_local $$33 + (i32.load8_s + (get_local $$arrayidx119) + ) ) - ) - (set_local $$conv120 - (i32.shr_s - (i32.shl - (get_local $$33) + (set_local $$conv120 + (i32.shr_s + (i32.shl + (get_local $$33) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$isdigittmp187 - (i32.add - (get_local $$conv120) - (i32.const -48) + (set_local $$isdigittmp187 + (i32.add + (get_local $$conv120) + (i32.const -48) + ) ) - ) - (set_local $$isdigit188 - (i32.lt_u - (get_local $$isdigittmp187) - (i32.const 10) + (set_local $$isdigit188 + (i32.lt_u + (get_local $$isdigittmp187) + (i32.const 10) + ) ) - ) - (if - (get_local $$isdigit188) - (block - (set_local $$arrayidx124 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 3) + (if + (get_local $$isdigit188) + (block + (set_local $$arrayidx124 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 3) + ) ) - ) - (set_local $$34 - (i32.load8_s - (get_local $$arrayidx124) + (set_local $$34 + (i32.load8_s + (get_local $$arrayidx124) + ) ) - ) - (set_local $$cmp126 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$34) + (set_local $$cmp126 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$34) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 36) ) - (i32.const 36) ) - ) - (if - (get_local $$cmp126) - (block - (set_local $$arrayidx132 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$isdigittmp187) - (i32.const 2) + (if + (get_local $$cmp126) + (block + (set_local $$arrayidx132 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$isdigittmp187) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx132) - (i32.const 10) - ) - (set_local $$35 - (i32.load8_s - (get_local $$arrayidx119) + (i32.store + (get_local $$arrayidx132) + (i32.const 10) ) - ) - (set_local $$conv134 - (i32.shr_s - (i32.shl - (get_local $$35) + (set_local $$35 + (i32.load8_s + (get_local $$arrayidx119) + ) + ) + (set_local $$conv134 + (i32.shr_s + (i32.shl + (get_local $$35) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$sub135 - (i32.add - (get_local $$conv134) - (i32.const -48) + (set_local $$sub135 + (i32.add + (get_local $$conv134) + (i32.const -48) + ) ) - ) - (set_local $$i137 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$sub135) - (i32.const 3) + (set_local $$i137 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$sub135) + (i32.const 3) + ) ) ) - ) - (set_local $$36 - (get_local $$i137) - ) - (set_local $$37 - (get_local $$36) - ) - (set_local $$38 - (i32.load - (get_local $$37) + (set_local $$36 + (get_local $$i137) ) - ) - (set_local $$39 - (i32.add + (set_local $$37 (get_local $$36) - (i32.const 4) ) - ) - (set_local $$40 - (get_local $$39) - ) - (set_local $$41 - (i32.load - (get_local $$40) + (set_local $$38 + (i32.load + (get_local $$37) + ) ) - ) - (set_local $$add$ptr139 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 4) + (set_local $$39 + (i32.add + (get_local $$36) + (i32.const 4) + ) ) + (set_local $$40 + (get_local $$39) + ) + (set_local $$41 + (i32.load + (get_local $$40) + ) + ) + (set_local $$add$ptr139 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 4) + ) + ) + (set_local $$incdec$ptr169272 + (get_local $$add$ptr139) + ) + (set_local $$p$0 + (get_local $$38) + ) + (br $label$break$L46) ) - (set_local $$incdec$ptr169272 - (get_local $$add$ptr139) - ) - (set_local $$p$0 - (get_local $$38) - ) - (br $label$break$L46) ) ) ) - ) - (set_local $$tobool141 - (i32.eq - (get_local $$l10n$3) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool141) - ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$tobool141 + (i32.eq + (get_local $$l10n$3) + (i32.const 0) ) - (br $label$break$L1) ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$arglist_current2 - (i32.load - (get_local $$ap) - ) - ) - (set_local $$42 - (get_local $$arglist_current2) + (if + (i32.eqz + (get_local $$tobool141) ) - (set_local $$43 - (i32.add - (i32.const 0) - (i32.const 4) + (block + (set_local $$retval$0 + (i32.const -1) ) + (br $label$break$L1) ) - (set_local $$expanded11 - (get_local $$43) - ) - (set_local $$expanded10 - (i32.sub - (get_local $$expanded11) - (i32.const 1) + ) + (if + (get_local $$tobool25) + (block + (set_local $$arglist_current2 + (i32.load + (get_local $$ap) + ) ) - ) - (set_local $$44 - (i32.add - (get_local $$42) - (get_local $$expanded10) + (set_local $$42 + (get_local $$arglist_current2) ) - ) - (set_local $$45 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$43 + (i32.add + (i32.const 0) + (i32.const 4) + ) ) - ) - (set_local $$expanded15 - (get_local $$45) - ) - (set_local $$expanded14 - (i32.sub - (get_local $$expanded15) - (i32.const 1) + (set_local $$expanded11 + (get_local $$43) ) - ) - (set_local $$expanded13 - (i32.xor - (get_local $$expanded14) - (i32.const -1) + (set_local $$expanded10 + (i32.sub + (get_local $$expanded11) + (i32.const 1) + ) + ) + (set_local $$44 + (i32.add + (get_local $$42) + (get_local $$expanded10) + ) + ) + (set_local $$45 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (set_local $$expanded15 + (get_local $$45) + ) + (set_local $$expanded14 + (i32.sub + (get_local $$expanded15) + (i32.const 1) + ) + ) + (set_local $$expanded13 + (i32.xor + (get_local $$expanded14) + (i32.const -1) + ) + ) + (set_local $$46 + (i32.and + (get_local $$44) + (get_local $$expanded13) + ) + ) + (set_local $$47 + (get_local $$46) + ) + (set_local $$48 + (i32.load + (get_local $$47) + ) + ) + (set_local $$arglist_next3 + (i32.add + (get_local $$47) + (i32.const 4) + ) + ) + (i32.store + (get_local $$ap) + (get_local $$arglist_next3) + ) + (set_local $$incdec$ptr169272 + (get_local $$arrayidx119) + ) + (set_local $$p$0 + (get_local $$48) ) ) - (set_local $$46 - (i32.and - (get_local $$44) - (get_local $$expanded13) + (block + (set_local $$incdec$ptr169272 + (get_local $$arrayidx119) + ) + (set_local $$p$0 + (i32.const 0) ) ) - (set_local $$47 - (get_local $$46) + ) + ) + (block + (set_local $$incdec$ptr169272 + (get_local $$incdec$ptr169269) + ) + (set_local $$p$0 + (i32.const -1) + ) + ) + ) + ) + (set_local $$incdec$ptr169271 + (get_local $$incdec$ptr169272) + ) + (set_local $$st$0 + (i32.const 0) + ) + (loop $while-in$20 + (block $while-out$19 + (set_local $$51 + (i32.load8_s + (get_local $$incdec$ptr169271) + ) + ) + (set_local $$conv163 + (i32.shr_s + (i32.shl + (get_local $$51) + (i32.const 24) ) - (set_local $$48 - (i32.load - (get_local $$47) - ) + (i32.const 24) + ) + ) + (set_local $$sub164 + (i32.add + (get_local $$conv163) + (i32.const -65) + ) + ) + (set_local $$cmp165 + (i32.gt_u + (get_local $$sub164) + (i32.const 57) + ) + ) + (if + (get_local $$cmp165) + (block + (set_local $$retval$0 + (i32.const -1) ) - (set_local $$arglist_next3 - (i32.add - (get_local $$47) - (i32.const 4) + (br $label$break$L1) + ) + ) + (set_local $$incdec$ptr169 + (i32.add + (get_local $$incdec$ptr169271) + (i32.const 1) + ) + ) + (set_local $$arrayidx173 + (i32.add + (i32.add + (i32.const 3611) + (i32.mul + (get_local $$st$0) + (i32.const 58) ) ) - (i32.store - (get_local $$ap) - (get_local $$arglist_next3) - ) - (set_local $$incdec$ptr169272 - (get_local $$arrayidx119) + (get_local $$sub164) + ) + ) + (set_local $$52 + (i32.load8_s + (get_local $$arrayidx173) + ) + ) + (set_local $$conv174 + (i32.and + (get_local $$52) + (i32.const 255) + ) + ) + (set_local $$sub175 + (i32.add + (get_local $$conv174) + (i32.const -1) + ) + ) + (set_local $$cmp176 + (i32.lt_u + (get_local $$sub175) + (i32.const 8) + ) + ) + (if + (get_local $$cmp176) + (block + (set_local $$incdec$ptr169271 + (get_local $$incdec$ptr169) ) - (set_local $$p$0 - (get_local $$48) + (set_local $$st$0 + (get_local $$conv174) ) ) (block - (set_local $$incdec$ptr169272 - (get_local $$arrayidx119) + (set_local $$$lcssa + (get_local $$52) ) - (set_local $$p$0 - (i32.const 0) + (set_local $$conv174$lcssa + (get_local $$conv174) + ) + (set_local $$incdec$ptr169$lcssa + (get_local $$incdec$ptr169) ) + (set_local $$incdec$ptr169271$lcssa414 + (get_local $$incdec$ptr169271) + ) + (set_local $$st$0$lcssa415 + (get_local $$st$0) + ) + (br $while-out$19) ) ) - ) - (block - (set_local $$incdec$ptr169272 - (get_local $$incdec$ptr169269) - ) - (set_local $$p$0 - (i32.const -1) - ) - ) - ) - ) - (set_local $$incdec$ptr169271 - (get_local $$incdec$ptr169272) - ) - (set_local $$st$0 - (i32.const 0) - ) - (loop $while-out$19 $while-in$20 - (set_local $$51 - (i32.load8_s - (get_local $$incdec$ptr169271) + (br $while-in$20) ) ) - (set_local $$conv163 - (i32.shr_s - (i32.shl - (get_local $$51) + (set_local $$tobool178 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$$lcssa) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (set_local $$sub164 - (i32.add - (get_local $$conv163) - (i32.const -65) - ) - ) - (set_local $$cmp165 - (i32.gt_u - (get_local $$sub164) - (i32.const 57) + (i32.const 0) ) ) (if - (get_local $$cmp165) + (get_local $$tobool178) (block (set_local $$retval$0 (i32.const -1) @@ -7577,396 +7703,329 @@ (br $label$break$L1) ) ) - (set_local $$incdec$ptr169 - (i32.add - (get_local $$incdec$ptr169271) - (i32.const 1) - ) - ) - (set_local $$arrayidx173 - (i32.add - (i32.add - (i32.const 3611) - (i32.mul - (get_local $$st$0) - (i32.const 58) + (set_local $$cmp181 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$$lcssa) + (i32.const 24) ) + (i32.const 24) ) - (get_local $$sub164) - ) - ) - (set_local $$52 - (i32.load8_s - (get_local $$arrayidx173) - ) - ) - (set_local $$conv174 - (i32.and - (get_local $$52) - (i32.const 255) + (i32.const 19) ) ) - (set_local $$sub175 - (i32.add - (get_local $$conv174) + (set_local $$cmp184 + (i32.gt_s + (get_local $$argpos$0) (i32.const -1) ) ) - (set_local $$cmp176 - (i32.lt_u - (get_local $$sub175) - (i32.const 8) - ) - ) - (if - (get_local $$cmp176) - (block - (set_local $$incdec$ptr169271 - (get_local $$incdec$ptr169) + (block $do-once$21 + (if + (get_local $$cmp181) + (if + (get_local $$cmp184) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + (set_local $label + (i32.const 52) + ) ) - (set_local $$st$0 - (get_local $$conv174) - ) - ) - (block - (set_local $$$lcssa - (get_local $$52) - ) - (set_local $$conv174$lcssa - (get_local $$conv174) - ) - (set_local $$incdec$ptr169$lcssa - (get_local $$incdec$ptr169) - ) - (set_local $$incdec$ptr169271$lcssa414 - (get_local $$incdec$ptr169271) - ) - (set_local $$st$0$lcssa415 - (get_local $$st$0) - ) - (br $while-out$19) - ) - ) - (br $while-in$20) - ) - (set_local $$tobool178 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$$lcssa) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 0) - ) - ) - (if - (get_local $$tobool178) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (set_local $$cmp181 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$$lcssa) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 19) - ) - ) - (set_local $$cmp184 - (i32.gt_s - (get_local $$argpos$0) - (i32.const -1) - ) - ) - (block $do-once$21 - (if - (get_local $$cmp181) - (if - (get_local $$cmp184) (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - (set_local $label - (i32.const 52) - ) - ) - (block - (if - (get_local $$cmp184) - (block - (set_local $$arrayidx192 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$argpos$0) - (i32.const 2) + (if + (get_local $$cmp184) + (block + (set_local $$arrayidx192 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$argpos$0) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx192) - (get_local $$conv174$lcssa) - ) - (set_local $$53 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$argpos$0) - (i32.const 3) + (i32.store + (get_local $$arrayidx192) + (get_local $$conv174$lcssa) + ) + (set_local $$53 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$argpos$0) + (i32.const 3) + ) ) ) - ) - (set_local $$54 - (get_local $$53) - ) - (set_local $$55 - (get_local $$54) - ) - (set_local $$56 - (i32.load - (get_local $$55) + (set_local $$54 + (get_local $$53) ) - ) - (set_local $$57 - (i32.add + (set_local $$55 (get_local $$54) - (i32.const 4) ) - ) - (set_local $$58 - (get_local $$57) - ) - (set_local $$59 - (i32.load - (get_local $$58) + (set_local $$56 + (i32.load + (get_local $$55) + ) ) - ) - (set_local $$60 - (get_local $$arg) - ) - (set_local $$61 - (get_local $$60) - ) - (i32.store - (get_local $$61) - (get_local $$56) - ) - (set_local $$62 - (i32.add + (set_local $$57 + (i32.add + (get_local $$54) + (i32.const 4) + ) + ) + (set_local $$58 + (get_local $$57) + ) + (set_local $$59 + (i32.load + (get_local $$58) + ) + ) + (set_local $$60 + (get_local $$arg) + ) + (set_local $$61 (get_local $$60) - (i32.const 4) ) + (i32.store + (get_local $$61) + (get_local $$56) + ) + (set_local $$62 + (i32.add + (get_local $$60) + (i32.const 4) + ) + ) + (set_local $$63 + (get_local $$62) + ) + (i32.store + (get_local $$63) + (get_local $$59) + ) + (set_local $label + (i32.const 52) + ) + (br $do-once$21) ) - (set_local $$63 - (get_local $$62) - ) - (i32.store - (get_local $$63) - (get_local $$59) + ) + (if + (i32.eqz + (get_local $$tobool25) ) - (set_local $label - (i32.const 52) + (block + (set_local $$retval$0 + (i32.const 0) + ) + (br $label$break$L1) ) - (br $do-once$21) ) + (call $_pop_arg_336 + (get_local $$arg) + (get_local $$conv174$lcssa) + (get_local $$ap) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 52) + ) + (block + (set_local $label + (i32.const 0) ) (if (i32.eqz (get_local $$tobool25) ) (block - (set_local $$retval$0 - (i32.const 0) + (set_local $$cnt$0 + (get_local $$cnt$1) ) - (br $label$break$L1) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) ) ) - (call $_pop_arg_336 - (get_local $$arg) - (get_local $$conv174$lcssa) - (get_local $$ap) - ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 52) - ) - (block - (set_local $label - (i32.const 0) - ) - (if - (i32.eqz - (get_local $$tobool25) - ) - (block - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) - ) + (set_local $$64 + (i32.load8_s + (get_local $$incdec$ptr169271$lcssa414) ) ) - ) - (set_local $$64 - (i32.load8_s - (get_local $$incdec$ptr169271$lcssa414) - ) - ) - (set_local $$conv207 - (i32.shr_s - (i32.shl - (get_local $$64) + (set_local $$conv207 + (i32.shr_s + (i32.shl + (get_local $$64) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$tobool208 - (i32.ne - (get_local $$st$0$lcssa415) - (i32.const 0) + (set_local $$tobool208 + (i32.ne + (get_local $$st$0$lcssa415) + (i32.const 0) + ) ) - ) - (set_local $$and210 - (i32.and - (get_local $$conv207) - (i32.const 15) + (set_local $$and210 + (i32.and + (get_local $$conv207) + (i32.const 15) + ) ) - ) - (set_local $$cmp211 - (i32.eq - (get_local $$and210) - (i32.const 3) + (set_local $$cmp211 + (i32.eq + (get_local $$and210) + (i32.const 3) + ) ) - ) - (set_local $$or$cond192 - (i32.and - (get_local $$tobool208) - (get_local $$cmp211) + (set_local $$or$cond192 + (i32.and + (get_local $$tobool208) + (get_local $$cmp211) + ) ) - ) - (set_local $$and214 - (i32.and - (get_local $$conv207) - (i32.const -33) + (set_local $$and214 + (i32.and + (get_local $$conv207) + (i32.const -33) + ) ) - ) - (set_local $$t$0 - (if - (get_local $$or$cond192) - (get_local $$and214) - (get_local $$conv207) + (set_local $$t$0 + (if + (get_local $$or$cond192) + (get_local $$and214) + (get_local $$conv207) + ) ) - ) - (set_local $$and216 - (i32.and - (get_local $$fl$1) - (i32.const 8192) + (set_local $$and216 + (i32.and + (get_local $$fl$1) + (i32.const 8192) + ) ) - ) - (set_local $$tobool217 - (i32.eq - (get_local $$and216) - (i32.const 0) + (set_local $$tobool217 + (i32.eq + (get_local $$and216) + (i32.const 0) + ) ) - ) - (set_local $$and219 - (i32.and - (get_local $$fl$1) - (i32.const -65537) + (set_local $$and219 + (i32.and + (get_local $$fl$1) + (i32.const -65537) + ) ) - ) - (set_local $$fl$1$and219 - (if - (get_local $$tobool217) - (get_local $$fl$1) - (get_local $$and219) + (set_local $$fl$1$and219 + (if + (get_local $$tobool217) + (get_local $$fl$1) + (get_local $$and219) + ) ) - ) - (block $label$break$L75 - (block $switch$24 - (block $switch-default$127 + (block $label$break$L75 + (block $switch$24 (block $switch-default$127 - (block $switch-case$126 - (block $switch-case$55 - (block $switch-case$54 - (block $switch-case$53 - (block $switch-case$52 - (block $switch-case$51 - (block $switch-case$50 - (block $switch-case$49 - (block $switch-case$48 - (block $switch-case$47 - (block $switch-case$46 - (block $switch-case$45 - (block $switch-case$44 - (block $switch-case$43 - (block $switch-case$42 - (block $switch-case$41 - (block $switch-case$40 - (block $switch-case$37 - (block $switch-case$36 - (block $switch-case$35 - (block $switch-case$34 - (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$52 $switch-case$51 $switch-case$50 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$53 $switch-default$127 $switch-case$44 $switch-case$42 $switch-case$126 $switch-case$55 $switch-case$54 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$37 $switch-default$127 - (i32.sub - (get_local $$t$0) - (i32.const 65) + (block $switch-default$127 + (block $switch-case$126 + (block $switch-case$55 + (block $switch-case$54 + (block $switch-case$53 + (block $switch-case$52 + (block $switch-case$51 + (block $switch-case$50 + (block $switch-case$49 + (block $switch-case$48 + (block $switch-case$47 + (block $switch-case$46 + (block $switch-case$45 + (block $switch-case$44 + (block $switch-case$43 + (block $switch-case$42 + (block $switch-case$41 + (block $switch-case$40 + (block $switch-case$37 + (block $switch-case$36 + (block $switch-case$35 + (block $switch-case$34 + (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$52 $switch-case$51 $switch-case$50 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$53 $switch-default$127 $switch-case$44 $switch-case$42 $switch-case$126 $switch-case$55 $switch-case$54 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$37 $switch-default$127 + (i32.sub + (get_local $$t$0) + (i32.const 65) + ) ) ) - ) - (block - (block $switch$25 - (block $switch-default$33 + (block + (block $switch$25 (block $switch-default$33 - (block $switch-case$32 - (block $switch-case$31 - (block $switch-case$30 - (block $switch-case$29 - (block $switch-case$28 - (block $switch-case$27 - (block $switch-case$26 - (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 - (i32.sub - (get_local $$st$0$lcssa415) - (i32.const 0) + (block $switch-default$33 + (block $switch-case$32 + (block $switch-case$31 + (block $switch-case$30 + (block $switch-case$29 + (block $switch-case$28 + (block $switch-case$27 + (block $switch-case$26 + (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 + (i32.sub + (get_local $$st$0$lcssa415) + (i32.const 0) + ) + ) + ) + (block + (set_local $$71 + (i32.load + (get_local $$arg) + ) + ) + (i32.store + (get_local $$71) + (get_local $$cnt$1) ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + (br $switch$25) ) ) (block - (set_local $$71 + (set_local $$72 (i32.load (get_local $$arg) ) ) (i32.store - (get_local $$71) + (get_local $$72) (get_local $$cnt$1) ) (set_local $$cnt$0 @@ -7986,15 +8045,49 @@ ) ) (block - (set_local $$72 - (i32.load - (get_local $$arg) + (set_local $$73 + (i32.lt_s + (get_local $$cnt$1) + (i32.const 0) ) ) - (i32.store - (get_local $$72) + (set_local $$74 + (i32.shr_s + (i32.shl + (get_local $$73) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (set_local $$75 + (i32.load + (get_local $$arg) + ) + ) + (set_local $$76 + (get_local $$75) + ) + (set_local $$77 + (get_local $$76) + ) + (i32.store + (get_local $$77) (get_local $$cnt$1) ) + (set_local $$78 + (i32.add + (get_local $$76) + (i32.const 4) + ) + ) + (set_local $$79 + (get_local $$78) + ) + (i32.store + (get_local $$79) + (get_local $$74) + ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8012,48 +8105,20 @@ ) ) (block - (set_local $$73 - (i32.lt_s + (set_local $$conv229 + (i32.and (get_local $$cnt$1) - (i32.const 0) - ) - ) - (set_local $$74 - (i32.shr_s - (i32.shl - (get_local $$73) - (i32.const 31) - ) - (i32.const 31) + (i32.const 65535) ) ) - (set_local $$75 + (set_local $$80 (i32.load (get_local $$arg) ) ) - (set_local $$76 - (get_local $$75) - ) - (set_local $$77 - (get_local $$76) - ) - (i32.store - (get_local $$77) - (get_local $$cnt$1) - ) - (set_local $$78 - (i32.add - (get_local $$76) - (i32.const 4) - ) - ) - (set_local $$79 - (get_local $$78) - ) - (i32.store - (get_local $$79) - (get_local $$74) + (i32.store16 + (get_local $$80) + (get_local $$conv229) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8072,20 +8137,20 @@ ) ) (block - (set_local $$conv229 + (set_local $$conv232 (i32.and (get_local $$cnt$1) - (i32.const 65535) + (i32.const 255) ) ) - (set_local $$80 + (set_local $$81 (i32.load (get_local $$arg) ) ) - (i32.store16 - (get_local $$80) - (get_local $$conv229) + (i32.store8 + (get_local $$81) + (get_local $$conv232) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8104,20 +8169,14 @@ ) ) (block - (set_local $$conv232 - (i32.and - (get_local $$cnt$1) - (i32.const 255) - ) - ) - (set_local $$81 + (set_local $$82 (i32.load (get_local $$arg) ) ) - (i32.store8 - (get_local $$81) - (get_local $$conv232) + (i32.store + (get_local $$82) + (get_local $$cnt$1) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8136,15 +8195,49 @@ ) ) (block - (set_local $$82 + (set_local $$83 + (i32.lt_s + (get_local $$cnt$1) + (i32.const 0) + ) + ) + (set_local $$84 + (i32.shr_s + (i32.shl + (get_local $$83) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (set_local $$85 (i32.load (get_local $$arg) ) ) + (set_local $$86 + (get_local $$85) + ) + (set_local $$87 + (get_local $$86) + ) (i32.store - (get_local $$82) + (get_local $$87) (get_local $$cnt$1) ) + (set_local $$88 + (i32.add + (get_local $$86) + (i32.const 4) + ) + ) + (set_local $$89 + (get_local $$88) + ) + (i32.store + (get_local $$89) + (get_local $$84) + ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8162,49 +8255,6 @@ ) ) (block - (set_local $$83 - (i32.lt_s - (get_local $$cnt$1) - (i32.const 0) - ) - ) - (set_local $$84 - (i32.shr_s - (i32.shl - (get_local $$83) - (i32.const 31) - ) - (i32.const 31) - ) - ) - (set_local $$85 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$86 - (get_local $$85) - ) - (set_local $$87 - (get_local $$86) - ) - (i32.store - (get_local $$87) - (get_local $$cnt$1) - ) - (set_local $$88 - (i32.add - (get_local $$86) - (i32.const 4) - ) - ) - (set_local $$89 - (get_local $$88) - ) - (i32.store - (get_local $$89) - (get_local $$84) - ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8218,5729 +8268,5763 @@ (get_local $$l10n$3) ) (br $label$continue$L1) - (br $switch$25) - ) - ) - (block - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) ) - (br $label$continue$L1) ) ) + (br $switch$24) ) - (br $switch$24) ) - ) - (block - (set_local $$cmp240 - (i32.gt_u - (get_local $$p$0) - (i32.const 8) + (block + (set_local $$cmp240 + (i32.gt_u + (get_local $$p$0) + (i32.const 8) + ) ) - ) - (set_local $$cond245 - (if - (get_local $$cmp240) - (get_local $$p$0) - (i32.const 8) + (set_local $$cond245 + (if + (get_local $$cmp240) + (get_local $$p$0) + (i32.const 8) + ) ) - ) - (set_local $$or246 - (i32.or - (get_local $$fl$1$and219) - (i32.const 8) + (set_local $$or246 + (i32.or + (get_local $$fl$1$and219) + (i32.const 8) + ) ) + (set_local $$fl$3 + (get_local $$or246) + ) + (set_local $$p$1 + (get_local $$cond245) + ) + (set_local $$t$1 + (i32.const 120) + ) + (set_local $label + (i32.const 64) + ) + (br $switch$24) ) - (set_local $$fl$3 - (get_local $$or246) - ) - (set_local $$p$1 - (get_local $$cond245) - ) - (set_local $$t$1 - (i32.const 120) - ) - (set_local $label - (i32.const 64) - ) - (br $switch$24) ) + (nop) ) - (nop) - ) - (block - (set_local $$fl$3 - (get_local $$fl$1$and219) - ) - (set_local $$p$1 - (get_local $$p$0) - ) - (set_local $$t$1 - (get_local $$t$0) - ) - (set_local $label - (i32.const 64) + (block + (set_local $$fl$3 + (get_local $$fl$1$and219) + ) + (set_local $$p$1 + (get_local $$p$0) + ) + (set_local $$t$1 + (get_local $$t$0) + ) + (set_local $label + (i32.const 64) + ) + (br $switch$24) ) - (br $switch$24) - ) - ) - (block - (set_local $$116 - (get_local $$arg) ) - (set_local $$117 - (get_local $$116) - ) - (set_local $$118 - (i32.load - (get_local $$117) + (block + (set_local $$116 + (get_local $$arg) ) - ) - (set_local $$119 - (i32.add + (set_local $$117 (get_local $$116) - (i32.const 4) - ) - ) - (set_local $$120 - (get_local $$119) - ) - (set_local $$121 - (i32.load - (get_local $$120) ) - ) - (set_local $$122 - (i32.eq - (get_local $$118) - (i32.const 0) + (set_local $$118 + (i32.load + (get_local $$117) + ) ) - ) - (set_local $$123 - (i32.eq - (get_local $$121) - (i32.const 0) + (set_local $$119 + (i32.add + (get_local $$116) + (i32.const 4) + ) ) - ) - (set_local $$124 - (i32.and - (get_local $$122) - (get_local $$123) + (set_local $$120 + (get_local $$119) ) - ) - (if - (get_local $$124) - (set_local $$s$addr$0$lcssa$i$229 - (get_local $$add$ptr205) + (set_local $$121 + (i32.load + (get_local $$120) + ) ) - (block - (set_local $$126 + (set_local $$122 + (i32.eq (get_local $$118) + (i32.const 0) ) - (set_local $$129 + ) + (set_local $$123 + (i32.eq (get_local $$121) + (i32.const 0) + ) + ) + (set_local $$124 + (i32.and + (get_local $$122) + (get_local $$123) ) - (set_local $$s$addr$06$i$221 + ) + (if + (get_local $$124) + (set_local $$s$addr$0$lcssa$i$229 (get_local $$add$ptr205) ) - (loop $while-out$38 $while-in$39 - (set_local $$125 - (i32.and - (get_local $$126) - (i32.const 7) - ) - ) - (set_local $$127 - (i32.or - (get_local $$125) - (i32.const 48) - ) - ) - (set_local $$128 - (i32.and - (get_local $$127) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr$i$225 - (i32.add - (get_local $$s$addr$06$i$221) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr$i$225) - (get_local $$128) - ) - (set_local $$130 - (call $_bitshift64Lshr - (get_local $$126) - (get_local $$129) - (i32.const 3) - ) - ) - (set_local $$131 - (i32.load - (i32.const 168) - ) - ) - (set_local $$132 - (i32.eq - (get_local $$130) - (i32.const 0) - ) + (block + (set_local $$126 + (get_local $$118) ) - (set_local $$133 - (i32.eq - (get_local $$131) - (i32.const 0) - ) + (set_local $$129 + (get_local $$121) ) - (set_local $$134 - (i32.and - (get_local $$132) - (get_local $$133) - ) + (set_local $$s$addr$06$i$221 + (get_local $$add$ptr205) ) - (if - (get_local $$134) - (block - (set_local $$s$addr$0$lcssa$i$229 - (get_local $$incdec$ptr$i$225) + (loop $while-in$39 + (block $while-out$38 + (set_local $$125 + (i32.and + (get_local $$126) + (i32.const 7) + ) ) - (br $while-out$38) - ) - (block - (set_local $$126 - (get_local $$130) + (set_local $$127 + (i32.or + (get_local $$125) + (i32.const 48) + ) + ) + (set_local $$128 + (i32.and + (get_local $$127) + (i32.const 255) + ) ) - (set_local $$129 - (get_local $$131) + (set_local $$incdec$ptr$i$225 + (i32.add + (get_local $$s$addr$06$i$221) + (i32.const -1) + ) ) - (set_local $$s$addr$06$i$221 + (i32.store8 (get_local $$incdec$ptr$i$225) + (get_local $$128) + ) + (set_local $$130 + (call $_bitshift64Lshr + (get_local $$126) + (get_local $$129) + (i32.const 3) + ) + ) + (set_local $$131 + (i32.load + (i32.const 168) + ) + ) + (set_local $$132 + (i32.eq + (get_local $$130) + (i32.const 0) + ) + ) + (set_local $$133 + (i32.eq + (get_local $$131) + (i32.const 0) + ) ) + (set_local $$134 + (i32.and + (get_local $$132) + (get_local $$133) + ) + ) + (if + (get_local $$134) + (block + (set_local $$s$addr$0$lcssa$i$229 + (get_local $$incdec$ptr$i$225) + ) + (br $while-out$38) + ) + (block + (set_local $$126 + (get_local $$130) + ) + (set_local $$129 + (get_local $$131) + ) + (set_local $$s$addr$06$i$221 + (get_local $$incdec$ptr$i$225) + ) + ) + ) + (br $while-in$39) ) ) - (br $while-in$39) ) ) - ) - (set_local $$and263 - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) - ) - ) - (set_local $$tobool264 - (i32.eq - (get_local $$and263) - (i32.const 0) - ) - ) - (if - (get_local $$tobool264) - (block - (set_local $$a$0 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$fl$4 + (set_local $$and263 + (i32.and (get_local $$fl$1$and219) + (i32.const 8) ) - (set_local $$p$2 - (get_local $$p$0) - ) - (set_local $$pl$1 + ) + (set_local $$tobool264 + (i32.eq + (get_local $$and263) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) - ) ) - (block - (set_local $$sub$ptr$rhs$cast267 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$sub$ptr$sub268 - (i32.sub - (get_local $$sub$ptr$lhs$cast317) - (get_local $$sub$ptr$rhs$cast267) + (if + (get_local $$tobool264) + (block + (set_local $$a$0 + (get_local $$s$addr$0$lcssa$i$229) ) - ) - (set_local $$add269 - (i32.add - (get_local $$sub$ptr$sub268) - (i32.const 1) + (set_local $$fl$4 + (get_local $$fl$1$and219) ) - ) - (set_local $$cmp270 - (i32.lt_s + (set_local $$p$2 (get_local $$p$0) - (get_local $$add269) ) - ) - (set_local $$add269$p$0 - (if - (get_local $$cmp270) - (get_local $$add269) - (get_local $$p$0) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 + (i32.const 4091) + ) + (set_local $label + (i32.const 77) ) ) - (set_local $$a$0 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$fl$4 - (get_local $$fl$1$and219) - ) - (set_local $$p$2 - (get_local $$add269$p$0) - ) - (set_local $$pl$1 - (i32.const 0) - ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) + (block + (set_local $$sub$ptr$rhs$cast267 + (get_local $$s$addr$0$lcssa$i$229) + ) + (set_local $$sub$ptr$sub268 + (i32.sub + (get_local $$sub$ptr$lhs$cast317) + (get_local $$sub$ptr$rhs$cast267) + ) + ) + (set_local $$add269 + (i32.add + (get_local $$sub$ptr$sub268) + (i32.const 1) + ) + ) + (set_local $$cmp270 + (i32.lt_s + (get_local $$p$0) + (get_local $$add269) + ) + ) + (set_local $$add269$p$0 + (if + (get_local $$cmp270) + (get_local $$add269) + (get_local $$p$0) + ) + ) + (set_local $$a$0 + (get_local $$s$addr$0$lcssa$i$229) + ) + (set_local $$fl$4 + (get_local $$fl$1$and219) + ) + (set_local $$p$2 + (get_local $$add269$p$0) + ) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 + (i32.const 4091) + ) + (set_local $label + (i32.const 77) + ) ) ) + (br $switch$24) ) - (br $switch$24) ) + (nop) ) - (nop) - ) - (block - (set_local $$135 - (get_local $$arg) - ) - (set_local $$136 - (get_local $$135) - ) - (set_local $$137 - (i32.load - (get_local $$136) + (block + (set_local $$135 + (get_local $$arg) ) - ) - (set_local $$138 - (i32.add + (set_local $$136 (get_local $$135) - (i32.const 4) ) - ) - (set_local $$139 - (get_local $$138) - ) - (set_local $$140 - (i32.load - (get_local $$139) - ) - ) - (set_local $$141 - (i32.lt_s - (get_local $$140) - (i32.const 0) - ) - ) - (if - (get_local $$141) - (block - (set_local $$142 - (call $_i64Subtract - (i32.const 0) - (i32.const 0) - (get_local $$137) - (get_local $$140) - ) - ) - (set_local $$143 - (i32.load - (i32.const 168) - ) + (set_local $$137 + (i32.load + (get_local $$136) ) - (set_local $$144 - (get_local $$arg) + ) + (set_local $$138 + (i32.add + (get_local $$135) + (i32.const 4) ) - (set_local $$145 - (get_local $$144) + ) + (set_local $$139 + (get_local $$138) + ) + (set_local $$140 + (i32.load + (get_local $$139) ) - (i32.store - (get_local $$145) - (get_local $$142) + ) + (set_local $$141 + (i32.lt_s + (get_local $$140) + (i32.const 0) ) - (set_local $$146 - (i32.add + ) + (if + (get_local $$141) + (block + (set_local $$142 + (call $_i64Subtract + (i32.const 0) + (i32.const 0) + (get_local $$137) + (get_local $$140) + ) + ) + (set_local $$143 + (i32.load + (i32.const 168) + ) + ) + (set_local $$144 + (get_local $$arg) + ) + (set_local $$145 (get_local $$144) - (i32.const 4) ) + (i32.store + (get_local $$145) + (get_local $$142) + ) + (set_local $$146 + (i32.add + (get_local $$144) + (i32.const 4) + ) + ) + (set_local $$147 + (get_local $$146) + ) + (i32.store + (get_local $$147) + (get_local $$143) + ) + (set_local $$148 + (get_local $$142) + ) + (set_local $$149 + (get_local $$143) + ) + (set_local $$pl$0 + (i32.const 1) + ) + (set_local $$prefix$0 + (i32.const 4091) + ) + (set_local $label + (i32.const 76) + ) + (br $label$break$L75) ) - (set_local $$147 - (get_local $$146) - ) - (i32.store - (get_local $$147) - (get_local $$143) - ) - (set_local $$148 - (get_local $$142) - ) - (set_local $$149 - (get_local $$143) - ) - (set_local $$pl$0 - (i32.const 1) - ) - (set_local $$prefix$0 - (i32.const 4091) - ) - (set_local $label - (i32.const 76) - ) - (br $label$break$L75) ) - ) - (set_local $$and289 - (i32.and - (get_local $$fl$1$and219) - (i32.const 2048) + (set_local $$and289 + (i32.and + (get_local $$fl$1$and219) + (i32.const 2048) + ) ) - ) - (set_local $$tobool290 - (i32.eq - (get_local $$and289) - (i32.const 0) + (set_local $$tobool290 + (i32.eq + (get_local $$and289) + (i32.const 0) + ) ) - ) - (if - (get_local $$tobool290) - (block - (set_local $$and294 - (i32.and - (get_local $$fl$1$and219) - (i32.const 1) + (if + (get_local $$tobool290) + (block + (set_local $$and294 + (i32.and + (get_local $$fl$1$and219) + (i32.const 1) + ) ) - ) - (set_local $$tobool295 - (i32.eq + (set_local $$tobool295 + (i32.eq + (get_local $$and294) + (i32.const 0) + ) + ) + (set_local $$$ + (if + (get_local $$tobool295) + (i32.const 4091) + (i32.const 4093) + ) + ) + (set_local $$148 + (get_local $$137) + ) + (set_local $$149 + (get_local $$140) + ) + (set_local $$pl$0 (get_local $$and294) - (i32.const 0) ) - ) - (set_local $$$ - (if - (get_local $$tobool295) - (i32.const 4091) - (i32.const 4093) + (set_local $$prefix$0 + (get_local $$$) + ) + (set_local $label + (i32.const 76) ) ) - (set_local $$148 - (get_local $$137) - ) - (set_local $$149 - (get_local $$140) - ) - (set_local $$pl$0 - (get_local $$and294) - ) - (set_local $$prefix$0 - (get_local $$$) - ) - (set_local $label - (i32.const 76) + (block + (set_local $$148 + (get_local $$137) + ) + (set_local $$149 + (get_local $$140) + ) + (set_local $$pl$0 + (i32.const 1) + ) + (set_local $$prefix$0 + (i32.const 4092) + ) + (set_local $label + (i32.const 76) + ) ) ) - (block - (set_local $$148 - (get_local $$137) - ) - (set_local $$149 - (get_local $$140) - ) - (set_local $$pl$0 - (i32.const 1) - ) - (set_local $$prefix$0 - (i32.const 4092) - ) - (set_local $label - (i32.const 76) - ) + (br $switch$24) + ) + ) + (block + (set_local $$65 + (get_local $$arg) + ) + (set_local $$66 + (get_local $$65) + ) + (set_local $$67 + (i32.load + (get_local $$66) + ) + ) + (set_local $$68 + (i32.add + (get_local $$65) + (i32.const 4) + ) + ) + (set_local $$69 + (get_local $$68) + ) + (set_local $$70 + (i32.load + (get_local $$69) ) ) + (set_local $$148 + (get_local $$67) + ) + (set_local $$149 + (get_local $$70) + ) + (set_local $$pl$0 + (i32.const 0) + ) + (set_local $$prefix$0 + (i32.const 4091) + ) + (set_local $label + (i32.const 76) + ) (br $switch$24) ) ) (block - (set_local $$65 + (set_local $$161 (get_local $$arg) ) - (set_local $$66 - (get_local $$65) + (set_local $$162 + (get_local $$161) ) - (set_local $$67 + (set_local $$163 (i32.load - (get_local $$66) + (get_local $$162) ) ) - (set_local $$68 + (set_local $$164 (i32.add - (get_local $$65) + (get_local $$161) (i32.const 4) ) ) - (set_local $$69 - (get_local $$68) + (set_local $$165 + (get_local $$164) ) - (set_local $$70 + (set_local $$166 (i32.load - (get_local $$69) + (get_local $$165) + ) + ) + (set_local $$167 + (i32.and + (get_local $$163) + (i32.const 255) ) ) - (set_local $$148 - (get_local $$67) + (i32.store8 + (get_local $$add$ptr340) + (get_local $$167) + ) + (set_local $$a$2 + (get_local $$add$ptr340) ) - (set_local $$149 - (get_local $$70) + (set_local $$fl$6 + (get_local $$and219) + ) + (set_local $$p$5 + (i32.const 1) ) - (set_local $$pl$0 + (set_local $$pl$2 (i32.const 0) ) - (set_local $$prefix$0 + (set_local $$prefix$2 (i32.const 4091) ) - (set_local $label - (i32.const 76) + (set_local $$z$2 + (get_local $$add$ptr205) ) (br $switch$24) ) ) (block - (set_local $$161 - (get_local $$arg) - ) - (set_local $$162 - (get_local $$161) - ) - (set_local $$163 - (i32.load - (get_local $$162) - ) - ) - (set_local $$164 - (i32.add - (get_local $$161) - (i32.const 4) - ) - ) - (set_local $$165 - (get_local $$164) + (set_local $$call344 + (call $___errno_location) ) - (set_local $$166 + (set_local $$168 (i32.load - (get_local $$165) - ) - ) - (set_local $$167 - (i32.and - (get_local $$163) - (i32.const 255) - ) - ) - (i32.store8 - (get_local $$add$ptr340) - (get_local $$167) - ) - (set_local $$a$2 - (get_local $$add$ptr340) - ) - (set_local $$fl$6 - (get_local $$and219) - ) - (set_local $$p$5 - (i32.const 1) - ) - (set_local $$pl$2 - (i32.const 0) - ) - (set_local $$prefix$2 - (i32.const 4091) - ) - (set_local $$z$2 - (get_local $$add$ptr205) - ) - (br $switch$24) - ) - ) - (block - (set_local $$call344 - (call $___errno_location) - ) - (set_local $$168 - (i32.load - (get_local $$call344) - ) - ) - (set_local $$call345 - (call $_strerror - (get_local $$168) - ) - ) - (set_local $$a$1 - (get_local $$call345) - ) - (set_local $label - (i32.const 82) - ) - (br $switch$24) - ) - ) - (block - (set_local $$169 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$tobool349 - (i32.ne - (get_local $$169) - (i32.const 0) - ) - ) - (set_local $$cond354 - (if - (get_local $$tobool349) - (get_local $$169) - (i32.const 4101) - ) - ) - (set_local $$a$1 - (get_local $$cond354) - ) - (set_local $label - (i32.const 82) - ) - (br $switch$24) - ) - ) - (block - (set_local $$170 - (get_local $$arg) - ) - (set_local $$171 - (get_local $$170) - ) - (set_local $$172 - (i32.load - (get_local $$171) - ) - ) - (set_local $$173 - (i32.add - (get_local $$170) - (i32.const 4) - ) - ) - (set_local $$174 - (get_local $$173) - ) - (set_local $$175 - (i32.load - (get_local $$174) - ) - ) - (i32.store - (get_local $$wc) - (get_local $$172) - ) - (i32.store - (get_local $$arrayidx370) - (i32.const 0) - ) - (i32.store - (get_local $$arg) - (get_local $$wc) - ) - (set_local $$p$4365 - (i32.const -1) - ) - (set_local $label - (i32.const 86) - ) - (br $switch$24) - ) - ) - (block - (set_local $$cmp377$314 - (i32.eq - (get_local $$p$0) - (i32.const 0) - ) - ) - (if - (get_local $$cmp377$314) - (block - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (i32.const 0) - (get_local $$fl$1$and219) - ) - (set_local $$i$0$lcssa368 - (i32.const 0) - ) - (set_local $label - (i32.const 98) - ) - ) - (block - (set_local $$p$4365 - (get_local $$p$0) - ) - (set_local $label - (i32.const 86) - ) - ) - ) - (br $switch$24) - ) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (block - (set_local $$181 - (f64.load - (get_local $$arg) - ) - ) - (i32.store - (get_local $$e2$i) - (i32.const 0) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $$181) - ) - (set_local $$182 - (i32.load - (i32.load - (i32.const 24) - ) - ) - ) - (set_local $$183 - (i32.load - (i32.add - (i32.load - (i32.const 24) - ) - (i32.const 4) - ) - ) - ) - (set_local $$184 - (i32.lt_s - (get_local $$183) - (i32.const 0) - ) - ) - (if - (get_local $$184) - (block - (set_local $$sub$i - (f64.neg - (get_local $$181) - ) - ) - (set_local $$pl$0$i - (i32.const 1) - ) - (set_local $$prefix$0$i - (i32.const 4108) - ) - (set_local $$y$addr$0$i - (get_local $$sub$i) - ) - ) - (block - (set_local $$and$i$238 - (i32.and - (get_local $$fl$1$and219) - (i32.const 2048) - ) - ) - (set_local $$tobool9$i - (i32.eq - (get_local $$and$i$238) - (i32.const 0) - ) - ) - (if - (get_local $$tobool9$i) - (block - (set_local $$and12$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 1) - ) - ) - (set_local $$tobool13$i - (i32.eq - (get_local $$and12$i) - (i32.const 0) - ) - ) - (set_local $$$$i - (if - (get_local $$tobool13$i) - (i32.const 4109) - (i32.const 4114) - ) - ) - (set_local $$pl$0$i - (get_local $$and12$i) - ) - (set_local $$prefix$0$i - (get_local $$$$i) - ) - (set_local $$y$addr$0$i - (get_local $$181) - ) - ) - (block - (set_local $$pl$0$i - (i32.const 1) - ) - (set_local $$prefix$0$i - (i32.const 4111) - ) - (set_local $$y$addr$0$i - (get_local $$181) - ) - ) - ) - ) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $$y$addr$0$i) - ) - (set_local $$185 - (i32.load - (i32.load - (i32.const 24) - ) - ) - ) - (set_local $$186 - (i32.load - (i32.add - (i32.load - (i32.const 24) - ) - (i32.const 4) - ) - ) - ) - (set_local $$187 - (i32.and - (get_local $$186) - (i32.const 2146435072) - ) - ) - (set_local $$188 - (i32.lt_u - (get_local $$187) - (i32.const 2146435072) - ) - ) - (set_local $$189 - (i32.lt_s - (i32.const 0) - (i32.const 0) - ) - ) - (set_local $$190 - (i32.eq - (get_local $$187) - (i32.const 2146435072) - ) - ) - (set_local $$191 - (i32.and - (get_local $$190) - (get_local $$189) - ) - ) - (set_local $$192 - (i32.or - (get_local $$188) - (get_local $$191) - ) - ) - (block $do-once$56 - (if - (get_local $$192) - (block - (set_local $$call55$i - (call $_frexpl - (get_local $$y$addr$0$i) - (get_local $$e2$i) - ) - ) - (set_local $$mul$i$240 - (f64.mul - (get_local $$call55$i) - (f64.const 2) - ) - ) - (set_local $$tobool56$i - (f64.ne - (get_local $$mul$i$240) - (f64.const 0) - ) - ) - (if - (get_local $$tobool56$i) - (block - (set_local $$195 - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$dec$i - (i32.add - (get_local $$195) - (i32.const -1) - ) - ) - (i32.store - (get_local $$e2$i) - (get_local $$dec$i) - ) - ) - ) - (set_local $$or$i$241 - (i32.or - (get_local $$t$0) - (i32.const 32) - ) - ) - (set_local $$cmp59$i - (i32.eq - (get_local $$or$i$241) - (i32.const 97) - ) - ) - (if - (get_local $$cmp59$i) - (block - (set_local $$and62$i - (i32.and - (get_local $$t$0) - (i32.const 32) - ) - ) - (set_local $$tobool63$i - (i32.eq - (get_local $$and62$i) - (i32.const 0) - ) - ) - (set_local $$add$ptr65$i - (i32.add - (get_local $$prefix$0$i) - (i32.const 9) - ) - ) - (set_local $$prefix$0$add$ptr65$i - (if - (get_local $$tobool63$i) - (get_local $$prefix$0$i) - (get_local $$add$ptr65$i) - ) - ) - (set_local $$add67$i - (i32.or - (get_local $$pl$0$i) - (i32.const 2) - ) - ) - (set_local $$196 - (i32.gt_u - (get_local $$p$0) - (i32.const 11) - ) - ) - (set_local $$sub74$i - (i32.sub - (i32.const 12) - (get_local $$p$0) - ) - ) - (set_local $$tobool76552$i - (i32.eq - (get_local $$sub74$i) - (i32.const 0) - ) - ) - (set_local $$tobool76$i - (i32.or - (get_local $$196) - (get_local $$tobool76552$i) - ) - ) - (block $do-once$58 - (if - (get_local $$tobool76$i) - (set_local $$y$addr$1$i - (get_local $$mul$i$240) - ) - (block - (set_local $$re$1482$i - (get_local $$sub74$i) - ) - (set_local $$round$0481$i - (f64.const 8) - ) - (loop $while-out$60 $while-in$61 - (set_local $$dec78$i - (i32.add - (get_local $$re$1482$i) - (i32.const -1) - ) - ) - (set_local $$mul80$i - (f64.mul - (get_local $$round$0481$i) - (f64.const 16) - ) - ) - (set_local $$tobool79$i - (i32.eq - (get_local $$dec78$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool79$i) - (block - (set_local $$mul80$i$lcssa - (get_local $$mul80$i) - ) - (br $while-out$60) - ) - (block - (set_local $$re$1482$i - (get_local $$dec78$i) - ) - (set_local $$round$0481$i - (get_local $$mul80$i) - ) - ) - ) - (br $while-in$61) - ) - (set_local $$197 - (i32.load8_s - (get_local $$prefix$0$add$ptr65$i) - ) - ) - (set_local $$cmp82$i - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$197) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 45) - ) - ) - (if - (get_local $$cmp82$i) - (block - (set_local $$sub85$i - (f64.neg - (get_local $$mul$i$240) - ) - ) - (set_local $$sub86$i - (f64.sub - (get_local $$sub85$i) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$add87$i - (f64.add - (get_local $$mul80$i$lcssa) - (get_local $$sub86$i) - ) - ) - (set_local $$sub88$i - (f64.neg - (get_local $$add87$i) - ) - ) - (set_local $$y$addr$1$i - (get_local $$sub88$i) - ) - (br $do-once$58) - ) - (block - (set_local $$add90$i - (f64.add - (get_local $$mul$i$240) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$sub91$i - (f64.sub - (get_local $$add90$i) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$y$addr$1$i - (get_local $$sub91$i) - ) - (br $do-once$58) - ) - ) - ) - ) - ) - (set_local $$198 - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$cmp94$i - (i32.lt_s - (get_local $$198) - (i32.const 0) - ) - ) - (set_local $$sub97$i - (i32.sub - (i32.const 0) - (get_local $$198) - ) - ) - (set_local $$cond100$i - (if - (get_local $$cmp94$i) - (get_local $$sub97$i) - (get_local $$198) - ) - ) - (set_local $$199 - (i32.lt_s - (get_local $$cond100$i) - (i32.const 0) - ) - ) - (set_local $$200 - (i32.shr_s - (i32.shl - (get_local $$199) - (i32.const 31) - ) - (i32.const 31) - ) - ) - (set_local $$201 - (call $_fmt_u - (get_local $$cond100$i) - (get_local $$200) - (get_local $$arrayidx$i$236) - ) - ) - (set_local $$cmp103$i - (i32.eq - (get_local $$201) - (get_local $$arrayidx$i$236) - ) - ) - (if - (get_local $$cmp103$i) - (block - (i32.store8 - (get_local $$incdec$ptr106$i) - (i32.const 48) - ) - (set_local $$estr$0$i - (get_local $$incdec$ptr106$i) - ) - ) - (set_local $$estr$0$i - (get_local $$201) - ) - ) - (set_local $$202 - (i32.shr_s - (get_local $$198) - (i32.const 31) - ) - ) - (set_local $$203 - (i32.and - (get_local $$202) - (i32.const 2) - ) - ) - (set_local $$204 - (i32.add - (get_local $$203) - (i32.const 43) - ) - ) - (set_local $$conv111$i - (i32.and - (get_local $$204) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr112$i - (i32.add - (get_local $$estr$0$i) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr112$i) - (get_local $$conv111$i) - ) - (set_local $$add113$i - (i32.add - (get_local $$t$0) - (i32.const 15) - ) - ) - (set_local $$conv114$i - (i32.and - (get_local $$add113$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr115$i - (i32.add - (get_local $$estr$0$i) - (i32.const -2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr115$i) - (get_local $$conv114$i) - ) - (set_local $$notrhs$i - (i32.lt_s - (get_local $$p$0) - (i32.const 1) - ) - ) - (set_local $$and134$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) - ) - ) - (set_local $$tobool135$i - (i32.eq - (get_local $$and134$i) - (i32.const 0) - ) - ) - (set_local $$s$0$i - (get_local $$buf$i) - ) - (set_local $$y$addr$2$i - (get_local $$y$addr$1$i) - ) - (loop $while-out$62 $while-in$63 - (set_local $$conv116$i - (i32.trunc_s/f64 - (get_local $$y$addr$2$i) - ) - ) - (set_local $$arrayidx117$i - (i32.add - (i32.const 4075) - (get_local $$conv116$i) - ) - ) - (set_local $$205 - (i32.load8_s - (get_local $$arrayidx117$i) - ) - ) - (set_local $$conv118$393$i - (i32.and - (get_local $$205) - (i32.const 255) - ) - ) - (set_local $$or120$i - (i32.or - (get_local $$conv118$393$i) - (get_local $$and62$i) - ) - ) - (set_local $$conv121$i - (i32.and - (get_local $$or120$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr122$i - (i32.add - (get_local $$s$0$i) - (i32.const 1) - ) - ) - (i32.store8 - (get_local $$s$0$i) - (get_local $$conv121$i) - ) - (set_local $$conv123$i - (f64.convert_s/i32 - (get_local $$conv116$i) - ) - ) - (set_local $$sub124$i - (f64.sub - (get_local $$y$addr$2$i) - (get_local $$conv123$i) - ) - ) - (set_local $$mul125$i - (f64.mul - (get_local $$sub124$i) - (f64.const 16) - ) - ) - (set_local $$sub$ptr$lhs$cast$i - (get_local $$incdec$ptr122$i) - ) - (set_local $$sub$ptr$sub$i - (i32.sub - (get_local $$sub$ptr$lhs$cast$i) - (get_local $$sub$ptr$rhs$cast$i) - ) - ) - (set_local $$cmp127$i - (i32.eq - (get_local $$sub$ptr$sub$i) - (i32.const 1) - ) - ) - (block $do-once$64 - (if - (get_local $$cmp127$i) - (block - (set_local $$notlhs$i - (f64.eq - (get_local $$mul125$i) - (f64.const 0) - ) - ) - (set_local $$or$cond1$not$i - (i32.and - (get_local $$notrhs$i) - (get_local $$notlhs$i) - ) - ) - (set_local $$or$cond$i - (i32.and - (get_local $$tobool135$i) - (get_local $$or$cond1$not$i) - ) - ) - (if - (get_local $$or$cond$i) - (block - (set_local $$s$1$i - (get_local $$incdec$ptr122$i) - ) - (br $do-once$64) - ) - ) - (set_local $$incdec$ptr137$i - (i32.add - (get_local $$s$0$i) - (i32.const 2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr122$i) - (i32.const 46) - ) - (set_local $$s$1$i - (get_local $$incdec$ptr137$i) - ) - ) - (set_local $$s$1$i - (get_local $$incdec$ptr122$i) - ) - ) - ) - (set_local $$tobool139$i - (f64.ne - (get_local $$mul125$i) - (f64.const 0) - ) - ) - (if - (get_local $$tobool139$i) - (block - (set_local $$s$0$i - (get_local $$s$1$i) - ) - (set_local $$y$addr$2$i - (get_local $$mul125$i) - ) - ) - (block - (set_local $$s$1$i$lcssa - (get_local $$s$1$i) - ) - (br $while-out$62) - ) - ) - (br $while-in$63) - ) - (set_local $$tobool140$i - (i32.ne - (get_local $$p$0) - (i32.const 0) - ) - ) - (set_local $$$pre566$i - (get_local $$s$1$i$lcssa) - ) - (set_local $$sub146$i - (i32.add - (get_local $$sub$ptr$sub145$i) - (get_local $$$pre566$i) - ) - ) - (set_local $$cmp147$i - (i32.lt_s - (get_local $$sub146$i) - (get_local $$p$0) - ) - ) - (set_local $$or$cond384 - (i32.and - (get_local $$tobool140$i) - (get_local $$cmp147$i) - ) - ) - (set_local $$sub$ptr$rhs$cast152$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$add150$i - (i32.add - (get_local $$sub$ptr$sub153$i) - (get_local $$p$0) - ) - ) - (set_local $$add154$i - (i32.sub - (get_local $$add150$i) - (get_local $$sub$ptr$rhs$cast152$i) - ) - ) - (set_local $$sub$ptr$rhs$cast161$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$sub$ptr$sub162$i - (i32.sub - (get_local $$sub$ptr$sub159$i) - (get_local $$sub$ptr$rhs$cast161$i) - ) - ) - (set_local $$add163$i - (i32.add - (get_local $$sub$ptr$sub162$i) - (get_local $$$pre566$i) - ) - ) - (set_local $$l$0$i - (if - (get_local $$or$cond384) - (get_local $$add154$i) - (get_local $$add163$i) - ) - ) - (set_local $$add165$i - (i32.add - (get_local $$l$0$i) - (get_local $$add67$i) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$fl$1$and219) - ) - (set_local $$206 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$418$i - (i32.and - (get_local $$206) - (i32.const 32) - ) - ) - (set_local $$tobool$i$419$i - (i32.eq - (get_local $$and$i$418$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$419$i) - (call $___fwritex - (get_local $$prefix$0$add$ptr65$i) - (get_local $$add67$i) - (get_local $$f) - ) - ) - (set_local $$xor167$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 65536) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$xor167$i) - ) - (set_local $$sub$ptr$sub172$i - (i32.sub - (get_local $$$pre566$i) - (get_local $$sub$ptr$rhs$cast$i) - ) - ) - (set_local $$207 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$424$i - (i32.and - (get_local $$207) - (i32.const 32) - ) - ) - (set_local $$tobool$i$425$i - (i32.eq - (get_local $$and$i$424$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$425$i) - (call $___fwritex - (get_local $$buf$i) - (get_local $$sub$ptr$sub172$i) - (get_local $$f) - ) - ) - (set_local $$sub$ptr$rhs$cast174$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$sub$ptr$sub175$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast174$i) - ) - ) - (set_local $$sum - (i32.add - (get_local $$sub$ptr$sub172$i) - (get_local $$sub$ptr$sub175$i) - ) - ) - (set_local $$sub181$i - (i32.sub - (get_local $$l$0$i) - (get_local $$sum) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$sub181$i) - (i32.const 0) - (i32.const 0) - ) - (set_local $$208 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$430$i - (i32.and - (get_local $$208) - (i32.const 32) - ) - ) - (set_local $$tobool$i$431$i - (i32.eq - (get_local $$and$i$430$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$431$i) - (call $___fwritex - (get_local $$incdec$ptr115$i) - (get_local $$sub$ptr$sub175$i) - (get_local $$f) - ) - ) - (set_local $$xor186$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$xor186$i) - ) - (set_local $$cmp188$i - (i32.lt_s - (get_local $$add165$i) - (get_local $$w$1) - ) - ) - (set_local $$w$add165$i - (if - (get_local $$cmp188$i) - (get_local $$w$1) - (get_local $$add165$i) + (get_local $$call344) + ) + ) + (set_local $$call345 + (call $_strerror + (get_local $$168) + ) + ) + (set_local $$a$1 + (get_local $$call345) + ) + (set_local $label + (i32.const 82) + ) + (br $switch$24) + ) + ) + (block + (set_local $$169 + (i32.load + (get_local $$arg) + ) + ) + (set_local $$tobool349 + (i32.ne + (get_local $$169) + (i32.const 0) + ) + ) + (set_local $$cond354 + (if + (get_local $$tobool349) + (get_local $$169) + (i32.const 4101) + ) + ) + (set_local $$a$1 + (get_local $$cond354) + ) + (set_local $label + (i32.const 82) + ) + (br $switch$24) + ) + ) + (block + (set_local $$170 + (get_local $$arg) + ) + (set_local $$171 + (get_local $$170) + ) + (set_local $$172 + (i32.load + (get_local $$171) + ) + ) + (set_local $$173 + (i32.add + (get_local $$170) + (i32.const 4) + ) + ) + (set_local $$174 + (get_local $$173) + ) + (set_local $$175 + (i32.load + (get_local $$174) + ) + ) + (i32.store + (get_local $$wc) + (get_local $$172) + ) + (i32.store + (get_local $$arrayidx370) + (i32.const 0) + ) + (i32.store + (get_local $$arg) + (get_local $$wc) + ) + (set_local $$p$4365 + (i32.const -1) + ) + (set_local $label + (i32.const 86) + ) + (br $switch$24) + ) + ) + (block + (set_local $$cmp377$314 + (i32.eq + (get_local $$p$0) + (i32.const 0) + ) + ) + (if + (get_local $$cmp377$314) + (block + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (i32.const 0) + (get_local $$fl$1$and219) + ) + (set_local $$i$0$lcssa368 + (i32.const 0) + ) + (set_local $label + (i32.const 98) + ) + ) + (block + (set_local $$p$4365 + (get_local $$p$0) + ) + (set_local $label + (i32.const 86) + ) + ) + ) + (br $switch$24) + ) + ) + (nop) ) + (nop) ) - (set_local $$retval$0$i - (get_local $$w$add165$i) - ) - (br $do-once$56) + (nop) ) + (nop) ) - (set_local $$cmp196$i - (i32.lt_s - (get_local $$p$0) - (i32.const 0) + (nop) + ) + (nop) + ) + (nop) + ) + (block + (set_local $$181 + (f64.load + (get_local $$arg) + ) + ) + (i32.store + (get_local $$e2$i) + (i32.const 0) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $$181) + ) + (set_local $$182 + (i32.load + (i32.load + (i32.const 24) + ) + ) + ) + (set_local $$183 + (i32.load + (i32.add + (i32.load + (i32.const 24) ) + (i32.const 4) ) - (set_local $$$p$i - (if - (get_local $$cmp196$i) - (i32.const 6) - (get_local $$p$0) + ) + ) + (set_local $$184 + (i32.lt_s + (get_local $$183) + (i32.const 0) + ) + ) + (if + (get_local $$184) + (block + (set_local $$sub$i + (f64.neg + (get_local $$181) + ) + ) + (set_local $$pl$0$i + (i32.const 1) + ) + (set_local $$prefix$0$i + (i32.const 4108) + ) + (set_local $$y$addr$0$i + (get_local $$sub$i) + ) + ) + (block + (set_local $$and$i$238 + (i32.and + (get_local $$fl$1$and219) + (i32.const 2048) + ) + ) + (set_local $$tobool9$i + (i32.eq + (get_local $$and$i$238) + (i32.const 0) ) ) (if - (get_local $$tobool56$i) + (get_local $$tobool9$i) (block - (set_local $$mul202$i - (f64.mul - (get_local $$mul$i$240) - (f64.const 268435456) + (set_local $$and12$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 1) ) ) - (set_local $$209 - (i32.load - (get_local $$e2$i) + (set_local $$tobool13$i + (i32.eq + (get_local $$and12$i) + (i32.const 0) ) ) - (set_local $$sub203$i - (i32.add - (get_local $$209) - (i32.const -28) + (set_local $$$$i + (if + (get_local $$tobool13$i) + (i32.const 4109) + (i32.const 4114) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$sub203$i) + (set_local $$pl$0$i + (get_local $$and12$i) ) - (set_local $$210 - (get_local $$sub203$i) + (set_local $$prefix$0$i + (get_local $$$$i) ) - (set_local $$y$addr$3$i - (get_local $$mul202$i) + (set_local $$y$addr$0$i + (get_local $$181) ) ) (block - (set_local $$$pre564$i - (i32.load - (get_local $$e2$i) - ) + (set_local $$pl$0$i + (i32.const 1) ) - (set_local $$210 - (get_local $$$pre564$i) + (set_local $$prefix$0$i + (i32.const 4111) ) - (set_local $$y$addr$3$i - (get_local $$mul$i$240) + (set_local $$y$addr$0$i + (get_local $$181) ) ) ) - (set_local $$cmp205$i - (i32.lt_s - (get_local $$210) - (i32.const 0) - ) + ) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $$y$addr$0$i) + ) + (set_local $$185 + (i32.load + (i32.load + (i32.const 24) ) - (set_local $$arraydecay208$add$ptr213$i - (if - (get_local $$cmp205$i) - (get_local $$big$i) - (get_local $$add$ptr213$i) + ) + ) + (set_local $$186 + (i32.load + (i32.add + (i32.load + (i32.const 24) ) + (i32.const 4) ) - (set_local $$sub$ptr$rhs$cast345$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (set_local $$y$addr$4$i - (get_local $$y$addr$3$i) - ) - (set_local $$z$0$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (loop $while-out$66 $while-in$67 - (set_local $$conv216$i - (i32.trunc_s/f64 - (get_local $$y$addr$4$i) - ) - ) - (i32.store - (get_local $$z$0$i) - (get_local $$conv216$i) - ) - (set_local $$incdec$ptr217$i - (i32.add - (get_local $$z$0$i) - (i32.const 4) - ) - ) - (set_local $$conv218$i - (f64.convert_u/i32 - (get_local $$conv216$i) - ) - ) - (set_local $$sub219$i - (f64.sub - (get_local $$y$addr$4$i) - (get_local $$conv218$i) + ) + ) + (set_local $$187 + (i32.and + (get_local $$186) + (i32.const 2146435072) + ) + ) + (set_local $$188 + (i32.lt_u + (get_local $$187) + (i32.const 2146435072) + ) + ) + (set_local $$189 + (i32.lt_s + (i32.const 0) + (i32.const 0) + ) + ) + (set_local $$190 + (i32.eq + (get_local $$187) + (i32.const 2146435072) + ) + ) + (set_local $$191 + (i32.and + (get_local $$190) + (get_local $$189) + ) + ) + (set_local $$192 + (i32.or + (get_local $$188) + (get_local $$191) + ) + ) + (block $do-once$56 + (if + (get_local $$192) + (block + (set_local $$call55$i + (call $_frexpl + (get_local $$y$addr$0$i) + (get_local $$e2$i) ) ) - (set_local $$mul220$i + (set_local $$mul$i$240 (f64.mul - (get_local $$sub219$i) - (f64.const 1e9) + (get_local $$call55$i) + (f64.const 2) ) ) - (set_local $$tobool222$i + (set_local $$tobool56$i (f64.ne - (get_local $$mul220$i) + (get_local $$mul$i$240) (f64.const 0) ) ) (if - (get_local $$tobool222$i) + (get_local $$tobool56$i) (block - (set_local $$y$addr$4$i - (get_local $$mul220$i) + (set_local $$195 + (i32.load + (get_local $$e2$i) + ) ) - (set_local $$z$0$i - (get_local $$incdec$ptr217$i) + (set_local $$dec$i + (i32.add + (get_local $$195) + (i32.const -1) + ) ) - ) - (block - (set_local $$incdec$ptr217$i$lcssa - (get_local $$incdec$ptr217$i) + (i32.store + (get_local $$e2$i) + (get_local $$dec$i) ) - (br $while-out$66) ) ) - (br $while-in$67) - ) - (set_local $$$pr$i - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$cmp225$547$i - (i32.gt_s - (get_local $$$pr$i) - (i32.const 0) - ) - ) - (if - (get_local $$cmp225$547$i) - (block - (set_local $$211 - (get_local $$$pr$i) - ) - (set_local $$a$1549$i - (get_local $$arraydecay208$add$ptr213$i) + (set_local $$or$i$241 + (i32.or + (get_local $$t$0) + (i32.const 32) ) - (set_local $$z$1548$i - (get_local $$incdec$ptr217$i$lcssa) + ) + (set_local $$cmp59$i + (i32.eq + (get_local $$or$i$241) + (i32.const 97) ) - (loop $while-out$68 $while-in$69 - (set_local $$cmp228$i - (i32.gt_s - (get_local $$211) - (i32.const 29) + ) + (if + (get_local $$cmp59$i) + (block + (set_local $$and62$i + (i32.and + (get_local $$t$0) + (i32.const 32) ) ) - (set_local $$cond233$i - (if - (get_local $$cmp228$i) - (i32.const 29) - (get_local $$211) + (set_local $$tobool63$i + (i32.eq + (get_local $$and62$i) + (i32.const 0) ) ) - (set_local $$d$0$542$i + (set_local $$add$ptr65$i (i32.add - (get_local $$z$1548$i) - (i32.const -4) + (get_local $$prefix$0$i) + (i32.const 9) ) ) - (set_local $$cmp235$543$i - (i32.lt_u - (get_local $$d$0$542$i) - (get_local $$a$1549$i) + (set_local $$prefix$0$add$ptr65$i + (if + (get_local $$tobool63$i) + (get_local $$prefix$0$i) + (get_local $$add$ptr65$i) + ) + ) + (set_local $$add67$i + (i32.or + (get_local $$pl$0$i) + (i32.const 2) ) ) - (block $do-once$70 + (set_local $$196 + (i32.gt_u + (get_local $$p$0) + (i32.const 11) + ) + ) + (set_local $$sub74$i + (i32.sub + (i32.const 12) + (get_local $$p$0) + ) + ) + (set_local $$tobool76552$i + (i32.eq + (get_local $$sub74$i) + (i32.const 0) + ) + ) + (set_local $$tobool76$i + (i32.or + (get_local $$196) + (get_local $$tobool76552$i) + ) + ) + (block $do-once$58 (if - (get_local $$cmp235$543$i) - (set_local $$a$2$ph$i - (get_local $$a$1549$i) + (get_local $$tobool76$i) + (set_local $$y$addr$1$i + (get_local $$mul$i$240) ) (block - (set_local $$carry$0544$i - (i32.const 0) + (set_local $$re$1482$i + (get_local $$sub74$i) ) - (set_local $$d$0545$i - (get_local $$d$0$542$i) + (set_local $$round$0481$i + (f64.const 8) ) - (loop $while-out$72 $while-in$73 - (set_local $$212 - (i32.load - (get_local $$d$0545$i) + (loop $while-in$61 + (block $while-out$60 + (set_local $$dec78$i + (i32.add + (get_local $$re$1482$i) + (i32.const -1) + ) ) - ) - (set_local $$213 - (call $_bitshift64Shl - (get_local $$212) - (i32.const 0) - (get_local $$cond233$i) + (set_local $$mul80$i + (f64.mul + (get_local $$round$0481$i) + (f64.const 16) + ) ) - ) - (set_local $$214 - (i32.load - (i32.const 168) + (set_local $$tobool79$i + (i32.eq + (get_local $$dec78$i) + (i32.const 0) + ) ) - ) - (set_local $$215 - (call $_i64Add - (get_local $$213) - (get_local $$214) - (get_local $$carry$0544$i) - (i32.const 0) + (if + (get_local $$tobool79$i) + (block + (set_local $$mul80$i$lcssa + (get_local $$mul80$i) + ) + (br $while-out$60) + ) + (block + (set_local $$re$1482$i + (get_local $$dec78$i) + ) + (set_local $$round$0481$i + (get_local $$mul80$i) + ) + ) ) + (br $while-in$61) ) - (set_local $$216 - (i32.load - (i32.const 168) - ) + ) + (set_local $$197 + (i32.load8_s + (get_local $$prefix$0$add$ptr65$i) ) - (set_local $$217 - (call $___uremdi3 - (get_local $$215) - (get_local $$216) - (i32.const 1000000000) - (i32.const 0) + ) + (set_local $$cmp82$i + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$197) + (i32.const 24) + ) + (i32.const 24) ) + (i32.const 45) ) - (set_local $$218 - (i32.load - (i32.const 168) + ) + (if + (get_local $$cmp82$i) + (block + (set_local $$sub85$i + (f64.neg + (get_local $$mul$i$240) + ) ) - ) - (i32.store - (get_local $$d$0545$i) - (get_local $$217) - ) - (set_local $$219 - (call $___udivdi3 - (get_local $$215) - (get_local $$216) - (i32.const 1000000000) - (i32.const 0) + (set_local $$sub86$i + (f64.sub + (get_local $$sub85$i) + (get_local $$mul80$i$lcssa) + ) ) - ) - (set_local $$220 - (i32.load - (i32.const 168) + (set_local $$add87$i + (f64.add + (get_local $$mul80$i$lcssa) + (get_local $$sub86$i) + ) ) - ) - (set_local $$d$0$i - (i32.add - (get_local $$d$0545$i) - (i32.const -4) + (set_local $$sub88$i + (f64.neg + (get_local $$add87$i) + ) ) - ) - (set_local $$cmp235$i - (i32.lt_u - (get_local $$d$0$i) - (get_local $$a$1549$i) + (set_local $$y$addr$1$i + (get_local $$sub88$i) ) + (br $do-once$58) ) - (if - (get_local $$cmp235$i) - (block - (set_local $$conv242$i$lcssa - (get_local $$219) + (block + (set_local $$add90$i + (f64.add + (get_local $$mul$i$240) + (get_local $$mul80$i$lcssa) ) - (br $while-out$72) ) - (block - (set_local $$carry$0544$i - (get_local $$219) - ) - (set_local $$d$0545$i - (get_local $$d$0$i) + (set_local $$sub91$i + (f64.sub + (get_local $$add90$i) + (get_local $$mul80$i$lcssa) ) ) - ) - (br $while-in$73) - ) - (set_local $$tobool244$i - (i32.eq - (get_local $$conv242$i$lcssa) - (i32.const 0) - ) - ) - (if - (get_local $$tobool244$i) - (block - (set_local $$a$2$ph$i - (get_local $$a$1549$i) + (set_local $$y$addr$1$i + (get_local $$sub91$i) ) - (br $do-once$70) - ) - ) - (set_local $$incdec$ptr246$i - (i32.add - (get_local $$a$1549$i) - (i32.const -4) + (br $do-once$58) ) ) - (i32.store - (get_local $$incdec$ptr246$i) - (get_local $$conv242$i$lcssa) - ) - (set_local $$a$2$ph$i - (get_local $$incdec$ptr246$i) - ) ) ) ) - (set_local $$z$2$i - (get_local $$z$1548$i) - ) - (loop $while-out$74 $while-in$75 - (set_local $$cmp249$i - (i32.gt_u - (get_local $$z$2$i) - (get_local $$a$2$ph$i) - ) - ) - (if - (i32.eqz - (get_local $$cmp249$i) - ) - (block - (set_local $$z$2$i$lcssa - (get_local $$z$2$i) - ) - (br $while-out$74) - ) - ) - (set_local $$arrayidx251$i - (i32.add - (get_local $$z$2$i) - (i32.const -4) - ) + (set_local $$198 + (i32.load + (get_local $$e2$i) ) - (set_local $$221 - (i32.load - (get_local $$arrayidx251$i) - ) + ) + (set_local $$cmp94$i + (i32.lt_s + (get_local $$198) + (i32.const 0) ) - (set_local $$lnot$i - (i32.eq - (get_local $$221) - (i32.const 0) - ) + ) + (set_local $$sub97$i + (i32.sub + (i32.const 0) + (get_local $$198) ) + ) + (set_local $$cond100$i (if - (get_local $$lnot$i) - (set_local $$z$2$i - (get_local $$arrayidx251$i) - ) - (block - (set_local $$z$2$i$lcssa - (get_local $$z$2$i) - ) - (br $while-out$74) - ) + (get_local $$cmp94$i) + (get_local $$sub97$i) + (get_local $$198) ) - (br $while-in$75) ) - (set_local $$222 - (i32.load - (get_local $$e2$i) + (set_local $$199 + (i32.lt_s + (get_local $$cond100$i) + (i32.const 0) ) ) - (set_local $$sub256$i - (i32.sub - (get_local $$222) - (get_local $$cond233$i) + (set_local $$200 + (i32.shr_s + (i32.shl + (get_local $$199) + (i32.const 31) + ) + (i32.const 31) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$sub256$i) + (set_local $$201 + (call $_fmt_u + (get_local $$cond100$i) + (get_local $$200) + (get_local $$arrayidx$i$236) + ) ) - (set_local $$cmp225$i - (i32.gt_s - (get_local $$sub256$i) - (i32.const 0) + (set_local $$cmp103$i + (i32.eq + (get_local $$201) + (get_local $$arrayidx$i$236) ) ) (if - (get_local $$cmp225$i) + (get_local $$cmp103$i) (block - (set_local $$211 - (get_local $$sub256$i) - ) - (set_local $$a$1549$i - (get_local $$a$2$ph$i) + (i32.store8 + (get_local $$incdec$ptr106$i) + (i32.const 48) ) - (set_local $$z$1548$i - (get_local $$z$2$i$lcssa) + (set_local $$estr$0$i + (get_local $$incdec$ptr106$i) ) ) - (block - (set_local $$$pr477$i - (get_local $$sub256$i) - ) - (set_local $$a$1$lcssa$i - (get_local $$a$2$ph$i) - ) - (set_local $$z$1$lcssa$i - (get_local $$z$2$i$lcssa) - ) - (br $while-out$68) + (set_local $$estr$0$i + (get_local $$201) ) ) - (br $while-in$69) - ) - ) - (block - (set_local $$$pr477$i - (get_local $$$pr$i) - ) - (set_local $$a$1$lcssa$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (set_local $$z$1$lcssa$i - (get_local $$incdec$ptr217$i$lcssa) - ) - ) - ) - (set_local $$cmp259$537$i - (i32.lt_s - (get_local $$$pr477$i) - (i32.const 0) - ) - ) - (if - (get_local $$cmp259$537$i) - (block - (set_local $$add273$i - (i32.add - (get_local $$$p$i) - (i32.const 25) + (set_local $$202 + (i32.shr_s + (get_local $$198) + (i32.const 31) + ) ) - ) - (set_local $$div274$i - (i32.and - (i32.div_s - (get_local $$add273$i) - (i32.const 9) + (set_local $$203 + (i32.and + (get_local $$202) + (i32.const 2) ) - (i32.const -1) ) - ) - (set_local $$add275$i - (i32.add - (get_local $$div274$i) - (i32.const 1) + (set_local $$204 + (i32.add + (get_local $$203) + (i32.const 43) + ) ) - ) - (set_local $$cmp299$i - (i32.eq - (get_local $$or$i$241) - (i32.const 102) + (set_local $$conv111$i + (i32.and + (get_local $$204) + (i32.const 255) + ) ) - ) - (set_local $$223 - (get_local $$$pr477$i) - ) - (set_local $$a$3539$i - (get_local $$a$1$lcssa$i) - ) - (set_local $$z$3538$i - (get_local $$z$1$lcssa$i) - ) - (loop $while-out$76 $while-in$77 - (set_local $$sub264$i - (i32.sub - (i32.const 0) - (get_local $$223) + (set_local $$incdec$ptr112$i + (i32.add + (get_local $$estr$0$i) + (i32.const -1) ) ) - (set_local $$cmp265$i - (i32.gt_s - (get_local $$sub264$i) - (i32.const 9) + (i32.store8 + (get_local $$incdec$ptr112$i) + (get_local $$conv111$i) + ) + (set_local $$add113$i + (i32.add + (get_local $$t$0) + (i32.const 15) ) ) - (set_local $$cond271$i - (if - (get_local $$cmp265$i) - (i32.const 9) - (get_local $$sub264$i) + (set_local $$conv114$i + (i32.and + (get_local $$add113$i) + (i32.const 255) ) ) - (set_local $$cmp277$533$i - (i32.lt_u - (get_local $$a$3539$i) - (get_local $$z$3538$i) + (set_local $$incdec$ptr115$i + (i32.add + (get_local $$estr$0$i) + (i32.const -2) ) ) - (block $do-once$78 - (if - (get_local $$cmp277$533$i) - (block - (set_local $$shl280$i - (i32.shl - (i32.const 1) - (get_local $$cond271$i) - ) + (i32.store8 + (get_local $$incdec$ptr115$i) + (get_local $$conv114$i) + ) + (set_local $$notrhs$i + (i32.lt_s + (get_local $$p$0) + (i32.const 1) + ) + ) + (set_local $$and134$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) + ) + ) + (set_local $$tobool135$i + (i32.eq + (get_local $$and134$i) + (i32.const 0) + ) + ) + (set_local $$s$0$i + (get_local $$buf$i) + ) + (set_local $$y$addr$2$i + (get_local $$y$addr$1$i) + ) + (loop $while-in$63 + (block $while-out$62 + (set_local $$conv116$i + (i32.trunc_s/f64 + (get_local $$y$addr$2$i) + ) + ) + (set_local $$arrayidx117$i + (i32.add + (i32.const 4075) + (get_local $$conv116$i) + ) + ) + (set_local $$205 + (i32.load8_s + (get_local $$arrayidx117$i) + ) + ) + (set_local $$conv118$393$i + (i32.and + (get_local $$205) + (i32.const 255) + ) + ) + (set_local $$or120$i + (i32.or + (get_local $$conv118$393$i) + (get_local $$and62$i) ) - (set_local $$sub281$i - (i32.add - (get_local $$shl280$i) - (i32.const -1) - ) + ) + (set_local $$conv121$i + (i32.and + (get_local $$or120$i) + (i32.const 255) ) - (set_local $$shr285$i - (i32.shr_u - (i32.const 1000000000) - (get_local $$cond271$i) - ) + ) + (set_local $$incdec$ptr122$i + (i32.add + (get_local $$s$0$i) + (i32.const 1) ) - (set_local $$carry262$0535$i - (i32.const 0) + ) + (i32.store8 + (get_local $$s$0$i) + (get_local $$conv121$i) + ) + (set_local $$conv123$i + (f64.convert_s/i32 + (get_local $$conv116$i) ) - (set_local $$d$1534$i - (get_local $$a$3539$i) + ) + (set_local $$sub124$i + (f64.sub + (get_local $$y$addr$2$i) + (get_local $$conv123$i) ) - (loop $while-out$80 $while-in$81 - (set_local $$225 - (i32.load - (get_local $$d$1534$i) - ) - ) - (set_local $$and282$i - (i32.and - (get_local $$225) - (get_local $$sub281$i) - ) - ) - (set_local $$shr283$i - (i32.shr_u - (get_local $$225) - (get_local $$cond271$i) - ) - ) - (set_local $$add284$i - (i32.add - (get_local $$shr283$i) - (get_local $$carry262$0535$i) - ) - ) - (i32.store - (get_local $$d$1534$i) - (get_local $$add284$i) - ) - (set_local $$mul286$i - (i32.mul - (get_local $$and282$i) - (get_local $$shr285$i) - ) - ) - (set_local $$incdec$ptr288$i - (i32.add - (get_local $$d$1534$i) - (i32.const 4) + ) + (set_local $$mul125$i + (f64.mul + (get_local $$sub124$i) + (f64.const 16) + ) + ) + (set_local $$sub$ptr$lhs$cast$i + (get_local $$incdec$ptr122$i) + ) + (set_local $$sub$ptr$sub$i + (i32.sub + (get_local $$sub$ptr$lhs$cast$i) + (get_local $$sub$ptr$rhs$cast$i) + ) + ) + (set_local $$cmp127$i + (i32.eq + (get_local $$sub$ptr$sub$i) + (i32.const 1) + ) + ) + (block $do-once$64 + (if + (get_local $$cmp127$i) + (block + (set_local $$notlhs$i + (f64.eq + (get_local $$mul125$i) + (f64.const 0) + ) ) - ) - (set_local $$cmp277$i - (i32.lt_u - (get_local $$incdec$ptr288$i) - (get_local $$z$3538$i) + (set_local $$or$cond1$not$i + (i32.and + (get_local $$notrhs$i) + (get_local $$notlhs$i) + ) ) - ) - (if - (get_local $$cmp277$i) - (block - (set_local $$carry262$0535$i - (get_local $$mul286$i) + (set_local $$or$cond$i + (i32.and + (get_local $$tobool135$i) + (get_local $$or$cond1$not$i) ) - (set_local $$d$1534$i - (get_local $$incdec$ptr288$i) + ) + (if + (get_local $$or$cond$i) + (block + (set_local $$s$1$i + (get_local $$incdec$ptr122$i) + ) + (br $do-once$64) ) ) - (block - (set_local $$mul286$i$lcssa - (get_local $$mul286$i) + (set_local $$incdec$ptr137$i + (i32.add + (get_local $$s$0$i) + (i32.const 2) ) - (br $while-out$80) ) - ) - (br $while-in$81) - ) - (set_local $$226 - (i32.load - (get_local $$a$3539$i) - ) - ) - (set_local $$tobool290$i - (i32.eq - (get_local $$226) - (i32.const 0) - ) - ) - (set_local $$incdec$ptr292$i - (i32.add - (get_local $$a$3539$i) - (i32.const 4) - ) - ) - (set_local $$incdec$ptr292$a$3$i - (if - (get_local $$tobool290$i) - (get_local $$incdec$ptr292$i) - (get_local $$a$3539$i) - ) - ) - (set_local $$tobool294$i - (i32.eq - (get_local $$mul286$i$lcssa) - (i32.const 0) - ) - ) - (if - (get_local $$tobool294$i) - (block - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$i) + (i32.store8 + (get_local $$incdec$ptr122$i) + (i32.const 46) ) - (set_local $$z$4$i - (get_local $$z$3538$i) + (set_local $$s$1$i + (get_local $$incdec$ptr137$i) ) - (br $do-once$78) ) - ) - (set_local $$incdec$ptr296$i - (i32.add - (get_local $$z$3538$i) - (i32.const 4) + (set_local $$s$1$i + (get_local $$incdec$ptr122$i) ) ) - (i32.store - (get_local $$z$3538$i) - (get_local $$mul286$i$lcssa) - ) - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$i) - ) - (set_local $$z$4$i - (get_local $$incdec$ptr296$i) - ) ) - (block - (set_local $$224 - (i32.load - (get_local $$a$3539$i) - ) + (set_local $$tobool139$i + (f64.ne + (get_local $$mul125$i) + (f64.const 0) ) - (set_local $$tobool290$569$i - (i32.eq - (get_local $$224) - (i32.const 0) + ) + (if + (get_local $$tobool139$i) + (block + (set_local $$s$0$i + (get_local $$s$1$i) ) - ) - (set_local $$incdec$ptr292$570$i - (i32.add - (get_local $$a$3539$i) - (i32.const 4) + (set_local $$y$addr$2$i + (get_local $$mul125$i) ) ) - (set_local $$incdec$ptr292$a$3$571$i - (if - (get_local $$tobool290$569$i) - (get_local $$incdec$ptr292$570$i) - (get_local $$a$3539$i) + (block + (set_local $$s$1$i$lcssa + (get_local $$s$1$i) ) - ) - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$571$i) - ) - (set_local $$z$4$i - (get_local $$z$3538$i) + (br $while-out$62) ) ) + (br $while-in$63) ) ) - (set_local $$cond304$i - (if - (get_local $$cmp299$i) - (get_local $$arraydecay208$add$ptr213$i) - (get_local $$incdec$ptr292$a$3573$i) + (set_local $$tobool140$i + (i32.ne + (get_local $$p$0) + (i32.const 0) + ) + ) + (set_local $$$pre566$i + (get_local $$s$1$i$lcssa) + ) + (set_local $$sub146$i + (i32.add + (get_local $$sub$ptr$sub145$i) + (get_local $$$pre566$i) ) ) - (set_local $$sub$ptr$lhs$cast305$i - (get_local $$z$4$i) + (set_local $$cmp147$i + (i32.lt_s + (get_local $$sub146$i) + (get_local $$p$0) + ) ) - (set_local $$sub$ptr$rhs$cast306$i - (get_local $$cond304$i) + (set_local $$or$cond384 + (i32.and + (get_local $$tobool140$i) + (get_local $$cmp147$i) + ) ) - (set_local $$sub$ptr$sub307$i - (i32.sub - (get_local $$sub$ptr$lhs$cast305$i) - (get_local $$sub$ptr$rhs$cast306$i) + (set_local $$sub$ptr$rhs$cast152$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$add150$i + (i32.add + (get_local $$sub$ptr$sub153$i) + (get_local $$p$0) ) ) - (set_local $$sub$ptr$div$i - (i32.shr_s - (get_local $$sub$ptr$sub307$i) - (i32.const 2) + (set_local $$add154$i + (i32.sub + (get_local $$add150$i) + (get_local $$sub$ptr$rhs$cast152$i) ) ) - (set_local $$cmp308$i - (i32.gt_s - (get_local $$sub$ptr$div$i) - (get_local $$add275$i) + (set_local $$sub$ptr$rhs$cast161$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$sub$ptr$sub162$i + (i32.sub + (get_local $$sub$ptr$sub159$i) + (get_local $$sub$ptr$rhs$cast161$i) ) ) - (set_local $$add$ptr311$i + (set_local $$add163$i (i32.add - (get_local $$cond304$i) - (i32.shl - (get_local $$add275$i) - (i32.const 2) - ) + (get_local $$sub$ptr$sub162$i) + (get_local $$$pre566$i) ) ) - (set_local $$add$ptr311$z$4$i + (set_local $$l$0$i (if - (get_local $$cmp308$i) - (get_local $$add$ptr311$i) - (get_local $$z$4$i) + (get_local $$or$cond384) + (get_local $$add154$i) + (get_local $$add163$i) ) ) - (set_local $$227 + (set_local $$add165$i + (i32.add + (get_local $$l$0$i) + (get_local $$add67$i) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$fl$1$and219) + ) + (set_local $$206 (i32.load - (get_local $$e2$i) + (get_local $$f) + ) + ) + (set_local $$and$i$418$i + (i32.and + (get_local $$206) + (i32.const 32) + ) + ) + (set_local $$tobool$i$419$i + (i32.eq + (get_local $$and$i$418$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$419$i) + (call $___fwritex + (get_local $$prefix$0$add$ptr65$i) + (get_local $$add67$i) + (get_local $$f) + ) + ) + (set_local $$xor167$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$xor167$i) + ) + (set_local $$sub$ptr$sub172$i + (i32.sub + (get_local $$$pre566$i) + (get_local $$sub$ptr$rhs$cast$i) + ) + ) + (set_local $$207 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$424$i + (i32.and + (get_local $$207) + (i32.const 32) + ) + ) + (set_local $$tobool$i$425$i + (i32.eq + (get_local $$and$i$424$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$425$i) + (call $___fwritex + (get_local $$buf$i) + (get_local $$sub$ptr$sub172$i) + (get_local $$f) + ) + ) + (set_local $$sub$ptr$rhs$cast174$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$sub$ptr$sub175$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast174$i) ) ) - (set_local $$add313$i + (set_local $$sum (i32.add - (get_local $$227) - (get_local $$cond271$i) + (get_local $$sub$ptr$sub172$i) + (get_local $$sub$ptr$sub175$i) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$add313$i) + (set_local $$sub181$i + (i32.sub + (get_local $$l$0$i) + (get_local $$sum) + ) ) - (set_local $$cmp259$i - (i32.lt_s - (get_local $$add313$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$sub181$i) + (i32.const 0) + (i32.const 0) + ) + (set_local $$208 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$430$i + (i32.and + (get_local $$208) + (i32.const 32) + ) + ) + (set_local $$tobool$i$431$i + (i32.eq + (get_local $$and$i$430$i) (i32.const 0) ) ) (if - (get_local $$cmp259$i) - (block - (set_local $$223 - (get_local $$add313$i) - ) - (set_local $$a$3539$i - (get_local $$incdec$ptr292$a$3573$i) - ) - (set_local $$z$3538$i - (get_local $$add$ptr311$z$4$i) - ) + (get_local $$tobool$i$431$i) + (call $___fwritex + (get_local $$incdec$ptr115$i) + (get_local $$sub$ptr$sub175$i) + (get_local $$f) ) - (block - (set_local $$a$3$lcssa$i - (get_local $$incdec$ptr292$a$3573$i) - ) - (set_local $$z$3$lcssa$i - (get_local $$add$ptr311$z$4$i) - ) - (br $while-out$76) + ) + (set_local $$xor186$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) ) ) - (br $while-in$77) - ) - ) - (block - (set_local $$a$3$lcssa$i - (get_local $$a$1$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$xor186$i) + ) + (set_local $$cmp188$i + (i32.lt_s + (get_local $$add165$i) + (get_local $$w$1) + ) + ) + (set_local $$w$add165$i + (if + (get_local $$cmp188$i) + (get_local $$w$1) + (get_local $$add165$i) + ) + ) + (set_local $$retval$0$i + (get_local $$w$add165$i) + ) + (br $do-once$56) ) - (set_local $$z$3$lcssa$i - (get_local $$z$1$lcssa$i) + ) + (set_local $$cmp196$i + (i32.lt_s + (get_local $$p$0) + (i32.const 0) ) ) - ) - (set_local $$cmp315$i - (i32.lt_u - (get_local $$a$3$lcssa$i) - (get_local $$z$3$lcssa$i) + (set_local $$$p$i + (if + (get_local $$cmp196$i) + (i32.const 6) + (get_local $$p$0) + ) ) - ) - (block $do-once$82 (if - (get_local $$cmp315$i) + (get_local $$tobool56$i) (block - (set_local $$sub$ptr$rhs$cast319$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$sub$ptr$sub320$i - (i32.sub - (get_local $$sub$ptr$rhs$cast345$i) - (get_local $$sub$ptr$rhs$cast319$i) + (set_local $$mul202$i + (f64.mul + (get_local $$mul$i$240) + (f64.const 268435456) ) ) - (set_local $$sub$ptr$div321$i - (i32.shr_s - (get_local $$sub$ptr$sub320$i) - (i32.const 2) + (set_local $$209 + (i32.load + (get_local $$e2$i) ) ) - (set_local $$mul322$i - (i32.mul - (get_local $$sub$ptr$div321$i) - (i32.const 9) + (set_local $$sub203$i + (i32.add + (get_local $$209) + (i32.const -28) ) ) - (set_local $$228 - (i32.load - (get_local $$a$3$lcssa$i) - ) + (i32.store + (get_local $$e2$i) + (get_local $$sub203$i) ) - (set_local $$cmp324$529$i - (i32.lt_u - (get_local $$228) - (i32.const 10) - ) + (set_local $$210 + (get_local $$sub203$i) ) - (if - (get_local $$cmp324$529$i) - (block - (set_local $$e$1$i - (get_local $$mul322$i) - ) - (br $do-once$82) - ) - (block - (set_local $$e$0531$i - (get_local $$mul322$i) - ) - (set_local $$i$0530$i - (i32.const 10) - ) - ) + (set_local $$y$addr$3$i + (get_local $$mul202$i) ) - (loop $while-out$84 $while-in$85 - (set_local $$mul328$i - (i32.mul - (get_local $$i$0530$i) - (i32.const 10) - ) - ) - (set_local $$inc$i - (i32.add - (get_local $$e$0531$i) - (i32.const 1) - ) - ) - (set_local $$cmp324$i - (i32.lt_u - (get_local $$228) - (get_local $$mul328$i) - ) - ) - (if - (get_local $$cmp324$i) - (block - (set_local $$e$1$i - (get_local $$inc$i) - ) - (br $while-out$84) - ) - (block - (set_local $$e$0531$i - (get_local $$inc$i) - ) - (set_local $$i$0530$i - (get_local $$mul328$i) - ) - ) + ) + (block + (set_local $$$pre564$i + (i32.load + (get_local $$e2$i) ) - (br $while-in$85) + ) + (set_local $$210 + (get_local $$$pre564$i) + ) + (set_local $$y$addr$3$i + (get_local $$mul$i$240) ) ) - (set_local $$e$1$i + ) + (set_local $$cmp205$i + (i32.lt_s + (get_local $$210) (i32.const 0) ) ) - ) - (set_local $$cmp333$i - (i32.ne - (get_local $$or$i$241) - (i32.const 102) - ) - ) - (set_local $$mul335$i - (if - (get_local $$cmp333$i) - (get_local $$e$1$i) - (i32.const 0) - ) - ) - (set_local $$sub336$i - (i32.sub - (get_local $$$p$i) - (get_local $$mul335$i) - ) - ) - (set_local $$cmp338$i - (i32.eq - (get_local $$or$i$241) - (i32.const 103) - ) - ) - (set_local $$tobool341$i - (i32.ne - (get_local $$$p$i) - (i32.const 0) - ) - ) - (set_local $$229 - (i32.and - (get_local $$tobool341$i) - (get_local $$cmp338$i) - ) - ) - (set_local $$land$ext$neg$i - (i32.shr_s - (i32.shl - (get_local $$229) - (i32.const 31) + (set_local $$arraydecay208$add$ptr213$i + (if + (get_local $$cmp205$i) + (get_local $$big$i) + (get_local $$add$ptr213$i) ) - (i32.const 31) - ) - ) - (set_local $$sub343$i - (i32.add - (get_local $$sub336$i) - (get_local $$land$ext$neg$i) ) - ) - (set_local $$sub$ptr$lhs$cast344$i - (get_local $$z$3$lcssa$i) - ) - (set_local $$sub$ptr$sub346$i - (i32.sub - (get_local $$sub$ptr$lhs$cast344$i) - (get_local $$sub$ptr$rhs$cast345$i) - ) - ) - (set_local $$sub$ptr$div347$i - (i32.shr_s - (get_local $$sub$ptr$sub346$i) - (i32.const 2) - ) - ) - (set_local $$230 - (i32.mul - (get_local $$sub$ptr$div347$i) - (i32.const 9) + (set_local $$sub$ptr$rhs$cast345$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (set_local $$mul349$i - (i32.add - (get_local $$230) - (i32.const -9) + (set_local $$y$addr$4$i + (get_local $$y$addr$3$i) ) - ) - (set_local $$cmp350$i - (i32.lt_s - (get_local $$sub343$i) - (get_local $$mul349$i) + (set_local $$z$0$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (if - (get_local $$cmp350$i) - (block - (set_local $$add$ptr354$i - (i32.add - (get_local $$arraydecay208$add$ptr213$i) - (i32.const 4) - ) - ) - (set_local $$add355$i - (i32.add - (get_local $$sub343$i) - (i32.const 9216) - ) - ) - (set_local $$div356$i - (i32.and - (i32.div_s - (get_local $$add355$i) - (i32.const 9) + (loop $while-in$67 + (block $while-out$66 + (set_local $$conv216$i + (i32.trunc_s/f64 + (get_local $$y$addr$4$i) ) - (i32.const -1) ) - ) - (set_local $$sub357$i - (i32.add - (get_local $$div356$i) - (i32.const -1024) + (i32.store + (get_local $$z$0$i) + (get_local $$conv216$i) ) - ) - (set_local $$add$ptr358$i - (i32.add - (get_local $$add$ptr354$i) - (i32.shl - (get_local $$sub357$i) - (i32.const 2) + (set_local $$incdec$ptr217$i + (i32.add + (get_local $$z$0$i) + (i32.const 4) ) ) - ) - (set_local $$rem360$i - (i32.and - (i32.rem_s - (get_local $$add355$i) - (i32.const 9) + (set_local $$conv218$i + (f64.convert_u/i32 + (get_local $$conv216$i) ) - (i32.const -1) - ) - ) - (set_local $$j$0$524$i - (i32.add - (get_local $$rem360$i) - (i32.const 1) ) - ) - (set_local $$cmp363$525$i - (i32.lt_s - (get_local $$j$0$524$i) - (i32.const 9) + (set_local $$sub219$i + (f64.sub + (get_local $$y$addr$4$i) + (get_local $$conv218$i) + ) ) - ) - (if - (get_local $$cmp363$525$i) - (block - (set_local $$i$1526$i - (i32.const 10) + (set_local $$mul220$i + (f64.mul + (get_local $$sub219$i) + (f64.const 1e9) ) - (set_local $$j$0527$i - (get_local $$j$0$524$i) + ) + (set_local $$tobool222$i + (f64.ne + (get_local $$mul220$i) + (f64.const 0) ) - (loop $while-out$86 $while-in$87 - (set_local $$mul367$i - (i32.mul - (get_local $$i$1526$i) - (i32.const 10) - ) - ) - (set_local $$j$0$i - (i32.add - (get_local $$j$0527$i) - (i32.const 1) - ) + ) + (if + (get_local $$tobool222$i) + (block + (set_local $$y$addr$4$i + (get_local $$mul220$i) ) - (set_local $$exitcond$i - (i32.eq - (get_local $$j$0$i) - (i32.const 9) - ) + (set_local $$z$0$i + (get_local $$incdec$ptr217$i) ) - (if - (get_local $$exitcond$i) - (block - (set_local $$i$1$lcssa$i - (get_local $$mul367$i) - ) - (br $while-out$86) - ) - (block - (set_local $$i$1526$i - (get_local $$mul367$i) - ) - (set_local $$j$0527$i - (get_local $$j$0$i) - ) - ) + ) + (block + (set_local $$incdec$ptr217$i$lcssa + (get_local $$incdec$ptr217$i) ) - (br $while-in$87) + (br $while-out$66) ) ) - (set_local $$i$1$lcssa$i - (i32.const 10) - ) - ) - (set_local $$231 - (i32.load - (get_local $$add$ptr358$i) - ) + (br $while-in$67) ) - (set_local $$rem370$i - (i32.and - (i32.rem_u - (get_local $$231) - (get_local $$i$1$lcssa$i) - ) - (i32.const -1) - ) + ) + (set_local $$$pr$i + (i32.load + (get_local $$e2$i) ) - (set_local $$tobool371$i - (i32.eq - (get_local $$rem370$i) - (i32.const 0) - ) + ) + (set_local $$cmp225$547$i + (i32.gt_s + (get_local $$$pr$i) + (i32.const 0) ) - (set_local $$add$ptr373$i - (i32.add - (get_local $$add$ptr358$i) - (i32.const 4) + ) + (if + (get_local $$cmp225$547$i) + (block + (set_local $$211 + (get_local $$$pr$i) ) - ) - (set_local $$cmp374$i - (i32.eq - (get_local $$add$ptr373$i) - (get_local $$z$3$lcssa$i) + (set_local $$a$1549$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (set_local $$or$cond395$i - (i32.and - (get_local $$cmp374$i) - (get_local $$tobool371$i) + (set_local $$z$1548$i + (get_local $$incdec$ptr217$i$lcssa) ) - ) - (block $do-once$88 - (if - (get_local $$or$cond395$i) - (block - (set_local $$a$8$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$4$i - (get_local $$add$ptr358$i) - ) - (set_local $$e$4$i - (get_local $$e$1$i) - ) - ) - (block - (set_local $$div378$i - (i32.and - (i32.div_u - (get_local $$231) - (get_local $$i$1$lcssa$i) - ) - (i32.const -1) - ) - ) - (set_local $$and379$i - (i32.and - (get_local $$div378$i) - (i32.const 1) + (loop $while-in$69 + (block $while-out$68 + (set_local $$cmp228$i + (i32.gt_s + (get_local $$211) + (i32.const 29) ) ) - (set_local $$tobool380$i - (i32.eq - (get_local $$and379$i) - (i32.const 0) - ) - ) - (set_local $$$396$i + (set_local $$cond233$i (if - (get_local $$tobool380$i) - (f64.const 9007199254740992) - (f64.const 9007199254740994) - ) - ) - (set_local $$div384$i - (i32.and - (i32.div_s - (get_local $$i$1$lcssa$i) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (set_local $$cmp385$i - (i32.lt_u - (get_local $$rem370$i) - (get_local $$div384$i) + (get_local $$cmp228$i) + (i32.const 29) + (get_local $$211) ) ) - (if - (get_local $$cmp385$i) - (set_local $$small$0$i - (f64.const 0.5) - ) - (block - (set_local $$cmp390$i - (i32.eq - (get_local $$rem370$i) - (get_local $$div384$i) - ) - ) - (set_local $$or$cond397$i - (i32.and - (get_local $$cmp374$i) - (get_local $$cmp390$i) - ) - ) - (set_local $$$404$i - (if - (get_local $$or$cond397$i) - (f64.const 1) - (f64.const 1.5) - ) - ) - (set_local $$small$0$i - (get_local $$$404$i) - ) + (set_local $$d$0$542$i + (i32.add + (get_local $$z$1548$i) + (i32.const -4) ) - ) - (set_local $$tobool400$i - (i32.eq - (get_local $$pl$0$i) - (i32.const 0) + ) + (set_local $$cmp235$543$i + (i32.lt_u + (get_local $$d$0$542$i) + (get_local $$a$1549$i) ) ) - (block $do-once$90 + (block $do-once$70 (if - (get_local $$tobool400$i) + (get_local $$cmp235$543$i) + (set_local $$a$2$ph$i + (get_local $$a$1549$i) + ) (block - (set_local $$round377$1$i - (get_local $$$396$i) + (set_local $$carry$0544$i + (i32.const 0) ) - (set_local $$small$1$i - (get_local $$small$0$i) + (set_local $$d$0545$i + (get_local $$d$0$542$i) ) - ) - (block - (set_local $$232 - (i32.load8_s - (get_local $$prefix$0$i) + (loop $while-in$73 + (block $while-out$72 + (set_local $$212 + (i32.load + (get_local $$d$0545$i) + ) + ) + (set_local $$213 + (call $_bitshift64Shl + (get_local $$212) + (i32.const 0) + (get_local $$cond233$i) + ) + ) + (set_local $$214 + (i32.load + (i32.const 168) + ) + ) + (set_local $$215 + (call $_i64Add + (get_local $$213) + (get_local $$214) + (get_local $$carry$0544$i) + (i32.const 0) + ) + ) + (set_local $$216 + (i32.load + (i32.const 168) + ) + ) + (set_local $$217 + (call $___uremdi3 + (get_local $$215) + (get_local $$216) + (i32.const 1000000000) + (i32.const 0) + ) + ) + (set_local $$218 + (i32.load + (i32.const 168) + ) + ) + (i32.store + (get_local $$d$0545$i) + (get_local $$217) + ) + (set_local $$219 + (call $___udivdi3 + (get_local $$215) + (get_local $$216) + (i32.const 1000000000) + (i32.const 0) + ) + ) + (set_local $$220 + (i32.load + (i32.const 168) + ) + ) + (set_local $$d$0$i + (i32.add + (get_local $$d$0545$i) + (i32.const -4) + ) + ) + (set_local $$cmp235$i + (i32.lt_u + (get_local $$d$0$i) + (get_local $$a$1549$i) + ) + ) + (if + (get_local $$cmp235$i) + (block + (set_local $$conv242$i$lcssa + (get_local $$219) + ) + (br $while-out$72) + ) + (block + (set_local $$carry$0544$i + (get_local $$219) + ) + (set_local $$d$0545$i + (get_local $$d$0$i) + ) + ) + ) + (br $while-in$73) ) ) - (set_local $$cmp403$i + (set_local $$tobool244$i (i32.eq - (i32.shr_s - (i32.shl - (get_local $$232) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 45) + (get_local $$conv242$i$lcssa) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp403$i) - ) + (get_local $$tobool244$i) (block - (set_local $$round377$1$i - (get_local $$$396$i) - ) - (set_local $$small$1$i - (get_local $$small$0$i) + (set_local $$a$2$ph$i + (get_local $$a$1549$i) ) - (br $do-once$90) + (br $do-once$70) ) ) - (set_local $$mul406$i - (f64.neg - (get_local $$$396$i) + (set_local $$incdec$ptr246$i + (i32.add + (get_local $$a$1549$i) + (i32.const -4) ) ) - (set_local $$mul407$i - (f64.neg - (get_local $$small$0$i) + (i32.store + (get_local $$incdec$ptr246$i) + (get_local $$conv242$i$lcssa) + ) + (set_local $$a$2$ph$i + (get_local $$incdec$ptr246$i) + ) + ) + ) + ) + (set_local $$z$2$i + (get_local $$z$1548$i) + ) + (loop $while-in$75 + (block $while-out$74 + (set_local $$cmp249$i + (i32.gt_u + (get_local $$z$2$i) + (get_local $$a$2$ph$i) + ) + ) + (if + (i32.eqz + (get_local $$cmp249$i) + ) + (block + (set_local $$z$2$i$lcssa + (get_local $$z$2$i) ) + (br $while-out$74) + ) + ) + (set_local $$arrayidx251$i + (i32.add + (get_local $$z$2$i) + (i32.const -4) + ) + ) + (set_local $$221 + (i32.load + (get_local $$arrayidx251$i) ) - (set_local $$round377$1$i - (get_local $$mul406$i) + ) + (set_local $$lnot$i + (i32.eq + (get_local $$221) + (i32.const 0) + ) + ) + (if + (get_local $$lnot$i) + (set_local $$z$2$i + (get_local $$arrayidx251$i) ) - (set_local $$small$1$i - (get_local $$mul407$i) + (block + (set_local $$z$2$i$lcssa + (get_local $$z$2$i) + ) + (br $while-out$74) ) ) + (br $while-in$75) ) ) - (set_local $$sub409$i + (set_local $$222 + (i32.load + (get_local $$e2$i) + ) + ) + (set_local $$sub256$i (i32.sub - (get_local $$231) - (get_local $$rem370$i) + (get_local $$222) + (get_local $$cond233$i) ) ) (i32.store - (get_local $$add$ptr358$i) - (get_local $$sub409$i) - ) - (set_local $$add410$i - (f64.add - (get_local $$round377$1$i) - (get_local $$small$1$i) - ) + (get_local $$e2$i) + (get_local $$sub256$i) ) - (set_local $$cmp411$i - (f64.ne - (get_local $$add410$i) - (get_local $$round377$1$i) + (set_local $$cmp225$i + (i32.gt_s + (get_local $$sub256$i) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp411$i) + (get_local $$cmp225$i) + (block + (set_local $$211 + (get_local $$sub256$i) + ) + (set_local $$a$1549$i + (get_local $$a$2$ph$i) + ) + (set_local $$z$1548$i + (get_local $$z$2$i$lcssa) + ) ) (block - (set_local $$a$8$i - (get_local $$a$3$lcssa$i) + (set_local $$$pr477$i + (get_local $$sub256$i) ) - (set_local $$d$4$i - (get_local $$add$ptr358$i) + (set_local $$a$1$lcssa$i + (get_local $$a$2$ph$i) ) - (set_local $$e$4$i - (get_local $$e$1$i) + (set_local $$z$1$lcssa$i + (get_local $$z$2$i$lcssa) ) - (br $do-once$88) + (br $while-out$68) ) ) - (set_local $$add414$i - (i32.add - (get_local $$sub409$i) - (get_local $$i$1$lcssa$i) + (br $while-in$69) + ) + ) + ) + (block + (set_local $$$pr477$i + (get_local $$$pr$i) + ) + (set_local $$a$1$lcssa$i + (get_local $$arraydecay208$add$ptr213$i) + ) + (set_local $$z$1$lcssa$i + (get_local $$incdec$ptr217$i$lcssa) + ) + ) + ) + (set_local $$cmp259$537$i + (i32.lt_s + (get_local $$$pr477$i) + (i32.const 0) + ) + ) + (if + (get_local $$cmp259$537$i) + (block + (set_local $$add273$i + (i32.add + (get_local $$$p$i) + (i32.const 25) + ) + ) + (set_local $$div274$i + (i32.and + (i32.div_s + (get_local $$add273$i) + (i32.const 9) + ) + (i32.const -1) + ) + ) + (set_local $$add275$i + (i32.add + (get_local $$div274$i) + (i32.const 1) + ) + ) + (set_local $$cmp299$i + (i32.eq + (get_local $$or$i$241) + (i32.const 102) + ) + ) + (set_local $$223 + (get_local $$$pr477$i) + ) + (set_local $$a$3539$i + (get_local $$a$1$lcssa$i) + ) + (set_local $$z$3538$i + (get_local $$z$1$lcssa$i) + ) + (loop $while-in$77 + (block $while-out$76 + (set_local $$sub264$i + (i32.sub + (i32.const 0) + (get_local $$223) ) ) - (i32.store - (get_local $$add$ptr358$i) - (get_local $$add414$i) + (set_local $$cmp265$i + (i32.gt_s + (get_local $$sub264$i) + (i32.const 9) + ) ) - (set_local $$cmp416$519$i - (i32.gt_u - (get_local $$add414$i) - (i32.const 999999999) + (set_local $$cond271$i + (if + (get_local $$cmp265$i) + (i32.const 9) + (get_local $$sub264$i) ) ) - (if - (get_local $$cmp416$519$i) - (block - (set_local $$a$5521$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$2520$i - (get_local $$add$ptr358$i) - ) - (loop $while-out$92 $while-in$93 - (set_local $$incdec$ptr419$i + (set_local $$cmp277$533$i + (i32.lt_u + (get_local $$a$3539$i) + (get_local $$z$3538$i) + ) + ) + (block $do-once$78 + (if + (get_local $$cmp277$533$i) + (block + (set_local $$shl280$i + (i32.shl + (i32.const 1) + (get_local $$cond271$i) + ) + ) + (set_local $$sub281$i (i32.add - (get_local $$d$2520$i) - (i32.const -4) + (get_local $$shl280$i) + (i32.const -1) ) ) - (i32.store - (get_local $$d$2520$i) + (set_local $$shr285$i + (i32.shr_u + (i32.const 1000000000) + (get_local $$cond271$i) + ) + ) + (set_local $$carry262$0535$i (i32.const 0) ) - (set_local $$cmp420$i - (i32.lt_u - (get_local $$incdec$ptr419$i) - (get_local $$a$5521$i) - ) + (set_local $$d$1534$i + (get_local $$a$3539$i) ) - (if - (get_local $$cmp420$i) - (block - (set_local $$incdec$ptr423$i + (loop $while-in$81 + (block $while-out$80 + (set_local $$225 + (i32.load + (get_local $$d$1534$i) + ) + ) + (set_local $$and282$i + (i32.and + (get_local $$225) + (get_local $$sub281$i) + ) + ) + (set_local $$shr283$i + (i32.shr_u + (get_local $$225) + (get_local $$cond271$i) + ) + ) + (set_local $$add284$i (i32.add - (get_local $$a$5521$i) - (i32.const -4) + (get_local $$shr283$i) + (get_local $$carry262$0535$i) ) ) (i32.store - (get_local $$incdec$ptr423$i) - (i32.const 0) + (get_local $$d$1534$i) + (get_local $$add284$i) ) - (set_local $$a$6$i - (get_local $$incdec$ptr423$i) + (set_local $$mul286$i + (i32.mul + (get_local $$and282$i) + (get_local $$shr285$i) + ) ) - ) - (set_local $$a$6$i - (get_local $$a$5521$i) + (set_local $$incdec$ptr288$i + (i32.add + (get_local $$d$1534$i) + (i32.const 4) + ) + ) + (set_local $$cmp277$i + (i32.lt_u + (get_local $$incdec$ptr288$i) + (get_local $$z$3538$i) + ) + ) + (if + (get_local $$cmp277$i) + (block + (set_local $$carry262$0535$i + (get_local $$mul286$i) + ) + (set_local $$d$1534$i + (get_local $$incdec$ptr288$i) + ) + ) + (block + (set_local $$mul286$i$lcssa + (get_local $$mul286$i) + ) + (br $while-out$80) + ) + ) + (br $while-in$81) ) ) - (set_local $$233 + (set_local $$226 (i32.load - (get_local $$incdec$ptr419$i) + (get_local $$a$3539$i) + ) + ) + (set_local $$tobool290$i + (i32.eq + (get_local $$226) + (i32.const 0) ) ) - (set_local $$inc425$i + (set_local $$incdec$ptr292$i (i32.add - (get_local $$233) - (i32.const 1) + (get_local $$a$3539$i) + (i32.const 4) ) ) - (i32.store - (get_local $$incdec$ptr419$i) - (get_local $$inc425$i) + (set_local $$incdec$ptr292$a$3$i + (if + (get_local $$tobool290$i) + (get_local $$incdec$ptr292$i) + (get_local $$a$3539$i) + ) ) - (set_local $$cmp416$i - (i32.gt_u - (get_local $$inc425$i) - (i32.const 999999999) + (set_local $$tobool294$i + (i32.eq + (get_local $$mul286$i$lcssa) + (i32.const 0) ) ) (if - (get_local $$cmp416$i) + (get_local $$tobool294$i) (block - (set_local $$a$5521$i - (get_local $$a$6$i) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$i) ) - (set_local $$d$2520$i - (get_local $$incdec$ptr419$i) + (set_local $$z$4$i + (get_local $$z$3538$i) ) + (br $do-once$78) ) - (block - (set_local $$a$5$lcssa$i - (get_local $$a$6$i) - ) - (set_local $$d$2$lcssa$i - (get_local $$incdec$ptr419$i) - ) - (br $while-out$92) + ) + (set_local $$incdec$ptr296$i + (i32.add + (get_local $$z$3538$i) + (i32.const 4) + ) + ) + (i32.store + (get_local $$z$3538$i) + (get_local $$mul286$i$lcssa) + ) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$i) + ) + (set_local $$z$4$i + (get_local $$incdec$ptr296$i) + ) + ) + (block + (set_local $$224 + (i32.load + (get_local $$a$3539$i) + ) + ) + (set_local $$tobool290$569$i + (i32.eq + (get_local $$224) + (i32.const 0) + ) + ) + (set_local $$incdec$ptr292$570$i + (i32.add + (get_local $$a$3539$i) + (i32.const 4) + ) + ) + (set_local $$incdec$ptr292$a$3$571$i + (if + (get_local $$tobool290$569$i) + (get_local $$incdec$ptr292$570$i) + (get_local $$a$3539$i) ) ) - (br $while-in$93) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$571$i) + ) + (set_local $$z$4$i + (get_local $$z$3538$i) + ) ) ) - (block - (set_local $$a$5$lcssa$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$2$lcssa$i - (get_local $$add$ptr358$i) - ) + ) + (set_local $$cond304$i + (if + (get_local $$cmp299$i) + (get_local $$arraydecay208$add$ptr213$i) + (get_local $$incdec$ptr292$a$3573$i) ) ) - (set_local $$sub$ptr$rhs$cast428$i - (get_local $$a$5$lcssa$i) + (set_local $$sub$ptr$lhs$cast305$i + (get_local $$z$4$i) ) - (set_local $$sub$ptr$sub429$i + (set_local $$sub$ptr$rhs$cast306$i + (get_local $$cond304$i) + ) + (set_local $$sub$ptr$sub307$i (i32.sub - (get_local $$sub$ptr$rhs$cast345$i) - (get_local $$sub$ptr$rhs$cast428$i) + (get_local $$sub$ptr$lhs$cast305$i) + (get_local $$sub$ptr$rhs$cast306$i) ) ) - (set_local $$sub$ptr$div430$i + (set_local $$sub$ptr$div$i (i32.shr_s - (get_local $$sub$ptr$sub429$i) + (get_local $$sub$ptr$sub307$i) (i32.const 2) ) ) - (set_local $$mul431$i - (i32.mul - (get_local $$sub$ptr$div430$i) - (i32.const 9) + (set_local $$cmp308$i + (i32.gt_s + (get_local $$sub$ptr$div$i) + (get_local $$add275$i) + ) + ) + (set_local $$add$ptr311$i + (i32.add + (get_local $$cond304$i) + (i32.shl + (get_local $$add275$i) + (i32.const 2) + ) ) ) - (set_local $$234 + (set_local $$add$ptr311$z$4$i + (if + (get_local $$cmp308$i) + (get_local $$add$ptr311$i) + (get_local $$z$4$i) + ) + ) + (set_local $$227 (i32.load - (get_local $$a$5$lcssa$i) + (get_local $$e2$i) ) ) - (set_local $$cmp433$515$i - (i32.lt_u - (get_local $$234) - (i32.const 10) + (set_local $$add313$i + (i32.add + (get_local $$227) + (get_local $$cond271$i) + ) + ) + (i32.store + (get_local $$e2$i) + (get_local $$add313$i) + ) + (set_local $$cmp259$i + (i32.lt_s + (get_local $$add313$i) + (i32.const 0) ) ) (if - (get_local $$cmp433$515$i) + (get_local $$cmp259$i) (block - (set_local $$a$8$i - (get_local $$a$5$lcssa$i) + (set_local $$223 + (get_local $$add313$i) ) - (set_local $$d$4$i - (get_local $$d$2$lcssa$i) + (set_local $$a$3539$i + (get_local $$incdec$ptr292$a$3573$i) ) - (set_local $$e$4$i - (get_local $$mul431$i) + (set_local $$z$3538$i + (get_local $$add$ptr311$z$4$i) ) - (br $do-once$88) ) (block - (set_local $$e$2517$i - (get_local $$mul431$i) + (set_local $$a$3$lcssa$i + (get_local $$incdec$ptr292$a$3573$i) ) - (set_local $$i$2516$i - (i32.const 10) + (set_local $$z$3$lcssa$i + (get_local $$add$ptr311$z$4$i) ) + (br $while-out$76) + ) + ) + (br $while-in$77) + ) + ) + ) + (block + (set_local $$a$3$lcssa$i + (get_local $$a$1$lcssa$i) + ) + (set_local $$z$3$lcssa$i + (get_local $$z$1$lcssa$i) + ) + ) + ) + (set_local $$cmp315$i + (i32.lt_u + (get_local $$a$3$lcssa$i) + (get_local $$z$3$lcssa$i) + ) + ) + (block $do-once$82 + (if + (get_local $$cmp315$i) + (block + (set_local $$sub$ptr$rhs$cast319$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$sub$ptr$sub320$i + (i32.sub + (get_local $$sub$ptr$rhs$cast345$i) + (get_local $$sub$ptr$rhs$cast319$i) + ) + ) + (set_local $$sub$ptr$div321$i + (i32.shr_s + (get_local $$sub$ptr$sub320$i) + (i32.const 2) + ) + ) + (set_local $$mul322$i + (i32.mul + (get_local $$sub$ptr$div321$i) + (i32.const 9) + ) + ) + (set_local $$228 + (i32.load + (get_local $$a$3$lcssa$i) + ) + ) + (set_local $$cmp324$529$i + (i32.lt_u + (get_local $$228) + (i32.const 10) + ) + ) + (if + (get_local $$cmp324$529$i) + (block + (set_local $$e$1$i + (get_local $$mul322$i) + ) + (br $do-once$82) + ) + (block + (set_local $$e$0531$i + (get_local $$mul322$i) + ) + (set_local $$i$0530$i + (i32.const 10) ) ) - (loop $while-out$94 $while-in$95 - (set_local $$mul437$i + ) + (loop $while-in$85 + (block $while-out$84 + (set_local $$mul328$i (i32.mul - (get_local $$i$2516$i) + (get_local $$i$0530$i) (i32.const 10) ) ) - (set_local $$inc438$i + (set_local $$inc$i (i32.add - (get_local $$e$2517$i) + (get_local $$e$0531$i) (i32.const 1) ) ) - (set_local $$cmp433$i + (set_local $$cmp324$i (i32.lt_u - (get_local $$234) - (get_local $$mul437$i) + (get_local $$228) + (get_local $$mul328$i) ) ) (if - (get_local $$cmp433$i) + (get_local $$cmp324$i) (block - (set_local $$a$8$i - (get_local $$a$5$lcssa$i) - ) - (set_local $$d$4$i - (get_local $$d$2$lcssa$i) - ) - (set_local $$e$4$i - (get_local $$inc438$i) + (set_local $$e$1$i + (get_local $$inc$i) ) - (br $while-out$94) + (br $while-out$84) ) (block - (set_local $$e$2517$i - (get_local $$inc438$i) + (set_local $$e$0531$i + (get_local $$inc$i) ) - (set_local $$i$2516$i - (get_local $$mul437$i) + (set_local $$i$0530$i + (get_local $$mul328$i) ) ) ) - (br $while-in$95) + (br $while-in$85) ) ) ) - ) - (set_local $$add$ptr442$i - (i32.add - (get_local $$d$4$i) - (i32.const 4) - ) - ) - (set_local $$cmp443$i - (i32.gt_u - (get_local $$z$3$lcssa$i) - (get_local $$add$ptr442$i) - ) - ) - (set_local $$add$ptr442$z$3$i - (if - (get_local $$cmp443$i) - (get_local $$add$ptr442$i) - (get_local $$z$3$lcssa$i) + (set_local $$e$1$i + (i32.const 0) ) ) - (set_local $$a$9$ph$i - (get_local $$a$8$i) - ) - (set_local $$e$5$ph$i - (get_local $$e$4$i) - ) - (set_local $$z$7$ph$i - (get_local $$add$ptr442$z$3$i) - ) ) - (block - (set_local $$a$9$ph$i - (get_local $$a$3$lcssa$i) + (set_local $$cmp333$i + (i32.ne + (get_local $$or$i$241) + (i32.const 102) ) - (set_local $$e$5$ph$i + ) + (set_local $$mul335$i + (if + (get_local $$cmp333$i) (get_local $$e$1$i) + (i32.const 0) ) - (set_local $$z$7$ph$i - (get_local $$z$3$lcssa$i) + ) + (set_local $$sub336$i + (i32.sub + (get_local $$$p$i) + (get_local $$mul335$i) ) ) - ) - (set_local $$sub626$le$i - (i32.sub - (i32.const 0) - (get_local $$e$5$ph$i) + (set_local $$cmp338$i + (i32.eq + (get_local $$or$i$241) + (i32.const 103) + ) ) - ) - (set_local $$z$7$i - (get_local $$z$7$ph$i) - ) - (loop $while-out$96 $while-in$97 - (set_local $$cmp450$i - (i32.gt_u - (get_local $$z$7$i) - (get_local $$a$9$ph$i) + (set_local $$tobool341$i + (i32.ne + (get_local $$$p$i) + (i32.const 0) ) ) - (if - (i32.eqz - (get_local $$cmp450$i) + (set_local $$229 + (i32.and + (get_local $$tobool341$i) + (get_local $$cmp338$i) ) - (block - (set_local $$cmp450$lcssa$i - (i32.const 0) - ) - (set_local $$z$7$i$lcssa - (get_local $$z$7$i) + ) + (set_local $$land$ext$neg$i + (i32.shr_s + (i32.shl + (get_local $$229) + (i32.const 31) ) - (br $while-out$96) + (i32.const 31) ) ) - (set_local $$arrayidx453$i + (set_local $$sub343$i (i32.add - (get_local $$z$7$i) - (i32.const -4) + (get_local $$sub336$i) + (get_local $$land$ext$neg$i) ) ) - (set_local $$235 - (i32.load - (get_local $$arrayidx453$i) + (set_local $$sub$ptr$lhs$cast344$i + (get_local $$z$3$lcssa$i) + ) + (set_local $$sub$ptr$sub346$i + (i32.sub + (get_local $$sub$ptr$lhs$cast344$i) + (get_local $$sub$ptr$rhs$cast345$i) ) ) - (set_local $$lnot455$i - (i32.eq - (get_local $$235) - (i32.const 0) + (set_local $$sub$ptr$div347$i + (i32.shr_s + (get_local $$sub$ptr$sub346$i) + (i32.const 2) ) ) - (if - (get_local $$lnot455$i) - (set_local $$z$7$i - (get_local $$arrayidx453$i) + (set_local $$230 + (i32.mul + (get_local $$sub$ptr$div347$i) + (i32.const 9) ) - (block - (set_local $$cmp450$lcssa$i - (i32.const 1) - ) - (set_local $$z$7$i$lcssa - (get_local $$z$7$i) - ) - (br $while-out$96) + ) + (set_local $$mul349$i + (i32.add + (get_local $$230) + (i32.const -9) + ) + ) + (set_local $$cmp350$i + (i32.lt_s + (get_local $$sub343$i) + (get_local $$mul349$i) ) ) - (br $while-in$97) - ) - (block $do-once$98 (if - (get_local $$cmp338$i) + (get_local $$cmp350$i) (block - (set_local $$236 + (set_local $$add$ptr354$i + (i32.add + (get_local $$arraydecay208$add$ptr213$i) + (i32.const 4) + ) + ) + (set_local $$add355$i + (i32.add + (get_local $$sub343$i) + (i32.const 9216) + ) + ) + (set_local $$div356$i (i32.and - (get_local $$tobool341$i) - (i32.const 1) + (i32.div_s + (get_local $$add355$i) + (i32.const 9) + ) + (i32.const -1) ) ) - (set_local $$inc468$i - (i32.xor - (get_local $$236) - (i32.const 1) + (set_local $$sub357$i + (i32.add + (get_local $$div356$i) + (i32.const -1024) ) ) - (set_local $$$p$inc468$i + (set_local $$add$ptr358$i (i32.add - (get_local $$inc468$i) - (get_local $$$p$i) + (get_local $$add$ptr354$i) + (i32.shl + (get_local $$sub357$i) + (i32.const 2) + ) ) ) - (set_local $$cmp470$i - (i32.gt_s - (get_local $$$p$inc468$i) - (get_local $$e$5$ph$i) + (set_local $$rem360$i + (i32.and + (i32.rem_s + (get_local $$add355$i) + (i32.const 9) + ) + (i32.const -1) ) ) - (set_local $$cmp473$i - (i32.gt_s - (get_local $$e$5$ph$i) - (i32.const -5) + (set_local $$j$0$524$i + (i32.add + (get_local $$rem360$i) + (i32.const 1) ) ) - (set_local $$or$cond2$i - (i32.and - (get_local $$cmp470$i) - (get_local $$cmp473$i) + (set_local $$cmp363$525$i + (i32.lt_s + (get_local $$j$0$524$i) + (i32.const 9) ) ) (if - (get_local $$or$cond2$i) + (get_local $$cmp363$525$i) (block - (set_local $$dec476$i - (i32.add - (get_local $$t$0) - (i32.const -1) - ) + (set_local $$i$1526$i + (i32.const 10) ) - (set_local $$add477$neg$i - (i32.add - (get_local $$$p$inc468$i) - (i32.const -1) - ) + (set_local $$j$0527$i + (get_local $$j$0$524$i) ) - (set_local $$sub478$i - (i32.sub - (get_local $$add477$neg$i) - (get_local $$e$5$ph$i) + (loop $while-in$87 + (block $while-out$86 + (set_local $$mul367$i + (i32.mul + (get_local $$i$1526$i) + (i32.const 10) + ) + ) + (set_local $$j$0$i + (i32.add + (get_local $$j$0527$i) + (i32.const 1) + ) + ) + (set_local $$exitcond$i + (i32.eq + (get_local $$j$0$i) + (i32.const 9) + ) + ) + (if + (get_local $$exitcond$i) + (block + (set_local $$i$1$lcssa$i + (get_local $$mul367$i) + ) + (br $while-out$86) + ) + (block + (set_local $$i$1526$i + (get_local $$mul367$i) + ) + (set_local $$j$0527$i + (get_local $$j$0$i) + ) + ) + ) + (br $while-in$87) ) ) - (set_local $$p$addr$2$i - (get_local $$sub478$i) - ) - (set_local $$t$addr$0$i - (get_local $$dec476$i) - ) ) - (block - (set_local $$sub480$i - (i32.add - (get_local $$t$0) - (i32.const -2) - ) - ) - (set_local $$dec481$i - (i32.add - (get_local $$$p$inc468$i) - (i32.const -1) - ) - ) - (set_local $$p$addr$2$i - (get_local $$dec481$i) - ) - (set_local $$t$addr$0$i - (get_local $$sub480$i) - ) + (set_local $$i$1$lcssa$i + (i32.const 10) + ) + ) + (set_local $$231 + (i32.load + (get_local $$add$ptr358$i) ) ) - (set_local $$and483$i + (set_local $$rem370$i (i32.and - (get_local $$fl$1$and219) - (i32.const 8) + (i32.rem_u + (get_local $$231) + (get_local $$i$1$lcssa$i) + ) + (i32.const -1) ) ) - (set_local $$tobool484$i + (set_local $$tobool371$i (i32.eq - (get_local $$and483$i) + (get_local $$rem370$i) (i32.const 0) ) ) - (if - (i32.eqz - (get_local $$tobool484$i) + (set_local $$add$ptr373$i + (i32.add + (get_local $$add$ptr358$i) + (i32.const 4) ) - (block - (set_local $$and610$pre$phi$iZ2D - (get_local $$and483$i) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) + ) + (set_local $$cmp374$i + (i32.eq + (get_local $$add$ptr373$i) + (get_local $$z$3$lcssa$i) + ) + ) + (set_local $$or$cond395$i + (i32.and + (get_local $$cmp374$i) + (get_local $$tobool371$i) ) ) - (block $do-once$100 + (block $do-once$88 (if - (get_local $$cmp450$lcssa$i) + (get_local $$or$cond395$i) + (block + (set_local $$a$8$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$add$ptr358$i) + ) + (set_local $$e$4$i + (get_local $$e$1$i) + ) + ) (block - (set_local $$arrayidx489$i - (i32.add - (get_local $$z$7$i$lcssa) - (i32.const -4) + (set_local $$div378$i + (i32.and + (i32.div_u + (get_local $$231) + (get_local $$i$1$lcssa$i) + ) + (i32.const -1) ) ) - (set_local $$237 - (i32.load - (get_local $$arrayidx489$i) + (set_local $$and379$i + (i32.and + (get_local $$div378$i) + (i32.const 1) ) ) - (set_local $$tobool490$i + (set_local $$tobool380$i (i32.eq - (get_local $$237) + (get_local $$and379$i) (i32.const 0) ) ) - (if - (get_local $$tobool490$i) - (block - (set_local $$j$2$i - (i32.const 9) - ) - (br $do-once$100) + (set_local $$$396$i + (if + (get_local $$tobool380$i) + (f64.const 9007199254740992) + (f64.const 9007199254740994) ) ) - (set_local $$rem494$510$i + (set_local $$div384$i (i32.and - (i32.rem_u - (get_local $$237) - (i32.const 10) + (i32.div_s + (get_local $$i$1$lcssa$i) + (i32.const 2) ) (i32.const -1) ) ) - (set_local $$cmp495$511$i - (i32.eq - (get_local $$rem494$510$i) - (i32.const 0) + (set_local $$cmp385$i + (i32.lt_u + (get_local $$rem370$i) + (get_local $$div384$i) ) ) (if - (get_local $$cmp495$511$i) - (block - (set_local $$i$3512$i - (i32.const 10) - ) - (set_local $$j$1513$i - (i32.const 0) - ) + (get_local $$cmp385$i) + (set_local $$small$0$i + (f64.const 0.5) ) (block - (set_local $$j$2$i - (i32.const 0) - ) - (br $do-once$100) - ) - ) - (loop $while-out$102 $while-in$103 - (set_local $$mul499$i - (i32.mul - (get_local $$i$3512$i) - (i32.const 10) + (set_local $$cmp390$i + (i32.eq + (get_local $$rem370$i) + (get_local $$div384$i) + ) ) - ) - (set_local $$inc500$i - (i32.add - (get_local $$j$1513$i) - (i32.const 1) + (set_local $$or$cond397$i + (i32.and + (get_local $$cmp374$i) + (get_local $$cmp390$i) + ) ) - ) - (set_local $$rem494$i - (i32.and - (i32.rem_u - (get_local $$237) - (get_local $$mul499$i) + (set_local $$$404$i + (if + (get_local $$or$cond397$i) + (f64.const 1) + (f64.const 1.5) ) - (i32.const -1) ) - ) - (set_local $$cmp495$i - (i32.eq - (get_local $$rem494$i) - (i32.const 0) + (set_local $$small$0$i + (get_local $$$404$i) ) ) + ) + (set_local $$tobool400$i + (i32.eq + (get_local $$pl$0$i) + (i32.const 0) + ) + ) + (block $do-once$90 (if - (get_local $$cmp495$i) + (get_local $$tobool400$i) (block - (set_local $$i$3512$i - (get_local $$mul499$i) + (set_local $$round377$1$i + (get_local $$$396$i) ) - (set_local $$j$1513$i - (get_local $$inc500$i) + (set_local $$small$1$i + (get_local $$small$0$i) ) ) (block - (set_local $$j$2$i - (get_local $$inc500$i) + (set_local $$232 + (i32.load8_s + (get_local $$prefix$0$i) + ) + ) + (set_local $$cmp403$i + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$232) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 45) + ) + ) + (if + (i32.eqz + (get_local $$cmp403$i) + ) + (block + (set_local $$round377$1$i + (get_local $$$396$i) + ) + (set_local $$small$1$i + (get_local $$small$0$i) + ) + (br $do-once$90) + ) + ) + (set_local $$mul406$i + (f64.neg + (get_local $$$396$i) + ) + ) + (set_local $$mul407$i + (f64.neg + (get_local $$small$0$i) + ) + ) + (set_local $$round377$1$i + (get_local $$mul406$i) + ) + (set_local $$small$1$i + (get_local $$mul407$i) ) - (br $while-out$102) ) ) - (br $while-in$103) ) - ) - (set_local $$j$2$i - (i32.const 9) - ) - ) - ) - (set_local $$or504$i - (i32.or - (get_local $$t$addr$0$i) - (i32.const 32) - ) - ) - (set_local $$cmp505$i - (i32.eq - (get_local $$or504$i) - (i32.const 102) - ) - ) - (set_local $$sub$ptr$lhs$cast508$i - (get_local $$z$7$i$lcssa) - ) - (set_local $$sub$ptr$sub510$i - (i32.sub - (get_local $$sub$ptr$lhs$cast508$i) - (get_local $$sub$ptr$rhs$cast345$i) - ) - ) - (set_local $$sub$ptr$div511$i - (i32.shr_s - (get_local $$sub$ptr$sub510$i) - (i32.const 2) - ) - ) - (set_local $$238 - (i32.mul - (get_local $$sub$ptr$div511$i) - (i32.const 9) - ) - ) - (set_local $$mul513$i - (i32.add - (get_local $$238) - (i32.const -9) - ) - ) - (if - (get_local $$cmp505$i) - (block - (set_local $$sub514$i - (i32.sub - (get_local $$mul513$i) - (get_local $$j$2$i) + (set_local $$sub409$i + (i32.sub + (get_local $$231) + (get_local $$rem370$i) + ) ) - ) - (set_local $$cmp515$i - (i32.lt_s - (get_local $$sub514$i) - (i32.const 0) + (i32.store + (get_local $$add$ptr358$i) + (get_local $$sub409$i) ) - ) - (set_local $$$sub514$i - (if - (get_local $$cmp515$i) - (i32.const 0) - (get_local $$sub514$i) + (set_local $$add410$i + (f64.add + (get_local $$round377$1$i) + (get_local $$small$1$i) + ) ) - ) - (set_local $$cmp528$i - (i32.lt_s - (get_local $$p$addr$2$i) - (get_local $$$sub514$i) + (set_local $$cmp411$i + (f64.ne + (get_local $$add410$i) + (get_local $$round377$1$i) + ) ) - ) - (set_local $$p$addr$2$$sub514398$i (if - (get_local $$cmp528$i) - (get_local $$p$addr$2$i) - (get_local $$$sub514$i) + (i32.eqz + (get_local $$cmp411$i) + ) + (block + (set_local $$a$8$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$add$ptr358$i) + ) + (set_local $$e$4$i + (get_local $$e$1$i) + ) + (br $do-once$88) + ) ) - ) - (set_local $$and610$pre$phi$iZ2D - (i32.const 0) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$$sub514398$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) - ) - (block - (set_local $$add561$i - (i32.add - (get_local $$mul513$i) - (get_local $$e$5$ph$i) + (set_local $$add414$i + (i32.add + (get_local $$sub409$i) + (get_local $$i$1$lcssa$i) + ) ) - ) - (set_local $$sub562$i - (i32.sub - (get_local $$add561$i) - (get_local $$j$2$i) + (i32.store + (get_local $$add$ptr358$i) + (get_local $$add414$i) ) - ) - (set_local $$cmp563$i - (i32.lt_s - (get_local $$sub562$i) - (i32.const 0) + (set_local $$cmp416$519$i + (i32.gt_u + (get_local $$add414$i) + (i32.const 999999999) + ) ) - ) - (set_local $$$sub562$i (if - (get_local $$cmp563$i) - (i32.const 0) - (get_local $$sub562$i) + (get_local $$cmp416$519$i) + (block + (set_local $$a$5521$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$2520$i + (get_local $$add$ptr358$i) + ) + (loop $while-in$93 + (block $while-out$92 + (set_local $$incdec$ptr419$i + (i32.add + (get_local $$d$2520$i) + (i32.const -4) + ) + ) + (i32.store + (get_local $$d$2520$i) + (i32.const 0) + ) + (set_local $$cmp420$i + (i32.lt_u + (get_local $$incdec$ptr419$i) + (get_local $$a$5521$i) + ) + ) + (if + (get_local $$cmp420$i) + (block + (set_local $$incdec$ptr423$i + (i32.add + (get_local $$a$5521$i) + (i32.const -4) + ) + ) + (i32.store + (get_local $$incdec$ptr423$i) + (i32.const 0) + ) + (set_local $$a$6$i + (get_local $$incdec$ptr423$i) + ) + ) + (set_local $$a$6$i + (get_local $$a$5521$i) + ) + ) + (set_local $$233 + (i32.load + (get_local $$incdec$ptr419$i) + ) + ) + (set_local $$inc425$i + (i32.add + (get_local $$233) + (i32.const 1) + ) + ) + (i32.store + (get_local $$incdec$ptr419$i) + (get_local $$inc425$i) + ) + (set_local $$cmp416$i + (i32.gt_u + (get_local $$inc425$i) + (i32.const 999999999) + ) + ) + (if + (get_local $$cmp416$i) + (block + (set_local $$a$5521$i + (get_local $$a$6$i) + ) + (set_local $$d$2520$i + (get_local $$incdec$ptr419$i) + ) + ) + (block + (set_local $$a$5$lcssa$i + (get_local $$a$6$i) + ) + (set_local $$d$2$lcssa$i + (get_local $$incdec$ptr419$i) + ) + (br $while-out$92) + ) + ) + (br $while-in$93) + ) + ) + ) + (block + (set_local $$a$5$lcssa$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$2$lcssa$i + (get_local $$add$ptr358$i) + ) + ) ) - ) - (set_local $$cmp577$i - (i32.lt_s - (get_local $$p$addr$2$i) - (get_local $$$sub562$i) + (set_local $$sub$ptr$rhs$cast428$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$sub$ptr$sub429$i + (i32.sub + (get_local $$sub$ptr$rhs$cast345$i) + (get_local $$sub$ptr$rhs$cast428$i) + ) + ) + (set_local $$sub$ptr$div430$i + (i32.shr_s + (get_local $$sub$ptr$sub429$i) + (i32.const 2) + ) + ) + (set_local $$mul431$i + (i32.mul + (get_local $$sub$ptr$div430$i) + (i32.const 9) + ) + ) + (set_local $$234 + (i32.load + (get_local $$a$5$lcssa$i) + ) + ) + (set_local $$cmp433$515$i + (i32.lt_u + (get_local $$234) + (i32.const 10) + ) + ) + (if + (get_local $$cmp433$515$i) + (block + (set_local $$a$8$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$d$2$lcssa$i) + ) + (set_local $$e$4$i + (get_local $$mul431$i) + ) + (br $do-once$88) + ) + (block + (set_local $$e$2517$i + (get_local $$mul431$i) + ) + (set_local $$i$2516$i + (i32.const 10) + ) + ) ) - ) - (set_local $$p$addr$2$$sub562399$i - (if - (get_local $$cmp577$i) - (get_local $$p$addr$2$i) - (get_local $$$sub562$i) + (loop $while-in$95 + (block $while-out$94 + (set_local $$mul437$i + (i32.mul + (get_local $$i$2516$i) + (i32.const 10) + ) + ) + (set_local $$inc438$i + (i32.add + (get_local $$e$2517$i) + (i32.const 1) + ) + ) + (set_local $$cmp433$i + (i32.lt_u + (get_local $$234) + (get_local $$mul437$i) + ) + ) + (if + (get_local $$cmp433$i) + (block + (set_local $$a$8$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$d$2$lcssa$i) + ) + (set_local $$e$4$i + (get_local $$inc438$i) + ) + (br $while-out$94) + ) + (block + (set_local $$e$2517$i + (get_local $$inc438$i) + ) + (set_local $$i$2516$i + (get_local $$mul437$i) + ) + ) + ) + (br $while-in$95) + ) ) ) - (set_local $$and610$pre$phi$iZ2D - (i32.const 0) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$$sub562399$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) ) ) - ) - (block - (set_local $$$pre567$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) + (set_local $$add$ptr442$i + (i32.add + (get_local $$d$4$i) + (i32.const 4) ) ) - (set_local $$and610$pre$phi$iZ2D - (get_local $$$pre567$i) + (set_local $$cmp443$i + (i32.gt_u + (get_local $$z$3$lcssa$i) + (get_local $$add$ptr442$i) + ) ) - (set_local $$p$addr$3$i - (get_local $$$p$i) + (set_local $$add$ptr442$z$3$i + (if + (get_local $$cmp443$i) + (get_local $$add$ptr442$i) + (get_local $$z$3$lcssa$i) + ) ) - (set_local $$t$addr$1$i - (get_local $$t$0) + (set_local $$a$9$ph$i + (get_local $$a$8$i) ) - ) - ) - ) - (set_local $$239 - (i32.or - (get_local $$p$addr$3$i) - (get_local $$and610$pre$phi$iZ2D) - ) - ) - (set_local $$240 - (i32.ne - (get_local $$239) - (i32.const 0) - ) - ) - (set_local $$lor$ext$i - (i32.and - (get_local $$240) - (i32.const 1) - ) - ) - (set_local $$or613$i - (i32.or - (get_local $$t$addr$1$i) - (i32.const 32) - ) - ) - (set_local $$cmp614$i - (i32.eq - (get_local $$or613$i) - (i32.const 102) - ) - ) - (if - (get_local $$cmp614$i) - (block - (set_local $$cmp617$i - (i32.gt_s - (get_local $$e$5$ph$i) - (i32.const 0) + (set_local $$e$5$ph$i + (get_local $$e$4$i) + ) + (set_local $$z$7$ph$i + (get_local $$add$ptr442$z$3$i) ) ) - (set_local $$add620$i - (if - (get_local $$cmp617$i) - (get_local $$e$5$ph$i) - (i32.const 0) + (block + (set_local $$a$9$ph$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$e$5$ph$i + (get_local $$e$1$i) + ) + (set_local $$z$7$ph$i + (get_local $$z$3$lcssa$i) ) ) - (set_local $$estr$2$i + ) + (set_local $$sub626$le$i + (i32.sub (i32.const 0) - ) - (set_local $$sub$ptr$sub650$pn$i - (get_local $$add620$i) + (get_local $$e$5$ph$i) ) ) - (block - (set_local $$cmp623$i - (i32.lt_s - (get_local $$e$5$ph$i) - (i32.const 0) + (set_local $$z$7$i + (get_local $$z$7$ph$i) + ) + (loop $while-in$97 + (block $while-out$96 + (set_local $$cmp450$i + (i32.gt_u + (get_local $$z$7$i) + (get_local $$a$9$ph$i) + ) ) - ) - (set_local $$cond629$i (if - (get_local $$cmp623$i) - (get_local $$sub626$le$i) - (get_local $$e$5$ph$i) - ) - ) - (set_local $$241 - (i32.lt_s - (get_local $$cond629$i) - (i32.const 0) + (i32.eqz + (get_local $$cmp450$i) + ) + (block + (set_local $$cmp450$lcssa$i + (i32.const 0) + ) + (set_local $$z$7$i$lcssa + (get_local $$z$7$i) + ) + (br $while-out$96) + ) ) - ) - (set_local $$242 - (i32.shr_s - (i32.shl - (get_local $$241) - (i32.const 31) + (set_local $$arrayidx453$i + (i32.add + (get_local $$z$7$i) + (i32.const -4) ) - (i32.const 31) ) - ) - (set_local $$243 - (call $_fmt_u - (get_local $$cond629$i) - (get_local $$242) - (get_local $$arrayidx$i$236) + (set_local $$235 + (i32.load + (get_local $$arrayidx453$i) + ) ) - ) - (set_local $$sub$ptr$rhs$cast634$504$i - (get_local $$243) - ) - (set_local $$sub$ptr$sub635$505$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast634$504$i) + (set_local $$lnot455$i + (i32.eq + (get_local $$235) + (i32.const 0) + ) ) - ) - (set_local $$cmp636$506$i - (i32.lt_s - (get_local $$sub$ptr$sub635$505$i) - (i32.const 2) + (if + (get_local $$lnot455$i) + (set_local $$z$7$i + (get_local $$arrayidx453$i) + ) + (block + (set_local $$cmp450$lcssa$i + (i32.const 1) + ) + (set_local $$z$7$i$lcssa + (get_local $$z$7$i) + ) + (br $while-out$96) + ) ) + (br $while-in$97) ) + ) + (block $do-once$98 (if - (get_local $$cmp636$506$i) + (get_local $$cmp338$i) (block - (set_local $$estr$1507$i - (get_local $$243) + (set_local $$236 + (i32.and + (get_local $$tobool341$i) + (i32.const 1) + ) ) - (loop $while-out$104 $while-in$105 - (set_local $$incdec$ptr639$i - (i32.add - (get_local $$estr$1507$i) - (i32.const -1) - ) + (set_local $$inc468$i + (i32.xor + (get_local $$236) + (i32.const 1) ) - (i32.store8 - (get_local $$incdec$ptr639$i) - (i32.const 48) + ) + (set_local $$$p$inc468$i + (i32.add + (get_local $$inc468$i) + (get_local $$$p$i) ) - (set_local $$sub$ptr$rhs$cast634$i - (get_local $$incdec$ptr639$i) + ) + (set_local $$cmp470$i + (i32.gt_s + (get_local $$$p$inc468$i) + (get_local $$e$5$ph$i) ) - (set_local $$sub$ptr$sub635$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast634$i) - ) + ) + (set_local $$cmp473$i + (i32.gt_s + (get_local $$e$5$ph$i) + (i32.const -5) ) - (set_local $$cmp636$i - (i32.lt_s - (get_local $$sub$ptr$sub635$i) - (i32.const 2) + ) + (set_local $$or$cond2$i + (i32.and + (get_local $$cmp470$i) + (get_local $$cmp473$i) + ) + ) + (if + (get_local $$or$cond2$i) + (block + (set_local $$dec476$i + (i32.add + (get_local $$t$0) + (i32.const -1) + ) + ) + (set_local $$add477$neg$i + (i32.add + (get_local $$$p$inc468$i) + (i32.const -1) + ) + ) + (set_local $$sub478$i + (i32.sub + (get_local $$add477$neg$i) + (get_local $$e$5$ph$i) + ) + ) + (set_local $$p$addr$2$i + (get_local $$sub478$i) + ) + (set_local $$t$addr$0$i + (get_local $$dec476$i) ) ) - (if - (get_local $$cmp636$i) - (set_local $$estr$1507$i - (get_local $$incdec$ptr639$i) + (block + (set_local $$sub480$i + (i32.add + (get_local $$t$0) + (i32.const -2) + ) ) - (block - (set_local $$estr$1$lcssa$i - (get_local $$incdec$ptr639$i) + (set_local $$dec481$i + (i32.add + (get_local $$$p$inc468$i) + (i32.const -1) ) - (br $while-out$104) + ) + (set_local $$p$addr$2$i + (get_local $$dec481$i) + ) + (set_local $$t$addr$0$i + (get_local $$sub480$i) ) ) - (br $while-in$105) - ) - ) - (set_local $$estr$1$lcssa$i - (get_local $$243) - ) - ) - (set_local $$244 - (i32.shr_s - (get_local $$e$5$ph$i) - (i32.const 31) - ) - ) - (set_local $$245 - (i32.and - (get_local $$244) - (i32.const 2) - ) - ) - (set_local $$246 - (i32.add - (get_local $$245) - (i32.const 43) - ) - ) - (set_local $$conv644$i - (i32.and - (get_local $$246) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr645$i - (i32.add - (get_local $$estr$1$lcssa$i) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr645$i) - (get_local $$conv644$i) - ) - (set_local $$conv646$i - (i32.and - (get_local $$t$addr$1$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr647$i - (i32.add - (get_local $$estr$1$lcssa$i) - (i32.const -2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr647$i) - (get_local $$conv646$i) - ) - (set_local $$sub$ptr$rhs$cast649$i - (get_local $$incdec$ptr647$i) - ) - (set_local $$sub$ptr$sub650$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast649$i) - ) - ) - (set_local $$estr$2$i - (get_local $$incdec$ptr647$i) - ) - (set_local $$sub$ptr$sub650$pn$i - (get_local $$sub$ptr$sub650$i) - ) - ) - ) - (set_local $$add608$i - (i32.add - (get_local $$pl$0$i) - (i32.const 1) - ) - ) - (set_local $$add612$i - (i32.add - (get_local $$add608$i) - (get_local $$p$addr$3$i) - ) - ) - (set_local $$l$1$i - (i32.add - (get_local $$add612$i) - (get_local $$lor$ext$i) - ) - ) - (set_local $$add653$i - (i32.add - (get_local $$l$1$i) - (get_local $$sub$ptr$sub650$pn$i) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$fl$1$and219) - ) - (set_local $$247 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$436$i - (i32.and - (get_local $$247) - (i32.const 32) - ) - ) - (set_local $$tobool$i$437$i - (i32.eq - (get_local $$and$i$436$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$437$i) - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$0$i) - (get_local $$f) - ) - ) - (set_local $$xor655$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 65536) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$xor655$i) - ) - (block $do-once$106 - (if - (get_local $$cmp614$i) - (block - (set_local $$cmp660$i - (i32.gt_u - (get_local $$a$9$ph$i) - (get_local $$arraydecay208$add$ptr213$i) - ) - ) - (set_local $$r$0$a$9$i - (if - (get_local $$cmp660$i) - (get_local $$arraydecay208$add$ptr213$i) - (get_local $$a$9$ph$i) ) - ) - (set_local $$d$5494$i - (get_local $$r$0$a$9$i) - ) - (loop $while-out$114 $while-in$115 - (set_local $$248 - (i32.load - (get_local $$d$5494$i) + (set_local $$and483$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) ) ) - (set_local $$249 - (call $_fmt_u - (get_local $$248) + (set_local $$tobool484$i + (i32.eq + (get_local $$and483$i) (i32.const 0) - (get_local $$add$ptr671$i) ) ) - (set_local $$cmp673$i - (i32.eq - (get_local $$d$5494$i) - (get_local $$r$0$a$9$i) + (if + (i32.eqz + (get_local $$tobool484$i) + ) + (block + (set_local $$and610$pre$phi$iZ2D + (get_local $$and483$i) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$i) + ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) ) ) - (block $do-once$116 + (block $do-once$100 (if - (get_local $$cmp673$i) + (get_local $$cmp450$lcssa$i) (block - (set_local $$cmp686$i + (set_local $$arrayidx489$i + (i32.add + (get_local $$z$7$i$lcssa) + (i32.const -4) + ) + ) + (set_local $$237 + (i32.load + (get_local $$arrayidx489$i) + ) + ) + (set_local $$tobool490$i (i32.eq - (get_local $$249) - (get_local $$add$ptr671$i) + (get_local $$237) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp686$i) - ) + (get_local $$tobool490$i) (block - (set_local $$s668$1$i - (get_local $$249) + (set_local $$j$2$i + (i32.const 9) ) - (br $do-once$116) + (br $do-once$100) ) ) - (i32.store8 - (get_local $$incdec$ptr689$i) - (i32.const 48) - ) - (set_local $$s668$1$i - (get_local $$incdec$ptr689$i) + (set_local $$rem494$510$i + (i32.and + (i32.rem_u + (get_local $$237) + (i32.const 10) + ) + (i32.const -1) + ) ) - ) - (block - (set_local $$cmp678$491$i - (i32.gt_u - (get_local $$249) - (get_local $$buf$i) + (set_local $$cmp495$511$i + (i32.eq + (get_local $$rem494$510$i) + (i32.const 0) ) ) (if - (get_local $$cmp678$491$i) - (set_local $$s668$0492$i - (get_local $$249) + (get_local $$cmp495$511$i) + (block + (set_local $$i$3512$i + (i32.const 10) + ) + (set_local $$j$1513$i + (i32.const 0) + ) ) (block - (set_local $$s668$1$i - (get_local $$249) + (set_local $$j$2$i + (i32.const 0) ) - (br $do-once$116) + (br $do-once$100) ) ) - (loop $while-out$118 $while-in$119 - (set_local $$incdec$ptr681$i - (i32.add - (get_local $$s668$0492$i) - (i32.const -1) + (loop $while-in$103 + (block $while-out$102 + (set_local $$mul499$i + (i32.mul + (get_local $$i$3512$i) + (i32.const 10) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr681$i) - (i32.const 48) - ) - (set_local $$cmp678$i - (i32.gt_u - (get_local $$incdec$ptr681$i) - (get_local $$buf$i) + (set_local $$inc500$i + (i32.add + (get_local $$j$1513$i) + (i32.const 1) + ) ) - ) - (if - (get_local $$cmp678$i) - (set_local $$s668$0492$i - (get_local $$incdec$ptr681$i) + (set_local $$rem494$i + (i32.and + (i32.rem_u + (get_local $$237) + (get_local $$mul499$i) + ) + (i32.const -1) + ) ) - (block - (set_local $$s668$1$i - (get_local $$incdec$ptr681$i) + (set_local $$cmp495$i + (i32.eq + (get_local $$rem494$i) + (i32.const 0) + ) + ) + (if + (get_local $$cmp495$i) + (block + (set_local $$i$3512$i + (get_local $$mul499$i) + ) + (set_local $$j$1513$i + (get_local $$inc500$i) + ) + ) + (block + (set_local $$j$2$i + (get_local $$inc500$i) + ) + (br $while-out$102) ) - (br $while-out$118) ) + (br $while-in$103) ) - (br $while-in$119) ) ) + (set_local $$j$2$i + (i32.const 9) + ) ) ) - (set_local $$250 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$442$i - (i32.and - (get_local $$250) + (set_local $$or504$i + (i32.or + (get_local $$t$addr$0$i) (i32.const 32) ) ) - (set_local $$tobool$i$443$i + (set_local $$cmp505$i (i32.eq - (get_local $$and$i$442$i) - (i32.const 0) + (get_local $$or504$i) + (i32.const 102) + ) + ) + (set_local $$sub$ptr$lhs$cast508$i + (get_local $$z$7$i$lcssa) + ) + (set_local $$sub$ptr$sub510$i + (i32.sub + (get_local $$sub$ptr$lhs$cast508$i) + (get_local $$sub$ptr$rhs$cast345$i) + ) + ) + (set_local $$sub$ptr$div511$i + (i32.shr_s + (get_local $$sub$ptr$sub510$i) + (i32.const 2) + ) + ) + (set_local $$238 + (i32.mul + (get_local $$sub$ptr$div511$i) + (i32.const 9) + ) + ) + (set_local $$mul513$i + (i32.add + (get_local $$238) + (i32.const -9) ) ) (if - (get_local $$tobool$i$443$i) + (get_local $$cmp505$i) + (block + (set_local $$sub514$i + (i32.sub + (get_local $$mul513$i) + (get_local $$j$2$i) + ) + ) + (set_local $$cmp515$i + (i32.lt_s + (get_local $$sub514$i) + (i32.const 0) + ) + ) + (set_local $$$sub514$i + (if + (get_local $$cmp515$i) + (i32.const 0) + (get_local $$sub514$i) + ) + ) + (set_local $$cmp528$i + (i32.lt_s + (get_local $$p$addr$2$i) + (get_local $$$sub514$i) + ) + ) + (set_local $$p$addr$2$$sub514398$i + (if + (get_local $$cmp528$i) + (get_local $$p$addr$2$i) + (get_local $$$sub514$i) + ) + ) + (set_local $$and610$pre$phi$iZ2D + (i32.const 0) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$$sub514398$i) + ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) + ) (block - (set_local $$sub$ptr$rhs$cast695$i - (get_local $$s668$1$i) + (set_local $$add561$i + (i32.add + (get_local $$mul513$i) + (get_local $$e$5$ph$i) + ) ) - (set_local $$sub$ptr$sub696$i + (set_local $$sub562$i (i32.sub - (get_local $$sub$ptr$lhs$cast694$i) - (get_local $$sub$ptr$rhs$cast695$i) + (get_local $$add561$i) + (get_local $$j$2$i) + ) + ) + (set_local $$cmp563$i + (i32.lt_s + (get_local $$sub562$i) + (i32.const 0) + ) + ) + (set_local $$$sub562$i + (if + (get_local $$cmp563$i) + (i32.const 0) + (get_local $$sub562$i) + ) + ) + (set_local $$cmp577$i + (i32.lt_s + (get_local $$p$addr$2$i) + (get_local $$$sub562$i) + ) + ) + (set_local $$p$addr$2$$sub562399$i + (if + (get_local $$cmp577$i) + (get_local $$p$addr$2$i) + (get_local $$$sub562$i) ) ) - (call $___fwritex - (get_local $$s668$1$i) - (get_local $$sub$ptr$sub696$i) - (get_local $$f) + (set_local $$and610$pre$phi$iZ2D + (i32.const 0) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$$sub562399$i) ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) ) ) - (set_local $$incdec$ptr698$i - (i32.add - (get_local $$d$5494$i) - (i32.const 4) + ) + (block + (set_local $$$pre567$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) ) ) - (set_local $$cmp665$i - (i32.gt_u - (get_local $$incdec$ptr698$i) - (get_local $$arraydecay208$add$ptr213$i) - ) + (set_local $$and610$pre$phi$iZ2D + (get_local $$$pre567$i) + ) + (set_local $$p$addr$3$i + (get_local $$$p$i) ) + (set_local $$t$addr$1$i + (get_local $$t$0) + ) + ) + ) + ) + (set_local $$239 + (i32.or + (get_local $$p$addr$3$i) + (get_local $$and610$pre$phi$iZ2D) + ) + ) + (set_local $$240 + (i32.ne + (get_local $$239) + (i32.const 0) + ) + ) + (set_local $$lor$ext$i + (i32.and + (get_local $$240) + (i32.const 1) + ) + ) + (set_local $$or613$i + (i32.or + (get_local $$t$addr$1$i) + (i32.const 32) + ) + ) + (set_local $$cmp614$i + (i32.eq + (get_local $$or613$i) + (i32.const 102) + ) + ) + (if + (get_local $$cmp614$i) + (block + (set_local $$cmp617$i + (i32.gt_s + (get_local $$e$5$ph$i) + (i32.const 0) + ) + ) + (set_local $$add620$i (if - (get_local $$cmp665$i) - (block - (set_local $$incdec$ptr698$i$lcssa - (get_local $$incdec$ptr698$i) - ) - (br $while-out$114) - ) - (set_local $$d$5494$i - (get_local $$incdec$ptr698$i) - ) + (get_local $$cmp617$i) + (get_local $$e$5$ph$i) + (i32.const 0) ) - (br $while-in$115) ) - (set_local $$251 - (i32.eq - (get_local $$239) + (set_local $$estr$2$i + (i32.const 0) + ) + (set_local $$sub$ptr$sub650$pn$i + (get_local $$add620$i) + ) + ) + (block + (set_local $$cmp623$i + (i32.lt_s + (get_local $$e$5$ph$i) (i32.const 0) ) ) - (block $do-once$120 + (set_local $$cond629$i (if - (i32.eqz - (get_local $$251) + (get_local $$cmp623$i) + (get_local $$sub626$le$i) + (get_local $$e$5$ph$i) + ) + ) + (set_local $$241 + (i32.lt_s + (get_local $$cond629$i) + (i32.const 0) + ) + ) + (set_local $$242 + (i32.shr_s + (i32.shl + (get_local $$241) + (i32.const 31) ) - (block - (set_local $$252 - (i32.load - (get_local $$f) + (i32.const 31) + ) + ) + (set_local $$243 + (call $_fmt_u + (get_local $$cond629$i) + (get_local $$242) + (get_local $$arrayidx$i$236) + ) + ) + (set_local $$sub$ptr$rhs$cast634$504$i + (get_local $$243) + ) + (set_local $$sub$ptr$sub635$505$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast634$504$i) + ) + ) + (set_local $$cmp636$506$i + (i32.lt_s + (get_local $$sub$ptr$sub635$505$i) + (i32.const 2) + ) + ) + (if + (get_local $$cmp636$506$i) + (block + (set_local $$estr$1507$i + (get_local $$243) + ) + (loop $while-in$105 + (block $while-out$104 + (set_local $$incdec$ptr639$i + (i32.add + (get_local $$estr$1507$i) + (i32.const -1) + ) ) - ) - (set_local $$and$i$448$i - (i32.and - (get_local $$252) - (i32.const 32) + (i32.store8 + (get_local $$incdec$ptr639$i) + (i32.const 48) ) - ) - (set_local $$tobool$i$449$i - (i32.eq - (get_local $$and$i$448$i) - (i32.const 0) + (set_local $$sub$ptr$rhs$cast634$i + (get_local $$incdec$ptr639$i) ) - ) - (if - (i32.eqz - (get_local $$tobool$i$449$i) + (set_local $$sub$ptr$sub635$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast634$i) + ) + ) + (set_local $$cmp636$i + (i32.lt_s + (get_local $$sub$ptr$sub635$i) + (i32.const 2) + ) + ) + (if + (get_local $$cmp636$i) + (set_local $$estr$1507$i + (get_local $$incdec$ptr639$i) + ) + (block + (set_local $$estr$1$lcssa$i + (get_local $$incdec$ptr639$i) + ) + (br $while-out$104) + ) ) - (br $do-once$120) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (br $while-in$105) ) ) ) + (set_local $$estr$1$lcssa$i + (get_local $$243) + ) ) - (set_local $$cmp707$486$i - (i32.lt_u - (get_local $$incdec$ptr698$i$lcssa) - (get_local $$z$7$i$lcssa) + (set_local $$244 + (i32.shr_s + (get_local $$e$5$ph$i) + (i32.const 31) ) ) - (set_local $$cmp710$487$i - (i32.gt_s - (get_local $$p$addr$3$i) - (i32.const 0) + (set_local $$245 + (i32.and + (get_local $$244) + (i32.const 2) + ) + ) + (set_local $$246 + (i32.add + (get_local $$245) + (i32.const 43) ) ) - (set_local $$253 + (set_local $$conv644$i (i32.and - (get_local $$cmp710$487$i) - (get_local $$cmp707$486$i) + (get_local $$246) + (i32.const 255) ) ) - (if - (get_local $$253) - (block - (set_local $$d$6488$i - (get_local $$incdec$ptr698$i$lcssa) + (set_local $$incdec$ptr645$i + (i32.add + (get_local $$estr$1$lcssa$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr645$i) + (get_local $$conv644$i) + ) + (set_local $$conv646$i + (i32.and + (get_local $$t$addr$1$i) + (i32.const 255) + ) + ) + (set_local $$incdec$ptr647$i + (i32.add + (get_local $$estr$1$lcssa$i) + (i32.const -2) + ) + ) + (i32.store8 + (get_local $$incdec$ptr647$i) + (get_local $$conv646$i) + ) + (set_local $$sub$ptr$rhs$cast649$i + (get_local $$incdec$ptr647$i) + ) + (set_local $$sub$ptr$sub650$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast649$i) + ) + ) + (set_local $$estr$2$i + (get_local $$incdec$ptr647$i) + ) + (set_local $$sub$ptr$sub650$pn$i + (get_local $$sub$ptr$sub650$i) + ) + ) + ) + (set_local $$add608$i + (i32.add + (get_local $$pl$0$i) + (i32.const 1) + ) + ) + (set_local $$add612$i + (i32.add + (get_local $$add608$i) + (get_local $$p$addr$3$i) + ) + ) + (set_local $$l$1$i + (i32.add + (get_local $$add612$i) + (get_local $$lor$ext$i) + ) + ) + (set_local $$add653$i + (i32.add + (get_local $$l$1$i) + (get_local $$sub$ptr$sub650$pn$i) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add653$i) + (get_local $$fl$1$and219) + ) + (set_local $$247 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$436$i + (i32.and + (get_local $$247) + (i32.const 32) + ) + ) + (set_local $$tobool$i$437$i + (i32.eq + (get_local $$and$i$436$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$437$i) + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$0$i) + (get_local $$f) + ) + ) + (set_local $$xor655$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$1) + (get_local $$add653$i) + (get_local $$xor655$i) + ) + (block $do-once$106 + (if + (get_local $$cmp614$i) + (block + (set_local $$cmp660$i + (i32.gt_u + (get_local $$a$9$ph$i) + (get_local $$arraydecay208$add$ptr213$i) ) - (set_local $$p$addr$4489$i - (get_local $$p$addr$3$i) + ) + (set_local $$r$0$a$9$i + (if + (get_local $$cmp660$i) + (get_local $$arraydecay208$add$ptr213$i) + (get_local $$a$9$ph$i) ) - (loop $while-out$122 $while-in$123 - (set_local $$254 + ) + (set_local $$d$5494$i + (get_local $$r$0$a$9$i) + ) + (loop $while-in$115 + (block $while-out$114 + (set_local $$248 (i32.load - (get_local $$d$6488$i) + (get_local $$d$5494$i) ) ) - (set_local $$255 + (set_local $$249 (call $_fmt_u - (get_local $$254) + (get_local $$248) (i32.const 0) (get_local $$add$ptr671$i) ) ) - (set_local $$cmp722$483$i - (i32.gt_u - (get_local $$255) - (get_local $$buf$i) + (set_local $$cmp673$i + (i32.eq + (get_local $$d$5494$i) + (get_local $$r$0$a$9$i) ) ) - (if - (get_local $$cmp722$483$i) - (block - (set_local $$s715$0484$i - (get_local $$255) - ) - (loop $while-out$124 $while-in$125 - (set_local $$incdec$ptr725$i - (i32.add - (get_local $$s715$0484$i) - (i32.const -1) + (block $do-once$116 + (if + (get_local $$cmp673$i) + (block + (set_local $$cmp686$i + (i32.eq + (get_local $$249) + (get_local $$add$ptr671$i) + ) + ) + (if + (i32.eqz + (get_local $$cmp686$i) + ) + (block + (set_local $$s668$1$i + (get_local $$249) + ) + (br $do-once$116) ) ) (i32.store8 - (get_local $$incdec$ptr725$i) + (get_local $$incdec$ptr689$i) (i32.const 48) ) - (set_local $$cmp722$i + (set_local $$s668$1$i + (get_local $$incdec$ptr689$i) + ) + ) + (block + (set_local $$cmp678$491$i (i32.gt_u - (get_local $$incdec$ptr725$i) + (get_local $$249) (get_local $$buf$i) ) ) (if - (get_local $$cmp722$i) - (set_local $$s715$0484$i - (get_local $$incdec$ptr725$i) + (get_local $$cmp678$491$i) + (set_local $$s668$0492$i + (get_local $$249) ) (block - (set_local $$s715$0$lcssa$i - (get_local $$incdec$ptr725$i) + (set_local $$s668$1$i + (get_local $$249) + ) + (br $do-once$116) + ) + ) + (loop $while-in$119 + (block $while-out$118 + (set_local $$incdec$ptr681$i + (i32.add + (get_local $$s668$0492$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr681$i) + (i32.const 48) + ) + (set_local $$cmp678$i + (i32.gt_u + (get_local $$incdec$ptr681$i) + (get_local $$buf$i) + ) ) - (br $while-out$124) + (if + (get_local $$cmp678$i) + (set_local $$s668$0492$i + (get_local $$incdec$ptr681$i) + ) + (block + (set_local $$s668$1$i + (get_local $$incdec$ptr681$i) + ) + (br $while-out$118) + ) + ) + (br $while-in$119) ) ) - (br $while-in$125) ) ) - (set_local $$s715$0$lcssa$i - (get_local $$255) - ) ) - (set_local $$256 + (set_local $$250 (i32.load (get_local $$f) ) ) - (set_local $$and$i$454$i + (set_local $$and$i$442$i (i32.and - (get_local $$256) + (get_local $$250) (i32.const 32) ) ) - (set_local $$tobool$i$455$i + (set_local $$tobool$i$443$i (i32.eq - (get_local $$and$i$454$i) + (get_local $$and$i$442$i) (i32.const 0) ) ) (if - (get_local $$tobool$i$455$i) + (get_local $$tobool$i$443$i) (block - (set_local $$cmp727$i - (i32.gt_s - (get_local $$p$addr$4489$i) - (i32.const 9) - ) + (set_local $$sub$ptr$rhs$cast695$i + (get_local $$s668$1$i) ) - (set_local $$cond732$i - (if - (get_local $$cmp727$i) - (i32.const 9) - (get_local $$p$addr$4489$i) + (set_local $$sub$ptr$sub696$i + (i32.sub + (get_local $$sub$ptr$lhs$cast694$i) + (get_local $$sub$ptr$rhs$cast695$i) ) ) (call $___fwritex - (get_local $$s715$0$lcssa$i) - (get_local $$cond732$i) + (get_local $$s668$1$i) + (get_local $$sub$ptr$sub696$i) (get_local $$f) ) ) ) - (set_local $$incdec$ptr734$i + (set_local $$incdec$ptr698$i (i32.add - (get_local $$d$6488$i) + (get_local $$d$5494$i) (i32.const 4) ) ) - (set_local $$sub735$i - (i32.add - (get_local $$p$addr$4489$i) - (i32.const -9) + (set_local $$cmp665$i + (i32.gt_u + (get_local $$incdec$ptr698$i) + (get_local $$arraydecay208$add$ptr213$i) ) ) - (set_local $$cmp707$i - (i32.lt_u - (get_local $$incdec$ptr734$i) - (get_local $$z$7$i$lcssa) + (if + (get_local $$cmp665$i) + (block + (set_local $$incdec$ptr698$i$lcssa + (get_local $$incdec$ptr698$i) + ) + (br $while-out$114) ) - ) - (set_local $$cmp710$i - (i32.gt_s - (get_local $$p$addr$4489$i) - (i32.const 9) + (set_local $$d$5494$i + (get_local $$incdec$ptr698$i) ) ) - (set_local $$257 - (i32.and - (get_local $$cmp710$i) - (get_local $$cmp707$i) + (br $while-in$115) + ) + ) + (set_local $$251 + (i32.eq + (get_local $$239) + (i32.const 0) + ) + ) + (block $do-once$120 + (if + (i32.eqz + (get_local $$251) + ) + (block + (set_local $$252 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$448$i + (i32.and + (get_local $$252) + (i32.const 32) + ) + ) + (set_local $$tobool$i$449$i + (i32.eq + (get_local $$and$i$448$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $$tobool$i$449$i) + ) + (br $do-once$120) + ) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) ) ) - (if - (get_local $$257) - (block - (set_local $$d$6488$i - (get_local $$incdec$ptr734$i) + ) + ) + (set_local $$cmp707$486$i + (i32.lt_u + (get_local $$incdec$ptr698$i$lcssa) + (get_local $$z$7$i$lcssa) + ) + ) + (set_local $$cmp710$487$i + (i32.gt_s + (get_local $$p$addr$3$i) + (i32.const 0) + ) + ) + (set_local $$253 + (i32.and + (get_local $$cmp710$487$i) + (get_local $$cmp707$486$i) + ) + ) + (if + (get_local $$253) + (block + (set_local $$d$6488$i + (get_local $$incdec$ptr698$i$lcssa) + ) + (set_local $$p$addr$4489$i + (get_local $$p$addr$3$i) + ) + (loop $while-in$123 + (block $while-out$122 + (set_local $$254 + (i32.load + (get_local $$d$6488$i) + ) + ) + (set_local $$255 + (call $_fmt_u + (get_local $$254) + (i32.const 0) + (get_local $$add$ptr671$i) + ) + ) + (set_local $$cmp722$483$i + (i32.gt_u + (get_local $$255) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp722$483$i) + (block + (set_local $$s715$0484$i + (get_local $$255) + ) + (loop $while-in$125 + (block $while-out$124 + (set_local $$incdec$ptr725$i + (i32.add + (get_local $$s715$0484$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr725$i) + (i32.const 48) + ) + (set_local $$cmp722$i + (i32.gt_u + (get_local $$incdec$ptr725$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp722$i) + (set_local $$s715$0484$i + (get_local $$incdec$ptr725$i) + ) + (block + (set_local $$s715$0$lcssa$i + (get_local $$incdec$ptr725$i) + ) + (br $while-out$124) + ) + ) + (br $while-in$125) + ) + ) + ) + (set_local $$s715$0$lcssa$i + (get_local $$255) + ) + ) + (set_local $$256 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$454$i + (i32.and + (get_local $$256) + (i32.const 32) + ) + ) + (set_local $$tobool$i$455$i + (i32.eq + (get_local $$and$i$454$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$455$i) + (block + (set_local $$cmp727$i + (i32.gt_s + (get_local $$p$addr$4489$i) + (i32.const 9) + ) + ) + (set_local $$cond732$i + (if + (get_local $$cmp727$i) + (i32.const 9) + (get_local $$p$addr$4489$i) + ) + ) + (call $___fwritex + (get_local $$s715$0$lcssa$i) + (get_local $$cond732$i) + (get_local $$f) + ) + ) ) - (set_local $$p$addr$4489$i - (get_local $$sub735$i) + (set_local $$incdec$ptr734$i + (i32.add + (get_local $$d$6488$i) + (i32.const 4) + ) ) - ) - (block - (set_local $$p$addr$4$lcssa$i - (get_local $$sub735$i) + (set_local $$sub735$i + (i32.add + (get_local $$p$addr$4489$i) + (i32.const -9) + ) + ) + (set_local $$cmp707$i + (i32.lt_u + (get_local $$incdec$ptr734$i) + (get_local $$z$7$i$lcssa) + ) + ) + (set_local $$cmp710$i + (i32.gt_s + (get_local $$p$addr$4489$i) + (i32.const 9) + ) + ) + (set_local $$257 + (i32.and + (get_local $$cmp710$i) + (get_local $$cmp707$i) + ) + ) + (if + (get_local $$257) + (block + (set_local $$d$6488$i + (get_local $$incdec$ptr734$i) + ) + (set_local $$p$addr$4489$i + (get_local $$sub735$i) + ) + ) + (block + (set_local $$p$addr$4$lcssa$i + (get_local $$sub735$i) + ) + (br $while-out$122) + ) ) - (br $while-out$122) + (br $while-in$123) ) ) - (br $while-in$123) + ) + (set_local $$p$addr$4$lcssa$i + (get_local $$p$addr$3$i) ) ) - (set_local $$p$addr$4$lcssa$i - (get_local $$p$addr$3$i) + (set_local $$add737$i + (i32.add + (get_local $$p$addr$4$lcssa$i) + (i32.const 9) + ) ) - ) - (set_local $$add737$i - (i32.add - (get_local $$p$addr$4$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$add737$i) (i32.const 9) + (i32.const 0) ) ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$add737$i) - (i32.const 9) - (i32.const 0) - ) - ) - (block - (set_local $$add$ptr742$i - (i32.add - (get_local $$a$9$ph$i) - (i32.const 4) - ) - ) - (set_local $$z$7$add$ptr742$i - (if - (get_local $$cmp450$lcssa$i) - (get_local $$z$7$i$lcssa) - (get_local $$add$ptr742$i) - ) - ) - (set_local $$cmp748$499$i - (i32.gt_s - (get_local $$p$addr$3$i) - (i32.const -1) - ) - ) - (if - (get_local $$cmp748$499$i) - (block - (set_local $$tobool781$i - (i32.eq - (get_local $$and610$pre$phi$iZ2D) - (i32.const 0) - ) - ) - (set_local $$d$7500$i + (block + (set_local $$add$ptr742$i + (i32.add (get_local $$a$9$ph$i) + (i32.const 4) ) - (set_local $$p$addr$5501$i + ) + (set_local $$z$7$add$ptr742$i + (if + (get_local $$cmp450$lcssa$i) + (get_local $$z$7$i$lcssa) + (get_local $$add$ptr742$i) + ) + ) + (set_local $$cmp748$499$i + (i32.gt_s (get_local $$p$addr$3$i) + (i32.const -1) ) - (loop $while-out$108 $while-in$109 - (set_local $$258 - (i32.load - (get_local $$d$7500$i) - ) - ) - (set_local $$259 - (call $_fmt_u - (get_local $$258) - (i32.const 0) - (get_local $$add$ptr671$i) - ) - ) - (set_local $$cmp760$i + ) + (if + (get_local $$cmp748$499$i) + (block + (set_local $$tobool781$i (i32.eq - (get_local $$259) - (get_local $$add$ptr671$i) + (get_local $$and610$pre$phi$iZ2D) + (i32.const 0) ) ) - (if - (get_local $$cmp760$i) - (block - (i32.store8 - (get_local $$incdec$ptr689$i) - (i32.const 48) - ) - (set_local $$s753$0$i - (get_local $$incdec$ptr689$i) - ) - ) - (set_local $$s753$0$i - (get_local $$259) - ) + (set_local $$d$7500$i + (get_local $$a$9$ph$i) ) - (set_local $$cmp765$i - (i32.eq - (get_local $$d$7500$i) - (get_local $$a$9$ph$i) - ) + (set_local $$p$addr$5501$i + (get_local $$p$addr$3$i) ) - (block $do-once$110 - (if - (get_local $$cmp765$i) - (block - (set_local $$incdec$ptr776$i - (i32.add - (get_local $$s753$0$i) - (i32.const 1) - ) + (loop $while-in$109 + (block $while-out$108 + (set_local $$258 + (i32.load + (get_local $$d$7500$i) ) - (set_local $$260 - (i32.load - (get_local $$f) - ) + ) + (set_local $$259 + (call $_fmt_u + (get_local $$258) + (i32.const 0) + (get_local $$add$ptr671$i) ) - (set_local $$and$i$460$i - (i32.and - (get_local $$260) - (i32.const 32) - ) + ) + (set_local $$cmp760$i + (i32.eq + (get_local $$259) + (get_local $$add$ptr671$i) ) - (set_local $$tobool$i$461$i - (i32.eq - (get_local $$and$i$460$i) - (i32.const 0) + ) + (if + (get_local $$cmp760$i) + (block + (i32.store8 + (get_local $$incdec$ptr689$i) + (i32.const 48) ) - ) - (if - (get_local $$tobool$i$461$i) - (call $___fwritex - (get_local $$s753$0$i) - (i32.const 1) - (get_local $$f) + (set_local $$s753$0$i + (get_local $$incdec$ptr689$i) ) ) - (set_local $$cmp777$i - (i32.lt_s - (get_local $$p$addr$5501$i) - (i32.const 1) - ) + (set_local $$s753$0$i + (get_local $$259) ) - (set_local $$or$cond401$i - (i32.and - (get_local $$tobool781$i) - (get_local $$cmp777$i) - ) + ) + (set_local $$cmp765$i + (i32.eq + (get_local $$d$7500$i) + (get_local $$a$9$ph$i) ) + ) + (block $do-once$110 (if - (get_local $$or$cond401$i) + (get_local $$cmp765$i) (block + (set_local $$incdec$ptr776$i + (i32.add + (get_local $$s753$0$i) + (i32.const 1) + ) + ) + (set_local $$260 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$460$i + (i32.and + (get_local $$260) + (i32.const 32) + ) + ) + (set_local $$tobool$i$461$i + (i32.eq + (get_local $$and$i$460$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$461$i) + (call $___fwritex + (get_local $$s753$0$i) + (i32.const 1) + (get_local $$f) + ) + ) + (set_local $$cmp777$i + (i32.lt_s + (get_local $$p$addr$5501$i) + (i32.const 1) + ) + ) + (set_local $$or$cond401$i + (i32.and + (get_local $$tobool781$i) + (get_local $$cmp777$i) + ) + ) + (if + (get_local $$or$cond401$i) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr776$i) + ) + (br $do-once$110) + ) + ) + (set_local $$261 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$466$i + (i32.and + (get_local $$261) + (i32.const 32) + ) + ) + (set_local $$tobool$i$467$i + (i32.eq + (get_local $$and$i$466$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $$tobool$i$467$i) + ) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr776$i) + ) + (br $do-once$110) + ) + ) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) + ) (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) - ) - ) - (set_local $$261 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$466$i - (i32.and - (get_local $$261) - (i32.const 32) - ) - ) - (set_local $$tobool$i$467$i - (i32.eq - (get_local $$and$i$466$i) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool$i$467$i) ) (block - (set_local $$s753$2$i - (get_local $$incdec$ptr776$i) + (set_local $$cmp770$495$i + (i32.gt_u + (get_local $$s753$0$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp770$495$i) + (set_local $$s753$1496$i + (get_local $$s753$0$i) + ) + (block + (set_local $$s753$2$i + (get_local $$s753$0$i) + ) + (br $do-once$110) + ) + ) + (loop $while-in$113 + (block $while-out$112 + (set_local $$incdec$ptr773$i + (i32.add + (get_local $$s753$1496$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr773$i) + (i32.const 48) + ) + (set_local $$cmp770$i + (i32.gt_u + (get_local $$incdec$ptr773$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp770$i) + (set_local $$s753$1496$i + (get_local $$incdec$ptr773$i) + ) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr773$i) + ) + (br $while-out$112) + ) + ) + (br $while-in$113) + ) ) - (br $do-once$110) ) ) - (drop - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) - ) + ) + (set_local $$sub$ptr$rhs$cast788$i + (get_local $$s753$2$i) + ) + (set_local $$sub$ptr$sub789$i + (i32.sub + (get_local $$sub$ptr$lhs$cast694$i) + (get_local $$sub$ptr$rhs$cast788$i) ) - (set_local $$s753$2$i - (get_local $$incdec$ptr776$i) + ) + (set_local $$262 + (i32.load + (get_local $$f) ) ) - (block - (set_local $$cmp770$495$i - (i32.gt_u - (get_local $$s753$0$i) - (get_local $$buf$i) - ) + (set_local $$and$i$472$i + (i32.and + (get_local $$262) + (i32.const 32) ) - (if - (get_local $$cmp770$495$i) - (set_local $$s753$1496$i - (get_local $$s753$0$i) - ) - (block - (set_local $$s753$2$i - (get_local $$s753$0$i) - ) - (br $do-once$110) - ) + ) + (set_local $$tobool$i$473$i + (i32.eq + (get_local $$and$i$472$i) + (i32.const 0) ) - (loop $while-out$112 $while-in$113 - (set_local $$incdec$ptr773$i - (i32.add - (get_local $$s753$1496$i) - (i32.const -1) + ) + (if + (get_local $$tobool$i$473$i) + (block + (set_local $$cmp790$i + (i32.gt_s + (get_local $$p$addr$5501$i) + (get_local $$sub$ptr$sub789$i) ) ) - (i32.store8 - (get_local $$incdec$ptr773$i) - (i32.const 48) - ) - (set_local $$cmp770$i - (i32.gt_u - (get_local $$incdec$ptr773$i) - (get_local $$buf$i) + (set_local $$cond800$i + (if + (get_local $$cmp790$i) + (get_local $$sub$ptr$sub789$i) + (get_local $$p$addr$5501$i) ) ) - (if - (get_local $$cmp770$i) - (set_local $$s753$1496$i - (get_local $$incdec$ptr773$i) - ) - (block - (set_local $$s753$2$i - (get_local $$incdec$ptr773$i) - ) - (br $while-out$112) - ) + (call $___fwritex + (get_local $$s753$2$i) + (get_local $$cond800$i) + (get_local $$f) ) - (br $while-in$113) ) ) - ) - ) - (set_local $$sub$ptr$rhs$cast788$i - (get_local $$s753$2$i) - ) - (set_local $$sub$ptr$sub789$i - (i32.sub - (get_local $$sub$ptr$lhs$cast694$i) - (get_local $$sub$ptr$rhs$cast788$i) - ) - ) - (set_local $$262 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$472$i - (i32.and - (get_local $$262) - (i32.const 32) - ) - ) - (set_local $$tobool$i$473$i - (i32.eq - (get_local $$and$i$472$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$473$i) - (block - (set_local $$cmp790$i - (i32.gt_s + (set_local $$sub806$i + (i32.sub (get_local $$p$addr$5501$i) (get_local $$sub$ptr$sub789$i) ) ) - (set_local $$cond800$i - (if - (get_local $$cmp790$i) - (get_local $$sub$ptr$sub789$i) - (get_local $$p$addr$5501$i) + (set_local $$incdec$ptr808$i + (i32.add + (get_local $$d$7500$i) + (i32.const 4) ) ) - (call $___fwritex - (get_local $$s753$2$i) - (get_local $$cond800$i) - (get_local $$f) + (set_local $$cmp745$i + (i32.lt_u + (get_local $$incdec$ptr808$i) + (get_local $$z$7$add$ptr742$i) + ) ) - ) - ) - (set_local $$sub806$i - (i32.sub - (get_local $$p$addr$5501$i) - (get_local $$sub$ptr$sub789$i) - ) - ) - (set_local $$incdec$ptr808$i - (i32.add - (get_local $$d$7500$i) - (i32.const 4) - ) - ) - (set_local $$cmp745$i - (i32.lt_u - (get_local $$incdec$ptr808$i) - (get_local $$z$7$add$ptr742$i) - ) - ) - (set_local $$cmp748$i - (i32.gt_s - (get_local $$sub806$i) - (i32.const -1) - ) - ) - (set_local $$263 - (i32.and - (get_local $$cmp745$i) - (get_local $$cmp748$i) - ) - ) - (if - (get_local $$263) - (block - (set_local $$d$7500$i - (get_local $$incdec$ptr808$i) + (set_local $$cmp748$i + (i32.gt_s + (get_local $$sub806$i) + (i32.const -1) + ) ) - (set_local $$p$addr$5501$i - (get_local $$sub806$i) + (set_local $$263 + (i32.and + (get_local $$cmp745$i) + (get_local $$cmp748$i) + ) ) - ) - (block - (set_local $$p$addr$5$lcssa$i - (get_local $$sub806$i) + (if + (get_local $$263) + (block + (set_local $$d$7500$i + (get_local $$incdec$ptr808$i) + ) + (set_local $$p$addr$5501$i + (get_local $$sub806$i) + ) + ) + (block + (set_local $$p$addr$5$lcssa$i + (get_local $$sub806$i) + ) + (br $while-out$108) + ) ) - (br $while-out$108) + (br $while-in$109) ) ) - (br $while-in$109) + ) + (set_local $$p$addr$5$lcssa$i + (get_local $$p$addr$3$i) ) ) - (set_local $$p$addr$5$lcssa$i - (get_local $$p$addr$3$i) + (set_local $$add810$i + (i32.add + (get_local $$p$addr$5$lcssa$i) + (i32.const 18) + ) ) - ) - (set_local $$add810$i - (i32.add - (get_local $$p$addr$5$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$add810$i) (i32.const 18) + (i32.const 0) ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$add810$i) - (i32.const 18) - (i32.const 0) - ) - (set_local $$264 - (i32.load - (get_local $$f) + (set_local $$264 + (i32.load + (get_local $$f) + ) ) - ) - (set_local $$and$i$i - (i32.and - (get_local $$264) - (i32.const 32) + (set_local $$and$i$i + (i32.and + (get_local $$264) + (i32.const 32) + ) ) - ) - (set_local $$tobool$i$i - (i32.eq - (get_local $$and$i$i) - (i32.const 0) + (set_local $$tobool$i$i + (i32.eq + (get_local $$and$i$i) + (i32.const 0) + ) ) - ) - (if - (i32.eqz - (get_local $$tobool$i$i) + (if + (i32.eqz + (get_local $$tobool$i$i) + ) + (br $do-once$106) ) - (br $do-once$106) - ) - (set_local $$sub$ptr$rhs$cast812$i - (get_local $$estr$2$i) - ) - (set_local $$sub$ptr$sub813$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast812$i) + (set_local $$sub$ptr$rhs$cast812$i + (get_local $$estr$2$i) + ) + (set_local $$sub$ptr$sub813$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast812$i) + ) + ) + (call $___fwritex + (get_local $$estr$2$i) + (get_local $$sub$ptr$sub813$i) + (get_local $$f) ) - ) - (call $___fwritex - (get_local $$estr$2$i) - (get_local $$sub$ptr$sub813$i) - (get_local $$f) ) ) ) - ) - (set_local $$xor816$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$xor816$i) - ) - (set_local $$cmp818$i - (i32.lt_s - (get_local $$add653$i) - (get_local $$w$1) + (set_local $$xor816$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$w$add653$i - (if - (get_local $$cmp818$i) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$add653$i) + (get_local $$xor816$i) ) - ) - (set_local $$retval$0$i - (get_local $$w$add653$i) - ) - ) - (block - (set_local $$and36$i - (i32.and - (get_local $$t$0) - (i32.const 32) + (set_local $$cmp818$i + (i32.lt_s + (get_local $$add653$i) + (get_local $$w$1) + ) ) - ) - (set_local $$tobool37$i - (i32.ne - (get_local $$and36$i) - (i32.const 0) + (set_local $$w$add653$i + (if + (get_local $$cmp818$i) + (get_local $$w$1) + (get_local $$add653$i) + ) ) - ) - (set_local $$cond$i - (if - (get_local $$tobool37$i) - (i32.const 4127) - (i32.const 4131) + (set_local $$retval$0$i + (get_local $$w$add653$i) ) ) - (set_local $$cmp38$i - (i32.or - (f64.ne - (get_local $$y$addr$0$i) - (get_local $$y$addr$0$i) + (block + (set_local $$and36$i + (i32.and + (get_local $$t$0) + (i32.const 32) ) - (f64.ne - (f64.const 0) - (f64.const 0) + ) + (set_local $$tobool37$i + (i32.ne + (get_local $$and36$i) + (i32.const 0) ) ) - ) - (set_local $$cond43$i - (if - (get_local $$tobool37$i) - (i32.const 4135) - (i32.const 4139) + (set_local $$cond$i + (if + (get_local $$tobool37$i) + (i32.const 4127) + (i32.const 4131) + ) ) - ) - (set_local $$pl$1$i - (if - (get_local $$cmp38$i) - (i32.const 0) - (get_local $$pl$0$i) + (set_local $$cmp38$i + (i32.or + (f64.ne + (get_local $$y$addr$0$i) + (get_local $$y$addr$0$i) + ) + (f64.ne + (f64.const 0) + (f64.const 0) + ) + ) ) - ) - (set_local $$s35$0$i - (if - (get_local $$cmp38$i) - (get_local $$cond43$i) - (get_local $$cond$i) + (set_local $$cond43$i + (if + (get_local $$tobool37$i) + (i32.const 4135) + (i32.const 4139) + ) ) - ) - (set_local $$add$i$239 - (i32.add - (get_local $$pl$1$i) - (i32.const 3) + (set_local $$pl$1$i + (if + (get_local $$cmp38$i) + (i32.const 0) + (get_local $$pl$0$i) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add$i$239) - (get_local $$and219) - ) - (set_local $$193 - (i32.load - (get_local $$f) + (set_local $$s35$0$i + (if + (get_local $$cmp38$i) + (get_local $$cond43$i) + (get_local $$cond$i) + ) ) - ) - (set_local $$and$i$406$i - (i32.and - (get_local $$193) + (set_local $$add$i$239 + (i32.add + (get_local $$pl$1$i) + (i32.const 3) + ) + ) + (call $_pad + (get_local $$f) (i32.const 32) + (get_local $$w$1) + (get_local $$add$i$239) + (get_local $$and219) ) - ) - (set_local $$tobool$i$407$i - (i32.eq - (get_local $$and$i$406$i) - (i32.const 0) + (set_local $$193 + (i32.load + (get_local $$f) + ) ) - ) - (if - (get_local $$tobool$i$407$i) - (block - (drop - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$1$i) - (get_local $$f) - ) + (set_local $$and$i$406$i + (i32.and + (get_local $$193) + (i32.const 32) ) - (set_local $$$pre$i - (i32.load - (get_local $$f) + ) + (set_local $$tobool$i$407$i + (i32.eq + (get_local $$and$i$406$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$407$i) + (block + (drop + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$1$i) + (get_local $$f) + ) + ) + (set_local $$$pre$i + (i32.load + (get_local $$f) + ) + ) + (set_local $$194 + (get_local $$$pre$i) ) ) (set_local $$194 - (get_local $$$pre$i) + (get_local $$193) ) ) - (set_local $$194 - (get_local $$193) - ) - ) - (set_local $$and$i$412$i - (i32.and - (get_local $$194) - (i32.const 32) - ) - ) - (set_local $$tobool$i$413$i - (i32.eq - (get_local $$and$i$412$i) - (i32.const 0) + (set_local $$and$i$412$i + (i32.and + (get_local $$194) + (i32.const 32) + ) ) - ) - (if - (get_local $$tobool$i$413$i) - (call $___fwritex - (get_local $$s35$0$i) - (i32.const 3) - (get_local $$f) + (set_local $$tobool$i$413$i + (i32.eq + (get_local $$and$i$412$i) + (i32.const 0) + ) ) - ) - (set_local $$xor$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) + (if + (get_local $$tobool$i$413$i) + (call $___fwritex + (get_local $$s35$0$i) + (i32.const 3) + (get_local $$f) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add$i$239) - (get_local $$xor$i) - ) - (set_local $$cmp48$i - (i32.lt_s - (get_local $$add$i$239) - (get_local $$w$1) + (set_local $$xor$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$cond53$i - (if - (get_local $$cmp48$i) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$add$i$239) + (get_local $$xor$i) + ) + (set_local $$cmp48$i + (i32.lt_s + (get_local $$add$i$239) + (get_local $$w$1) + ) + ) + (set_local $$cond53$i + (if + (get_local $$cmp48$i) + (get_local $$w$1) + (get_local $$add$i$239) + ) + ) + (set_local $$retval$0$i + (get_local $$cond53$i) ) - ) - (set_local $$retval$0$i - (get_local $$cond53$i) ) ) ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$retval$0$i) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + (br $switch$24) ) - (set_local $$cnt$0 - (get_local $$cnt$1) + ) + (block + (set_local $$a$2 + (get_local $$incdec$ptr169275) ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) + (set_local $$fl$6 + (get_local $$fl$1$and219) ) - (set_local $$l$0 - (get_local $$retval$0$i) + (set_local $$p$5 + (get_local $$p$0) ) - (set_local $$l10n$0 - (get_local $$l10n$3) + (set_local $$pl$2 + (i32.const 0) + ) + (set_local $$prefix$2 + (i32.const 4091) + ) + (set_local $$z$2 + (get_local $$add$ptr205) ) - (br $label$continue$L1) - (br $switch$24) - ) - ) - (block - (set_local $$a$2 - (get_local $$incdec$ptr169275) - ) - (set_local $$fl$6 - (get_local $$fl$1$and219) - ) - (set_local $$p$5 - (get_local $$p$0) - ) - (set_local $$pl$2 - (i32.const 0) - ) - (set_local $$prefix$2 - (i32.const 4091) - ) - (set_local $$z$2 - (get_local $$add$ptr205) ) ) ) ) - ) - (block $label$break$L308 - (if - (i32.eq - (get_local $label) - (i32.const 64) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$90 - (get_local $$arg) - ) - (set_local $$91 - (get_local $$90) - ) - (set_local $$92 - (i32.load - (get_local $$91) - ) + (block $label$break$L308 + (if + (i32.eq + (get_local $label) + (i32.const 64) ) - (set_local $$93 - (i32.add - (get_local $$90) - (i32.const 4) + (block + (set_local $label + (i32.const 0) ) - ) - (set_local $$94 - (get_local $$93) - ) - (set_local $$95 - (i32.load - (get_local $$94) + (set_local $$90 + (get_local $$arg) ) - ) - (set_local $$and249 - (i32.and - (get_local $$t$1) - (i32.const 32) + (set_local $$91 + (get_local $$90) ) - ) - (set_local $$96 - (i32.eq - (get_local $$92) - (i32.const 0) + (set_local $$92 + (i32.load + (get_local $$91) + ) ) - ) - (set_local $$97 - (i32.eq - (get_local $$95) - (i32.const 0) + (set_local $$93 + (i32.add + (get_local $$90) + (i32.const 4) + ) ) - ) - (set_local $$98 - (i32.and - (get_local $$96) - (get_local $$97) + (set_local $$94 + (get_local $$93) ) - ) - (if - (get_local $$98) - (block - (set_local $$a$0 - (get_local $$add$ptr205) - ) - (set_local $$fl$4 - (get_local $$fl$3) + (set_local $$95 + (i32.load + (get_local $$94) ) - (set_local $$p$2 - (get_local $$p$1) + ) + (set_local $$and249 + (i32.and + (get_local $$t$1) + (i32.const 32) ) - (set_local $$pl$1 + ) + (set_local $$96 + (i32.eq + (get_local $$92) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) - ) ) - (block - (set_local $$101 + (set_local $$97 + (i32.eq (get_local $$95) + (i32.const 0) ) - (set_local $$99 - (get_local $$92) - ) - (set_local $$s$addr$06$i - (get_local $$add$ptr205) + ) + (set_local $$98 + (i32.and + (get_local $$96) + (get_local $$97) ) - (loop $while-out$133 $while-in$134 - (set_local $$idxprom$i - (i32.and - (get_local $$99) - (i32.const 15) - ) - ) - (set_local $$arrayidx$i - (i32.add - (i32.const 4075) - (get_local $$idxprom$i) - ) - ) - (set_local $$100 - (i32.load8_s - (get_local $$arrayidx$i) - ) - ) - (set_local $$conv$4$i$211 - (i32.and - (get_local $$100) - (i32.const 255) - ) - ) - (set_local $$or$i - (i32.or - (get_local $$conv$4$i$211) - (get_local $$and249) - ) + ) + (if + (get_local $$98) + (block + (set_local $$a$0 + (get_local $$add$ptr205) ) - (set_local $$conv1$i - (i32.and - (get_local $$or$i) - (i32.const 255) - ) + (set_local $$fl$4 + (get_local $$fl$3) ) - (set_local $$incdec$ptr$i$212 - (i32.add - (get_local $$s$addr$06$i) - (i32.const -1) - ) + (set_local $$p$2 + (get_local $$p$1) ) - (i32.store8 - (get_local $$incdec$ptr$i$212) - (get_local $$conv1$i) + (set_local $$pl$1 + (i32.const 0) ) - (set_local $$102 - (call $_bitshift64Lshr - (get_local $$99) - (get_local $$101) - (i32.const 4) - ) + (set_local $$prefix$1 + (i32.const 4091) ) - (set_local $$103 - (i32.load - (i32.const 168) - ) + (set_local $label + (i32.const 77) ) - (set_local $$104 - (i32.eq - (get_local $$102) - (i32.const 0) - ) + ) + (block + (set_local $$101 + (get_local $$95) ) - (set_local $$105 - (i32.eq - (get_local $$103) - (i32.const 0) - ) + (set_local $$99 + (get_local $$92) ) - (set_local $$106 - (i32.and - (get_local $$104) - (get_local $$105) - ) + (set_local $$s$addr$06$i + (get_local $$add$ptr205) ) - (if - (get_local $$106) - (block - (set_local $$incdec$ptr$i$212$lcssa - (get_local $$incdec$ptr$i$212) + (loop $while-in$134 + (block $while-out$133 + (set_local $$idxprom$i + (i32.and + (get_local $$99) + (i32.const 15) + ) ) - (br $while-out$133) - ) - (block - (set_local $$101 - (get_local $$103) + (set_local $$arrayidx$i + (i32.add + (i32.const 4075) + (get_local $$idxprom$i) + ) ) - (set_local $$99 - (get_local $$102) + (set_local $$100 + (i32.load8_s + (get_local $$arrayidx$i) + ) + ) + (set_local $$conv$4$i$211 + (i32.and + (get_local $$100) + (i32.const 255) + ) + ) + (set_local $$or$i + (i32.or + (get_local $$conv$4$i$211) + (get_local $$and249) + ) ) - (set_local $$s$addr$06$i + (set_local $$conv1$i + (i32.and + (get_local $$or$i) + (i32.const 255) + ) + ) + (set_local $$incdec$ptr$i$212 + (i32.add + (get_local $$s$addr$06$i) + (i32.const -1) + ) + ) + (i32.store8 (get_local $$incdec$ptr$i$212) + (get_local $$conv1$i) + ) + (set_local $$102 + (call $_bitshift64Lshr + (get_local $$99) + (get_local $$101) + (i32.const 4) + ) + ) + (set_local $$103 + (i32.load + (i32.const 168) + ) + ) + (set_local $$104 + (i32.eq + (get_local $$102) + (i32.const 0) + ) + ) + (set_local $$105 + (i32.eq + (get_local $$103) + (i32.const 0) + ) + ) + (set_local $$106 + (i32.and + (get_local $$104) + (get_local $$105) + ) + ) + (if + (get_local $$106) + (block + (set_local $$incdec$ptr$i$212$lcssa + (get_local $$incdec$ptr$i$212) + ) + (br $while-out$133) + ) + (block + (set_local $$101 + (get_local $$103) + ) + (set_local $$99 + (get_local $$102) + ) + (set_local $$s$addr$06$i + (get_local $$incdec$ptr$i$212) + ) + ) ) + (br $while-in$134) ) ) - (br $while-in$134) - ) - (set_local $$107 - (get_local $$arg) - ) - (set_local $$108 - (get_local $$107) - ) - (set_local $$109 - (i32.load - (get_local $$108) - ) - ) - (set_local $$110 - (i32.add - (get_local $$107) - (i32.const 4) + (set_local $$107 + (get_local $$arg) ) - ) - (set_local $$111 - (get_local $$110) - ) - (set_local $$112 - (i32.load - (get_local $$111) + (set_local $$108 + (get_local $$107) ) - ) - (set_local $$113 - (i32.eq - (get_local $$109) - (i32.const 0) + (set_local $$109 + (i32.load + (get_local $$108) + ) ) - ) - (set_local $$114 - (i32.eq - (get_local $$112) - (i32.const 0) + (set_local $$110 + (i32.add + (get_local $$107) + (i32.const 4) + ) ) - ) - (set_local $$115 - (i32.and - (get_local $$113) - (get_local $$114) + (set_local $$111 + (get_local $$110) ) - ) - (set_local $$and254 - (i32.and - (get_local $$fl$3) - (i32.const 8) + (set_local $$112 + (i32.load + (get_local $$111) + ) ) - ) - (set_local $$tobool255 - (i32.eq - (get_local $$and254) - (i32.const 0) + (set_local $$113 + (i32.eq + (get_local $$109) + (i32.const 0) + ) ) - ) - (set_local $$or$cond193 - (i32.or - (get_local $$tobool255) - (get_local $$115) + (set_local $$114 + (i32.eq + (get_local $$112) + (i32.const 0) + ) ) - ) - (if - (get_local $$or$cond193) - (block - (set_local $$a$0 - (get_local $$incdec$ptr$i$212$lcssa) + (set_local $$115 + (i32.and + (get_local $$113) + (get_local $$114) ) - (set_local $$fl$4 + ) + (set_local $$and254 + (i32.and (get_local $$fl$3) + (i32.const 8) ) - (set_local $$p$2 - (get_local $$p$1) - ) - (set_local $$pl$1 + ) + (set_local $$tobool255 + (i32.eq + (get_local $$and254) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) + ) + (set_local $$or$cond193 + (i32.or + (get_local $$tobool255) + (get_local $$115) ) ) - (block - (set_local $$shr - (i32.shr_s - (get_local $$t$1) - (i32.const 4) + (if + (get_local $$or$cond193) + (block + (set_local $$a$0 + (get_local $$incdec$ptr$i$212$lcssa) ) - ) - (set_local $$add$ptr257 - (i32.add + (set_local $$fl$4 + (get_local $$fl$3) + ) + (set_local $$p$2 + (get_local $$p$1) + ) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 (i32.const 4091) - (get_local $$shr) + ) + (set_local $label + (i32.const 77) ) ) - (set_local $$a$0 - (get_local $$incdec$ptr$i$212$lcssa) - ) - (set_local $$fl$4 - (get_local $$fl$3) - ) - (set_local $$p$2 - (get_local $$p$1) - ) - (set_local $$pl$1 - (i32.const 2) - ) - (set_local $$prefix$1 - (get_local $$add$ptr257) - ) - (set_local $label - (i32.const 77) + (block + (set_local $$shr + (i32.shr_s + (get_local $$t$1) + (i32.const 4) + ) + ) + (set_local $$add$ptr257 + (i32.add + (i32.const 4091) + (get_local $$shr) + ) + ) + (set_local $$a$0 + (get_local $$incdec$ptr$i$212$lcssa) + ) + (set_local $$fl$4 + (get_local $$fl$3) + ) + (set_local $$p$2 + (get_local $$p$1) + ) + (set_local $$pl$1 + (i32.const 2) + ) + (set_local $$prefix$1 + (get_local $$add$ptr257) + ) + (set_local $label + (i32.const 77) + ) ) ) ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 76) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$150 - (call $_fmt_u - (get_local $$148) - (get_local $$149) - (get_local $$add$ptr205) - ) - ) - (set_local $$a$0 - (get_local $$150) - ) - (set_local $$fl$4 - (get_local $$fl$1$and219) - ) - (set_local $$p$2 - (get_local $$p$0) - ) - (set_local $$pl$1 - (get_local $$pl$0) - ) - (set_local $$prefix$1 - (get_local $$prefix$0) - ) - (set_local $label - (i32.const 77) - ) - ) (if (i32.eq (get_local $label) - (i32.const 82) + (i32.const 76) ) (block (set_local $label (i32.const 0) ) - (set_local $$call356 - (call $_memchr - (get_local $$a$1) - (i32.const 0) - (get_local $$p$0) - ) - ) - (set_local $$tobool357 - (i32.eq - (get_local $$call356) - (i32.const 0) - ) - ) - (set_local $$sub$ptr$lhs$cast361 - (get_local $$call356) - ) - (set_local $$sub$ptr$rhs$cast362 - (get_local $$a$1) - ) - (set_local $$sub$ptr$sub363 - (i32.sub - (get_local $$sub$ptr$lhs$cast361) - (get_local $$sub$ptr$rhs$cast362) - ) - ) - (set_local $$add$ptr359 - (i32.add - (get_local $$a$1) - (get_local $$p$0) - ) - ) - (set_local $$z$1 - (if - (get_local $$tobool357) - (get_local $$add$ptr359) - (get_local $$call356) - ) - ) - (set_local $$p$3 - (if - (get_local $$tobool357) - (get_local $$p$0) - (get_local $$sub$ptr$sub363) + (set_local $$150 + (call $_fmt_u + (get_local $$148) + (get_local $$149) + (get_local $$add$ptr205) ) ) - (set_local $$a$2 - (get_local $$a$1) + (set_local $$a$0 + (get_local $$150) ) - (set_local $$fl$6 - (get_local $$and219) + (set_local $$fl$4 + (get_local $$fl$1$and219) ) - (set_local $$p$5 - (get_local $$p$3) + (set_local $$p$2 + (get_local $$p$0) ) - (set_local $$pl$2 - (i32.const 0) + (set_local $$pl$1 + (get_local $$pl$0) ) - (set_local $$prefix$2 - (i32.const 4091) + (set_local $$prefix$1 + (get_local $$prefix$0) ) - (set_local $$z$2 - (get_local $$z$1) + (set_local $label + (i32.const 77) ) ) (if (i32.eq (get_local $label) - (i32.const 86) + (i32.const 82) ) (block (set_local $label (i32.const 0) ) - (set_local $$176 - (i32.load - (get_local $$arg) + (set_local $$call356 + (call $_memchr + (get_local $$a$1) + (i32.const 0) + (get_local $$p$0) ) ) - (set_local $$i$0316 - (i32.const 0) + (set_local $$tobool357 + (i32.eq + (get_local $$call356) + (i32.const 0) + ) ) - (set_local $$l$1315 - (i32.const 0) + (set_local $$sub$ptr$lhs$cast361 + (get_local $$call356) ) - (set_local $$ws$0317 - (get_local $$176) + (set_local $$sub$ptr$rhs$cast362 + (get_local $$a$1) ) - (loop $while-out$129 $while-in$130 - (set_local $$177 - (i32.load - (get_local $$ws$0317) - ) - ) - (set_local $$tobool380 - (i32.eq - (get_local $$177) - (i32.const 0) - ) - ) - (if - (get_local $$tobool380) - (block - (set_local $$i$0$lcssa - (get_local $$i$0316) - ) - (set_local $$l$2 - (get_local $$l$1315) - ) - (br $while-out$129) - ) - ) - (set_local $$call384 - (call $_wctomb - (get_local $$mb) - (get_local $$177) - ) - ) - (set_local $$cmp385 - (i32.lt_s - (get_local $$call384) - (i32.const 0) - ) - ) - (set_local $$sub389 - (i32.sub - (get_local $$p$4365) - (get_local $$i$0316) - ) - ) - (set_local $$cmp390 - (i32.gt_u - (get_local $$call384) - (get_local $$sub389) - ) + (set_local $$sub$ptr$sub363 + (i32.sub + (get_local $$sub$ptr$lhs$cast361) + (get_local $$sub$ptr$rhs$cast362) ) - (set_local $$or$cond195 - (i32.or - (get_local $$cmp385) - (get_local $$cmp390) - ) + ) + (set_local $$add$ptr359 + (i32.add + (get_local $$a$1) + (get_local $$p$0) ) + ) + (set_local $$z$1 (if - (get_local $$or$cond195) - (block - (set_local $$i$0$lcssa - (get_local $$i$0316) - ) - (set_local $$l$2 - (get_local $$call384) - ) - (br $while-out$129) - ) - ) - (set_local $$incdec$ptr383 - (i32.add - (get_local $$ws$0317) - (i32.const 4) - ) - ) - (set_local $$add395 - (i32.add - (get_local $$call384) - (get_local $$i$0316) - ) - ) - (set_local $$cmp377 - (i32.gt_u - (get_local $$p$4365) - (get_local $$add395) - ) + (get_local $$tobool357) + (get_local $$add$ptr359) + (get_local $$call356) ) + ) + (set_local $$p$3 (if - (get_local $$cmp377) - (block - (set_local $$i$0316 - (get_local $$add395) - ) - (set_local $$l$1315 - (get_local $$call384) - ) - (set_local $$ws$0317 - (get_local $$incdec$ptr383) - ) - ) - (block - (set_local $$i$0$lcssa - (get_local $$add395) - ) - (set_local $$l$2 - (get_local $$call384) - ) - (br $while-out$129) - ) + (get_local $$tobool357) + (get_local $$p$0) + (get_local $$sub$ptr$sub363) ) - (br $while-in$130) ) - (set_local $$cmp397 - (i32.lt_s - (get_local $$l$2) - (i32.const 0) - ) + (set_local $$a$2 + (get_local $$a$1) ) - (if - (get_local $$cmp397) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) + (set_local $$fl$6 + (get_local $$and219) ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$i$0$lcssa) - (get_local $$fl$1$and219) + (set_local $$p$5 + (get_local $$p$3) ) - (set_local $$cmp404$324 - (i32.eq - (get_local $$i$0$lcssa) + (set_local $$pl$2 + (i32.const 0) + ) + (set_local $$prefix$2 + (i32.const 4091) + ) + (set_local $$z$2 + (get_local $$z$1) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 86) + ) + (block + (set_local $label (i32.const 0) ) - ) - (if - (get_local $$cmp404$324) - (block - (set_local $$i$0$lcssa368 - (i32.const 0) - ) - (set_local $label - (i32.const 98) + (set_local $$176 + (i32.load + (get_local $$arg) ) ) - (block - (set_local $$178 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$i$1325 - (i32.const 0) - ) - (set_local $$ws$1326 - (get_local $$178) - ) - (loop $while-out$131 $while-in$132 - (set_local $$179 + (set_local $$i$0316 + (i32.const 0) + ) + (set_local $$l$1315 + (i32.const 0) + ) + (set_local $$ws$0317 + (get_local $$176) + ) + (loop $while-in$130 + (block $while-out$129 + (set_local $$177 (i32.load - (get_local $$ws$1326) + (get_local $$ws$0317) ) ) - (set_local $$tobool407 + (set_local $$tobool380 (i32.eq - (get_local $$179) + (get_local $$177) (i32.const 0) ) ) (if - (get_local $$tobool407) + (get_local $$tobool380) (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (set_local $$i$0$lcssa + (get_local $$i$0316) ) - (set_local $label - (i32.const 98) + (set_local $$l$2 + (get_local $$l$1315) ) - (br $label$break$L308) - ) - ) - (set_local $$incdec$ptr410 - (i32.add - (get_local $$ws$1326) - (i32.const 4) + (br $while-out$129) ) ) - (set_local $$call411 + (set_local $$call384 (call $_wctomb (get_local $$mb) - (get_local $$179) + (get_local $$177) ) ) - (set_local $$add412 - (i32.add - (get_local $$call411) - (get_local $$i$1325) + (set_local $$cmp385 + (i32.lt_s + (get_local $$call384) + (i32.const 0) ) ) - (set_local $$cmp413 - (i32.gt_s - (get_local $$add412) - (get_local $$i$0$lcssa) + (set_local $$sub389 + (i32.sub + (get_local $$p$4365) + (get_local $$i$0316) + ) + ) + (set_local $$cmp390 + (i32.gt_u + (get_local $$call384) + (get_local $$sub389) + ) + ) + (set_local $$or$cond195 + (i32.or + (get_local $$cmp385) + (get_local $$cmp390) ) ) (if - (get_local $$cmp413) + (get_local $$or$cond195) (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (set_local $$i$0$lcssa + (get_local $$i$0316) ) - (set_local $label - (i32.const 98) + (set_local $$l$2 + (get_local $$call384) ) - (br $label$break$L308) + (br $while-out$129) ) ) - (set_local $$180 - (i32.load - (get_local $$f) + (set_local $$incdec$ptr383 + (i32.add + (get_local $$ws$0317) + (i32.const 4) ) ) - (set_local $$and$i$231 - (i32.and - (get_local $$180) - (i32.const 32) + (set_local $$add395 + (i32.add + (get_local $$call384) + (get_local $$i$0316) ) ) - (set_local $$tobool$i$232 - (i32.eq - (get_local $$and$i$231) - (i32.const 0) + (set_local $$cmp377 + (i32.gt_u + (get_local $$p$4365) + (get_local $$add395) ) ) (if - (get_local $$tobool$i$232) - (call $___fwritex - (get_local $$mb) - (get_local $$call411) - (get_local $$f) + (get_local $$cmp377) + (block + (set_local $$i$0316 + (get_local $$add395) + ) + (set_local $$l$1315 + (get_local $$call384) + ) + (set_local $$ws$0317 + (get_local $$incdec$ptr383) + ) + ) + (block + (set_local $$i$0$lcssa + (get_local $$add395) + ) + (set_local $$l$2 + (get_local $$call384) + ) + (br $while-out$129) ) ) - (set_local $$cmp404 - (i32.lt_u - (get_local $$add412) - (get_local $$i$0$lcssa) + (br $while-in$130) + ) + ) + (set_local $$cmp397 + (i32.lt_s + (get_local $$l$2) + (i32.const 0) + ) + ) + (if + (get_local $$cmp397) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$i$0$lcssa) + (get_local $$fl$1$and219) + ) + (set_local $$cmp404$324 + (i32.eq + (get_local $$i$0$lcssa) + (i32.const 0) + ) + ) + (if + (get_local $$cmp404$324) + (block + (set_local $$i$0$lcssa368 + (i32.const 0) + ) + (set_local $label + (i32.const 98) + ) + ) + (block + (set_local $$178 + (i32.load + (get_local $$arg) ) ) - (if - (get_local $$cmp404) - (block - (set_local $$i$1325 - (get_local $$add412) + (set_local $$i$1325 + (i32.const 0) + ) + (set_local $$ws$1326 + (get_local $$178) + ) + (loop $while-in$132 + (block $while-out$131 + (set_local $$179 + (i32.load + (get_local $$ws$1326) + ) ) - (set_local $$ws$1326 - (get_local $$incdec$ptr410) + (set_local $$tobool407 + (i32.eq + (get_local $$179) + (i32.const 0) + ) ) - ) - (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (if + (get_local $$tobool407) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $label$break$L308) + ) ) - (set_local $label - (i32.const 98) + (set_local $$incdec$ptr410 + (i32.add + (get_local $$ws$1326) + (i32.const 4) + ) + ) + (set_local $$call411 + (call $_wctomb + (get_local $$mb) + (get_local $$179) + ) + ) + (set_local $$add412 + (i32.add + (get_local $$call411) + (get_local $$i$1325) + ) + ) + (set_local $$cmp413 + (i32.gt_s + (get_local $$add412) + (get_local $$i$0$lcssa) + ) + ) + (if + (get_local $$cmp413) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $label$break$L308) + ) + ) + (set_local $$180 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$231 + (i32.and + (get_local $$180) + (i32.const 32) + ) + ) + (set_local $$tobool$i$232 + (i32.eq + (get_local $$and$i$231) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$232) + (call $___fwritex + (get_local $$mb) + (get_local $$call411) + (get_local $$f) + ) + ) + (set_local $$cmp404 + (i32.lt_u + (get_local $$add412) + (get_local $$i$0$lcssa) + ) + ) + (if + (get_local $$cmp404) + (block + (set_local $$i$1325 + (get_local $$add412) + ) + (set_local $$ws$1326 + (get_local $$incdec$ptr410) + ) + ) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $while-out$131) + ) ) - (br $while-out$131) + (br $while-in$132) ) ) - (br $while-in$132) ) ) ) @@ -13949,372 +14033,372 @@ ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 98) - ) - (block - (set_local $label - (i32.const 0) + (if + (i32.eq + (get_local $label) + (i32.const 98) ) - (set_local $$xor - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) + (block + (set_local $label + (i32.const 0) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$i$0$lcssa368) - (get_local $$xor) - ) - (set_local $$cmp421 - (i32.gt_s - (get_local $$w$1) - (get_local $$i$0$lcssa368) + (set_local $$xor + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$cond426 - (if - (get_local $$cmp421) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$i$0$lcssa368) + (get_local $$xor) ) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$cond426) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) - ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 77) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$cmp306 - (i32.gt_s - (get_local $$p$2) - (i32.const -1) - ) - ) - (set_local $$and309 - (i32.and - (get_local $$fl$4) - (i32.const -65537) - ) - ) - (set_local $$and309$fl$4 - (if - (get_local $$cmp306) - (get_local $$and309) - (get_local $$fl$4) - ) - ) - (set_local $$151 - (get_local $$arg) - ) - (set_local $$152 - (get_local $$151) - ) - (set_local $$153 - (i32.load - (get_local $$152) - ) - ) - (set_local $$154 - (i32.add - (get_local $$151) - (i32.const 4) - ) - ) - (set_local $$155 - (get_local $$154) - ) - (set_local $$156 - (i32.load - (get_local $$155) - ) - ) - (set_local $$157 - (i32.ne - (get_local $$153) - (i32.const 0) - ) - ) - (set_local $$158 - (i32.ne - (get_local $$156) - (i32.const 0) - ) - ) - (set_local $$159 - (i32.or - (get_local $$157) - (get_local $$158) - ) - ) - (set_local $$tobool314 - (i32.ne - (get_local $$p$2) - (i32.const 0) - ) - ) - (set_local $$or$cond - (i32.or - (get_local $$tobool314) - (get_local $$159) - ) - ) - (if - (get_local $$or$cond) - (block - (set_local $$sub$ptr$rhs$cast318 - (get_local $$a$0) - ) - (set_local $$sub$ptr$sub319 - (i32.sub - (get_local $$sub$ptr$lhs$cast317) - (get_local $$sub$ptr$rhs$cast318) - ) - ) - (set_local $$160 - (i32.and - (get_local $$159) - (i32.const 1) - ) - ) - (set_local $$lnot$ext - (i32.xor - (get_local $$160) - (i32.const 1) - ) - ) - (set_local $$add322 - (i32.add - (get_local $$lnot$ext) - (get_local $$sub$ptr$sub319) - ) + (set_local $$cmp421 + (i32.gt_s + (get_local $$w$1) + (get_local $$i$0$lcssa368) ) - (set_local $$cmp323 - (i32.gt_s - (get_local $$p$2) - (get_local $$add322) - ) + ) + (set_local $$cond426 + (if + (get_local $$cmp421) + (get_local $$w$1) + (get_local $$i$0$lcssa368) ) - (set_local $$p$2$add322 - (if - (get_local $$cmp323) - (get_local $$p$2) - (get_local $$add322) - ) + ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$cond426) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 77) + ) + (block + (set_local $label + (i32.const 0) + ) + (set_local $$cmp306 + (i32.gt_s + (get_local $$p$2) + (i32.const -1) ) - (set_local $$a$2 - (get_local $$a$0) + ) + (set_local $$and309 + (i32.and + (get_local $$fl$4) + (i32.const -65537) ) - (set_local $$fl$6 - (get_local $$and309$fl$4) + ) + (set_local $$and309$fl$4 + (if + (get_local $$cmp306) + (get_local $$and309) + (get_local $$fl$4) ) - (set_local $$p$5 - (get_local $$p$2$add322) + ) + (set_local $$151 + (get_local $$arg) + ) + (set_local $$152 + (get_local $$151) + ) + (set_local $$153 + (i32.load + (get_local $$152) ) - (set_local $$pl$2 - (get_local $$pl$1) + ) + (set_local $$154 + (i32.add + (get_local $$151) + (i32.const 4) ) - (set_local $$prefix$2 - (get_local $$prefix$1) + ) + (set_local $$155 + (get_local $$154) + ) + (set_local $$156 + (i32.load + (get_local $$155) ) - (set_local $$z$2 - (get_local $$add$ptr205) + ) + (set_local $$157 + (i32.ne + (get_local $$153) + (i32.const 0) ) ) - (block - (set_local $$a$2 - (get_local $$add$ptr205) + (set_local $$158 + (i32.ne + (get_local $$156) + (i32.const 0) ) - (set_local $$fl$6 - (get_local $$and309$fl$4) + ) + (set_local $$159 + (i32.or + (get_local $$157) + (get_local $$158) ) - (set_local $$p$5 + ) + (set_local $$tobool314 + (i32.ne + (get_local $$p$2) (i32.const 0) ) - (set_local $$pl$2 - (get_local $$pl$1) + ) + (set_local $$or$cond + (i32.or + (get_local $$tobool314) + (get_local $$159) ) - (set_local $$prefix$2 - (get_local $$prefix$1) + ) + (if + (get_local $$or$cond) + (block + (set_local $$sub$ptr$rhs$cast318 + (get_local $$a$0) + ) + (set_local $$sub$ptr$sub319 + (i32.sub + (get_local $$sub$ptr$lhs$cast317) + (get_local $$sub$ptr$rhs$cast318) + ) + ) + (set_local $$160 + (i32.and + (get_local $$159) + (i32.const 1) + ) + ) + (set_local $$lnot$ext + (i32.xor + (get_local $$160) + (i32.const 1) + ) + ) + (set_local $$add322 + (i32.add + (get_local $$lnot$ext) + (get_local $$sub$ptr$sub319) + ) + ) + (set_local $$cmp323 + (i32.gt_s + (get_local $$p$2) + (get_local $$add322) + ) + ) + (set_local $$p$2$add322 + (if + (get_local $$cmp323) + (get_local $$p$2) + (get_local $$add322) + ) + ) + (set_local $$a$2 + (get_local $$a$0) + ) + (set_local $$fl$6 + (get_local $$and309$fl$4) + ) + (set_local $$p$5 + (get_local $$p$2$add322) + ) + (set_local $$pl$2 + (get_local $$pl$1) + ) + (set_local $$prefix$2 + (get_local $$prefix$1) + ) + (set_local $$z$2 + (get_local $$add$ptr205) + ) ) - (set_local $$z$2 - (get_local $$add$ptr205) + (block + (set_local $$a$2 + (get_local $$add$ptr205) + ) + (set_local $$fl$6 + (get_local $$and309$fl$4) + ) + (set_local $$p$5 + (i32.const 0) + ) + (set_local $$pl$2 + (get_local $$pl$1) + ) + (set_local $$prefix$2 + (get_local $$prefix$1) + ) + (set_local $$z$2 + (get_local $$add$ptr205) + ) ) ) ) ) - ) - (set_local $$sub$ptr$lhs$cast431 - (get_local $$z$2) - ) - (set_local $$sub$ptr$rhs$cast432 - (get_local $$a$2) - ) - (set_local $$sub$ptr$sub433 - (i32.sub - (get_local $$sub$ptr$lhs$cast431) - (get_local $$sub$ptr$rhs$cast432) + (set_local $$sub$ptr$lhs$cast431 + (get_local $$z$2) ) - ) - (set_local $$cmp434 - (i32.lt_s - (get_local $$p$5) - (get_local $$sub$ptr$sub433) + (set_local $$sub$ptr$rhs$cast432 + (get_local $$a$2) ) - ) - (set_local $$sub$ptr$sub433$p$5 - (if - (get_local $$cmp434) - (get_local $$sub$ptr$sub433) - (get_local $$p$5) + (set_local $$sub$ptr$sub433 + (i32.sub + (get_local $$sub$ptr$lhs$cast431) + (get_local $$sub$ptr$rhs$cast432) + ) ) - ) - (set_local $$add441 - (i32.add - (get_local $$pl$2) - (get_local $$sub$ptr$sub433$p$5) + (set_local $$cmp434 + (i32.lt_s + (get_local $$p$5) + (get_local $$sub$ptr$sub433) + ) ) - ) - (set_local $$cmp442 - (i32.lt_s - (get_local $$w$1) + (set_local $$sub$ptr$sub433$p$5 + (if + (get_local $$cmp434) + (get_local $$sub$ptr$sub433) + (get_local $$p$5) + ) + ) + (set_local $$add441 + (i32.add + (get_local $$pl$2) + (get_local $$sub$ptr$sub433$p$5) + ) + ) + (set_local $$cmp442 + (i32.lt_s + (get_local $$w$1) + (get_local $$add441) + ) + ) + (set_local $$w$2 + (if + (get_local $$cmp442) + (get_local $$add441) + (get_local $$w$1) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$2) (get_local $$add441) + (get_local $$fl$6) + ) + (set_local $$265 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$244 + (i32.and + (get_local $$265) + (i32.const 32) + ) + ) + (set_local $$tobool$i$245 + (i32.eq + (get_local $$and$i$244) + (i32.const 0) + ) ) - ) - (set_local $$w$2 (if - (get_local $$cmp442) + (get_local $$tobool$i$245) + (call $___fwritex + (get_local $$prefix$2) + (get_local $$pl$2) + (get_local $$f) + ) + ) + (set_local $$xor449 + (i32.xor + (get_local $$fl$6) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$2) (get_local $$add441) - (get_local $$w$1) + (get_local $$xor449) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$2) - (get_local $$add441) - (get_local $$fl$6) - ) - (set_local $$265 - (i32.load + (call $_pad (get_local $$f) + (i32.const 48) + (get_local $$sub$ptr$sub433$p$5) + (get_local $$sub$ptr$sub433) + (i32.const 0) ) - ) - (set_local $$and$i$244 - (i32.and - (get_local $$265) - (i32.const 32) + (set_local $$266 + (i32.load + (get_local $$f) + ) ) - ) - (set_local $$tobool$i$245 - (i32.eq - (get_local $$and$i$244) - (i32.const 0) + (set_local $$and$i$216 + (i32.and + (get_local $$266) + (i32.const 32) + ) ) - ) - (if - (get_local $$tobool$i$245) - (call $___fwritex - (get_local $$prefix$2) - (get_local $$pl$2) - (get_local $$f) + (set_local $$tobool$i$217 + (i32.eq + (get_local $$and$i$216) + (i32.const 0) + ) ) - ) - (set_local $$xor449 - (i32.xor - (get_local $$fl$6) - (i32.const 65536) + (if + (get_local $$tobool$i$217) + (call $___fwritex + (get_local $$a$2) + (get_local $$sub$ptr$sub433) + (get_local $$f) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$2) - (get_local $$add441) - (get_local $$xor449) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$sub$ptr$sub433$p$5) - (get_local $$sub$ptr$sub433) - (i32.const 0) - ) - (set_local $$266 - (i32.load - (get_local $$f) + (set_local $$xor457 + (i32.xor + (get_local $$fl$6) + (i32.const 8192) + ) ) - ) - (set_local $$and$i$216 - (i32.and - (get_local $$266) + (call $_pad + (get_local $$f) (i32.const 32) + (get_local $$w$2) + (get_local $$add441) + (get_local $$xor457) ) - ) - (set_local $$tobool$i$217 - (i32.eq - (get_local $$and$i$216) - (i32.const 0) + (set_local $$cnt$0 + (get_local $$cnt$1) ) - ) - (if - (get_local $$tobool$i$217) - (call $___fwritex - (get_local $$a$2) - (get_local $$sub$ptr$sub433) - (get_local $$f) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) ) - ) - (set_local $$xor457 - (i32.xor - (get_local $$fl$6) - (i32.const 8192) + (set_local $$l$0 + (get_local $$w$2) ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$2) - (get_local $$add441) - (get_local $$xor457) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$w$2) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) ) (block $label$break$L343 (if @@ -14347,75 +14431,77 @@ (set_local $$i$2299 (i32.const 1) ) - (loop $while-out$136 $while-in$137 - (set_local $$arrayidx469 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$i$2299) - (i32.const 2) + (loop $while-in$137 + (block $while-out$136 + (set_local $$arrayidx469 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$i$2299) + (i32.const 2) + ) + ) + ) + (set_local $$267 + (i32.load + (get_local $$arrayidx469) + ) + ) + (set_local $$tobool470 + (i32.eq + (get_local $$267) + (i32.const 0) + ) + ) + (if + (get_local $$tobool470) + (block + (set_local $$i$2299$lcssa + (get_local $$i$2299) + ) + (br $while-out$136) + ) + ) + (set_local $$add$ptr473 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$i$2299) + (i32.const 3) + ) ) ) - ) - (set_local $$267 - (i32.load - (get_local $$arrayidx469) - ) - ) - (set_local $$tobool470 - (i32.eq + (call $_pop_arg_336 + (get_local $$add$ptr473) (get_local $$267) - (i32.const 0) + (get_local $$ap) ) - ) - (if - (get_local $$tobool470) - (block - (set_local $$i$2299$lcssa + (set_local $$inc + (i32.add (get_local $$i$2299) + (i32.const 1) ) - (br $while-out$136) ) - ) - (set_local $$add$ptr473 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$i$2299) - (i32.const 3) + (set_local $$cmp466 + (i32.lt_s + (get_local $$inc) + (i32.const 10) ) ) - ) - (call $_pop_arg_336 - (get_local $$add$ptr473) - (get_local $$267) - (get_local $$ap) - ) - (set_local $$inc - (i32.add - (get_local $$i$2299) - (i32.const 1) - ) - ) - (set_local $$cmp466 - (i32.lt_s - (get_local $$inc) - (i32.const 10) - ) - ) - (if - (get_local $$cmp466) - (set_local $$i$2299 - (get_local $$inc) - ) - (block - (set_local $$retval$0 - (i32.const 1) + (if + (get_local $$cmp466) + (set_local $$i$2299 + (get_local $$inc) + ) + (block + (set_local $$retval$0 + (i32.const 1) + ) + (br $label$break$L343) ) - (br $label$break$L343) ) + (br $while-in$137) ) - (br $while-in$137) ) (set_local $$cmp478$295 (i32.lt_s @@ -14429,63 +14515,65 @@ (set_local $$i$3296 (get_local $$i$2299$lcssa) ) - (loop $while-out$138 $while-in$139 - (set_local $$arrayidx481 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$i$3296) - (i32.const 2) + (loop $while-in$139 + (block $while-out$138 + (set_local $$arrayidx481 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$i$3296) + (i32.const 2) + ) ) ) - ) - (set_local $$268 - (i32.load - (get_local $$arrayidx481) - ) - ) - (set_local $$lnot483 - (i32.eq - (get_local $$268) - (i32.const 0) - ) - ) - (set_local $$inc488 - (i32.add - (get_local $$i$3296) - (i32.const 1) + (set_local $$268 + (i32.load + (get_local $$arrayidx481) + ) ) - ) - (if - (i32.eqz - (get_local $$lnot483) + (set_local $$lnot483 + (i32.eq + (get_local $$268) + (i32.const 0) + ) ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$inc488 + (i32.add + (get_local $$i$3296) + (i32.const 1) ) - (br $label$break$L343) ) - ) - (set_local $$cmp478 - (i32.lt_s - (get_local $$inc488) - (i32.const 10) + (if + (i32.eqz + (get_local $$lnot483) + ) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L343) + ) ) - ) - (if - (get_local $$cmp478) - (set_local $$i$3296 - (get_local $$inc488) + (set_local $$cmp478 + (i32.lt_s + (get_local $$inc488) + (i32.const 10) + ) ) - (block - (set_local $$retval$0 - (i32.const 1) + (if + (get_local $$cmp478) + (set_local $$i$3296 + (get_local $$inc488) + ) + (block + (set_local $$retval$0 + (i32.const 1) + ) + (br $while-out$138) ) - (br $while-out$138) ) + (br $while-in$139) ) - (br $while-in$139) ) ) (set_local $$retval$0 @@ -15899,112 +15987,114 @@ (set_local $$s$addr$013 (get_local $$s) ) - (loop $while-out$0 $while-in$1 - (set_local $$9 - (call $___uremdi3 - (get_local $$7) - (get_local $$8) - (i32.const 10) - (i32.const 0) - ) - ) - (set_local $$10 - (i32.load - (i32.const 168) - ) - ) - (set_local $$11 - (i32.or - (get_local $$9) - (i32.const 48) - ) - ) - (set_local $$12 - (i32.and - (get_local $$11) - (i32.const 255) + (loop $while-in$1 + (block $while-out$0 + (set_local $$9 + (call $___uremdi3 + (get_local $$7) + (get_local $$8) + (i32.const 10) + (i32.const 0) + ) ) - ) - (set_local $$incdec$ptr - (i32.add - (get_local $$s$addr$013) - (i32.const -1) + (set_local $$10 + (i32.load + (i32.const 168) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr) - (get_local $$12) - ) - (set_local $$13 - (call $___udivdi3 - (get_local $$7) - (get_local $$8) - (i32.const 10) - (i32.const 0) + (set_local $$11 + (i32.or + (get_local $$9) + (i32.const 48) + ) ) - ) - (set_local $$14 - (i32.load - (i32.const 168) + (set_local $$12 + (i32.and + (get_local $$11) + (i32.const 255) + ) ) - ) - (set_local $$15 - (i32.gt_u - (get_local $$8) - (i32.const 9) + (set_local $$incdec$ptr + (i32.add + (get_local $$s$addr$013) + (i32.const -1) + ) ) - ) - (set_local $$16 - (i32.gt_u - (get_local $$7) - (i32.const -1) + (i32.store8 + (get_local $$incdec$ptr) + (get_local $$12) ) - ) - (set_local $$17 - (i32.eq - (get_local $$8) - (i32.const 9) + (set_local $$13 + (call $___udivdi3 + (get_local $$7) + (get_local $$8) + (i32.const 10) + (i32.const 0) + ) ) - ) - (set_local $$18 - (i32.and - (get_local $$17) - (get_local $$16) + (set_local $$14 + (i32.load + (i32.const 168) + ) ) - ) - (set_local $$19 - (i32.or - (get_local $$15) - (get_local $$18) + (set_local $$15 + (i32.gt_u + (get_local $$8) + (i32.const 9) + ) ) - ) - (if - (get_local $$19) - (block - (set_local $$7 - (get_local $$13) + (set_local $$16 + (i32.gt_u + (get_local $$7) + (i32.const -1) ) - (set_local $$8 - (get_local $$14) + ) + (set_local $$17 + (i32.eq + (get_local $$8) + (i32.const 9) ) - (set_local $$s$addr$013 - (get_local $$incdec$ptr) + ) + (set_local $$18 + (i32.and + (get_local $$17) + (get_local $$16) ) ) - (block - (set_local $$21 - (get_local $$13) + (set_local $$19 + (i32.or + (get_local $$15) + (get_local $$18) ) - (set_local $$22 - (get_local $$14) + ) + (if + (get_local $$19) + (block + (set_local $$7 + (get_local $$13) + ) + (set_local $$8 + (get_local $$14) + ) + (set_local $$s$addr$013 + (get_local $$incdec$ptr) + ) ) - (set_local $$incdec$ptr$lcssa - (get_local $$incdec$ptr) + (block + (set_local $$21 + (get_local $$13) + ) + (set_local $$22 + (get_local $$14) + ) + (set_local $$incdec$ptr$lcssa + (get_local $$incdec$ptr) + ) + (br $while-out$0) ) - (br $while-out$0) ) + (br $while-in$1) ) - (br $while-in$1) ) (set_local $$s$addr$0$lcssa (get_local $$incdec$ptr$lcssa) @@ -16040,71 +16130,73 @@ (set_local $$y$010 (get_local $$x$addr$0$lcssa$off0) ) - (loop $while-out$2 $while-in$3 - (set_local $$rem4 - (i32.and - (i32.rem_u - (get_local $$y$010) - (i32.const 10) + (loop $while-in$3 + (block $while-out$2 + (set_local $$rem4 + (i32.and + (i32.rem_u + (get_local $$y$010) + (i32.const 10) + ) + (i32.const -1) ) - (i32.const -1) - ) - ) - (set_local $$add5 - (i32.or - (get_local $$rem4) - (i32.const 48) ) - ) - (set_local $$conv6 - (i32.and - (get_local $$add5) - (i32.const 255) + (set_local $$add5 + (i32.or + (get_local $$rem4) + (i32.const 48) + ) ) - ) - (set_local $$incdec$ptr7 - (i32.add - (get_local $$s$addr$19) - (i32.const -1) + (set_local $$conv6 + (i32.and + (get_local $$add5) + (i32.const 255) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr7) - (get_local $$conv6) - ) - (set_local $$div9 - (i32.and - (i32.div_u - (get_local $$y$010) - (i32.const 10) + (set_local $$incdec$ptr7 + (i32.add + (get_local $$s$addr$19) + (i32.const -1) ) - (i32.const -1) ) - ) - (set_local $$20 - (i32.lt_u - (get_local $$y$010) - (i32.const 10) + (i32.store8 + (get_local $$incdec$ptr7) + (get_local $$conv6) ) - ) - (if - (get_local $$20) - (block - (set_local $$s$addr$1$lcssa - (get_local $$incdec$ptr7) + (set_local $$div9 + (i32.and + (i32.div_u + (get_local $$y$010) + (i32.const 10) + ) + (i32.const -1) ) - (br $while-out$2) ) - (block - (set_local $$s$addr$19 - (get_local $$incdec$ptr7) + (set_local $$20 + (i32.lt_u + (get_local $$y$010) + (i32.const 10) ) - (set_local $$y$010 - (get_local $$div9) + ) + (if + (get_local $$20) + (block + (set_local $$s$addr$1$lcssa + (get_local $$incdec$ptr7) + ) + (br $while-out$2) + ) + (block + (set_local $$s$addr$19 + (get_local $$incdec$ptr7) + ) + (set_local $$y$010 + (get_local $$div9) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -16262,70 +16354,72 @@ (set_local $$tobool$i18 (get_local $$tobool$i$16) ) - (loop $while-out$2 $while-in$3 - (if - (get_local $$tobool$i18) - (block - (drop - (call $___fwritex - (get_local $$pad) - (i32.const 256) - (get_local $$f) + (loop $while-in$3 + (block $while-out$2 + (if + (get_local $$tobool$i18) + (block + (drop + (call $___fwritex + (get_local $$pad) + (i32.const 256) + (get_local $$f) + ) ) - ) - (set_local $$$pre - (i32.load - (get_local $$f) + (set_local $$$pre + (i32.load + (get_local $$f) + ) + ) + (set_local $$2 + (get_local $$$pre) ) ) (set_local $$2 - (get_local $$$pre) + (get_local $$4) ) ) - (set_local $$2 - (get_local $$4) - ) - ) - (set_local $$sub5 - (i32.add - (get_local $$l$addr$017) - (i32.const -256) - ) - ) - (set_local $$cmp3 - (i32.gt_u - (get_local $$sub5) - (i32.const 255) - ) - ) - (set_local $$and$i - (i32.and - (get_local $$2) - (i32.const 32) + (set_local $$sub5 + (i32.add + (get_local $$l$addr$017) + (i32.const -256) + ) ) - ) - (set_local $$tobool$i - (i32.eq - (get_local $$and$i) - (i32.const 0) + (set_local $$cmp3 + (i32.gt_u + (get_local $$sub5) + (i32.const 255) + ) ) - ) - (if - (get_local $$cmp3) - (block - (set_local $$4 + (set_local $$and$i + (i32.and (get_local $$2) + (i32.const 32) ) - (set_local $$l$addr$017 - (get_local $$sub5) + ) + (set_local $$tobool$i + (i32.eq + (get_local $$and$i) + (i32.const 0) ) - (set_local $$tobool$i18 - (get_local $$tobool$i) + ) + (if + (get_local $$cmp3) + (block + (set_local $$4 + (get_local $$2) + ) + (set_local $$l$addr$017 + (get_local $$sub5) + ) + (set_local $$tobool$i18 + (get_local $$tobool$i) + ) ) + (br $while-out$2) ) - (br $while-out$2) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$3 (i32.and @@ -18584,117 +18678,119 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-out$23 $while-in$24 - (set_local $$arrayidx23$i - (i32.add - (get_local $$t$0$i) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $$arrayidx23$i + (i32.add + (get_local $$t$0$i) + (i32.const 16) + ) ) - ) - (set_local $$22 - (i32.load - (get_local $$arrayidx23$i) + (set_local $$22 + (i32.load + (get_local $$arrayidx23$i) + ) ) - ) - (set_local $$cmp$i - (i32.eq - (get_local $$22) - (i32.const 0) + (set_local $$cmp$i + (i32.eq + (get_local $$22) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp$i) - (block - (set_local $$arrayidx27$i - (i32.add - (get_local $$t$0$i) - (i32.const 20) + (if + (get_local $$cmp$i) + (block + (set_local $$arrayidx27$i + (i32.add + (get_local $$t$0$i) + (i32.const 20) + ) ) - ) - (set_local $$23 - (i32.load - (get_local $$arrayidx27$i) + (set_local $$23 + (i32.load + (get_local $$arrayidx27$i) + ) ) - ) - (set_local $$cmp28$i - (i32.eq - (get_local $$23) - (i32.const 0) + (set_local $$cmp28$i + (i32.eq + (get_local $$23) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp28$i) - (block - (set_local $$rsize$0$i$lcssa - (get_local $$rsize$0$i) + (if + (get_local $$cmp28$i) + (block + (set_local $$rsize$0$i$lcssa + (get_local $$rsize$0$i) + ) + (set_local $$v$0$i$lcssa + (get_local $$v$0$i) + ) + (br $while-out$23) ) - (set_local $$v$0$i$lcssa - (get_local $$v$0$i) + (set_local $$cond4$i + (get_local $$23) ) - (br $while-out$23) - ) - (set_local $$cond4$i - (get_local $$23) ) ) + (set_local $$cond4$i + (get_local $$22) + ) ) - (set_local $$cond4$i - (get_local $$22) + (set_local $$head29$i + (i32.add + (get_local $$cond4$i) + (i32.const 4) + ) ) - ) - (set_local $$head29$i - (i32.add - (get_local $$cond4$i) - (i32.const 4) + (set_local $$24 + (i32.load + (get_local $$head29$i) + ) ) - ) - (set_local $$24 - (i32.load - (get_local $$head29$i) + (set_local $$and30$i + (i32.and + (get_local $$24) + (i32.const -8) + ) ) - ) - (set_local $$and30$i - (i32.and - (get_local $$24) - (i32.const -8) + (set_local $$sub31$i + (i32.sub + (get_local $$and30$i) + (get_local $$cond) + ) ) - ) - (set_local $$sub31$i - (i32.sub - (get_local $$and30$i) - (get_local $$cond) + (set_local $$cmp32$i + (i32.lt_u + (get_local $$sub31$i) + (get_local $$rsize$0$i) + ) ) - ) - (set_local $$cmp32$i - (i32.lt_u - (get_local $$sub31$i) - (get_local $$rsize$0$i) + (set_local $$sub31$rsize$0$i + (if + (get_local $$cmp32$i) + (get_local $$sub31$i) + (get_local $$rsize$0$i) + ) ) - ) - (set_local $$sub31$rsize$0$i - (if - (get_local $$cmp32$i) - (get_local $$sub31$i) - (get_local $$rsize$0$i) + (set_local $$cond$v$0$i + (if + (get_local $$cmp32$i) + (get_local $$cond4$i) + (get_local $$v$0$i) + ) ) - ) - (set_local $$cond$v$0$i - (if - (get_local $$cmp32$i) + (set_local $$rsize$0$i + (get_local $$sub31$rsize$0$i) + ) + (set_local $$t$0$i (get_local $$cond4$i) - (get_local $$v$0$i) ) + (set_local $$v$0$i + (get_local $$cond$v$0$i) + ) + (br $while-in$24) ) - (set_local $$rsize$0$i - (get_local $$sub31$rsize$0$i) - ) - (set_local $$t$0$i - (get_local $$cond4$i) - ) - (set_local $$v$0$i - (get_local $$cond$v$0$i) - ) - (br $while-in$24) ) (set_local $$25 (i32.load @@ -18825,76 +18921,78 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $$arrayidx71$i - (i32.add - (get_local $$R$1$i) - (i32.const 20) - ) - ) - (set_local $$33 - (i32.load - (get_local $$arrayidx71$i) - ) - ) - (set_local $$cmp72$i - (i32.eq - (get_local $$33) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp72$i) - ) - (block - (set_local $$R$1$i - (get_local $$33) + (loop $while-in$28 + (block $while-out$27 + (set_local $$arrayidx71$i + (i32.add + (get_local $$R$1$i) + (i32.const 20) ) - (set_local $$RP$1$i + ) + (set_local $$33 + (i32.load (get_local $$arrayidx71$i) ) - (br $while-in$28) - ) - ) - (set_local $$arrayidx75$i - (i32.add - (get_local $$R$1$i) - (i32.const 16) ) - ) - (set_local $$34 - (i32.load - (get_local $$arrayidx75$i) + (set_local $$cmp72$i + (i32.eq + (get_local $$33) + (i32.const 0) + ) ) - ) - (set_local $$cmp76$i - (i32.eq - (get_local $$34) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp72$i) + ) + (block + (set_local $$R$1$i + (get_local $$33) + ) + (set_local $$RP$1$i + (get_local $$arrayidx71$i) + ) + (br $while-in$28) + ) ) - ) - (if - (get_local $$cmp76$i) - (block - (set_local $$R$1$i$lcssa + (set_local $$arrayidx75$i + (i32.add (get_local $$R$1$i) + (i32.const 16) ) - (set_local $$RP$1$i$lcssa - (get_local $$RP$1$i) + ) + (set_local $$34 + (i32.load + (get_local $$arrayidx75$i) ) - (br $while-out$27) ) - (block - (set_local $$R$1$i + (set_local $$cmp76$i + (i32.eq (get_local $$34) + (i32.const 0) ) - (set_local $$RP$1$i - (get_local $$arrayidx75$i) + ) + (if + (get_local $$cmp76$i) + (block + (set_local $$R$1$i$lcssa + (get_local $$R$1$i) + ) + (set_local $$RP$1$i$lcssa + (get_local $$RP$1$i) + ) + (br $while-out$27) + ) + (block + (set_local $$R$1$i + (get_local $$34) + ) + (set_local $$RP$1$i + (get_local $$arrayidx75$i) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (set_local $$cmp81$i (i32.lt_u @@ -19900,200 +19998,202 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $$head$i$154 - (i32.add - (get_local $$t$0$i$151) - (i32.const 4) - ) - ) - (set_local $$53 - (i32.load - (get_local $$head$i$154) + (loop $while-in$4 + (block $while-out$3 + (set_local $$head$i$154 + (i32.add + (get_local $$t$0$i$151) + (i32.const 4) + ) ) - ) - (set_local $$and32$i - (i32.and - (get_local $$53) - (i32.const -8) + (set_local $$53 + (i32.load + (get_local $$head$i$154) + ) ) - ) - (set_local $$sub33$i - (i32.sub - (get_local $$and32$i) - (get_local $$and145) + (set_local $$and32$i + (i32.and + (get_local $$53) + (i32.const -8) + ) ) - ) - (set_local $$cmp34$i - (i32.lt_u - (get_local $$sub33$i) - (get_local $$rsize$0$i$152) + (set_local $$sub33$i + (i32.sub + (get_local $$and32$i) + (get_local $$and145) + ) ) - ) - (if - (get_local $$cmp34$i) - (block - (set_local $$cmp36$i - (i32.eq - (get_local $$and32$i) - (get_local $$and145) - ) + (set_local $$cmp34$i + (i32.lt_u + (get_local $$sub33$i) + (get_local $$rsize$0$i$152) ) - (if - (get_local $$cmp36$i) - (block - (set_local $$rsize$49$i - (get_local $$sub33$i) - ) - (set_local $$t$48$i - (get_local $$t$0$i$151) - ) - (set_local $$v$410$i - (get_local $$t$0$i$151) - ) - (set_local $label - (i32.const 90) + ) + (if + (get_local $$cmp34$i) + (block + (set_local $$cmp36$i + (i32.eq + (get_local $$and32$i) + (get_local $$and145) ) - (br $label$break$L123) ) - (block - (set_local $$rsize$1$i - (get_local $$sub33$i) + (if + (get_local $$cmp36$i) + (block + (set_local $$rsize$49$i + (get_local $$sub33$i) + ) + (set_local $$t$48$i + (get_local $$t$0$i$151) + ) + (set_local $$v$410$i + (get_local $$t$0$i$151) + ) + (set_local $label + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $$v$1$i - (get_local $$t$0$i$151) + (block + (set_local $$rsize$1$i + (get_local $$sub33$i) + ) + (set_local $$v$1$i + (get_local $$t$0$i$151) + ) ) ) ) - ) - (block - (set_local $$rsize$1$i - (get_local $$rsize$0$i$152) - ) - (set_local $$v$1$i - (get_local $$v$0$i$153) + (block + (set_local $$rsize$1$i + (get_local $$rsize$0$i$152) + ) + (set_local $$v$1$i + (get_local $$v$0$i$153) + ) ) ) - ) - (set_local $$arrayidx40$i - (i32.add - (get_local $$t$0$i$151) - (i32.const 20) - ) - ) - (set_local $$54 - (i32.load - (get_local $$arrayidx40$i) - ) - ) - (set_local $$shr41$i - (i32.shr_u - (get_local $$sizebits$0$i) - (i32.const 31) - ) - ) - (set_local $$arrayidx44$i - (i32.add + (set_local $$arrayidx40$i (i32.add (get_local $$t$0$i$151) - (i32.const 16) + (i32.const 20) ) - (i32.shl - (get_local $$shr41$i) - (i32.const 2) - ) - ) - ) - (set_local $$55 - (i32.load - (get_local $$arrayidx44$i) - ) - ) - (set_local $$cmp45$i$155 - (i32.eq - (get_local $$54) - (i32.const 0) - ) - ) - (set_local $$cmp46$i - (i32.eq - (get_local $$54) - (get_local $$55) - ) - ) - (set_local $$or$cond1$i - (i32.or - (get_local $$cmp45$i$155) - (get_local $$cmp46$i) ) - ) - (set_local $$rst$1$i - (if - (get_local $$or$cond1$i) - (get_local $$rst$0$i) - (get_local $$54) + (set_local $$54 + (i32.load + (get_local $$arrayidx40$i) + ) ) - ) - (set_local $$cmp49$i - (i32.eq - (get_local $$55) - (i32.const 0) + (set_local $$shr41$i + (i32.shr_u + (get_local $$sizebits$0$i) + (i32.const 31) + ) ) - ) - (set_local $$56 - (i32.and - (get_local $$cmp49$i) - (i32.const 1) + (set_local $$arrayidx44$i + (i32.add + (i32.add + (get_local $$t$0$i$151) + (i32.const 16) + ) + (i32.shl + (get_local $$shr41$i) + (i32.const 2) + ) + ) ) - ) - (set_local $$shl52$i - (i32.xor - (get_local $$56) - (i32.const 1) + (set_local $$55 + (i32.load + (get_local $$arrayidx44$i) + ) ) - ) - (set_local $$sizebits$0$shl52$i - (i32.shl - (get_local $$sizebits$0$i) - (get_local $$shl52$i) + (set_local $$cmp45$i$155 + (i32.eq + (get_local $$54) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp49$i) - (block - (set_local $$rsize$3$i - (get_local $$rsize$1$i) + (set_local $$cmp46$i + (i32.eq + (get_local $$54) + (get_local $$55) ) - (set_local $$t$2$i - (get_local $$rst$1$i) + ) + (set_local $$or$cond1$i + (i32.or + (get_local $$cmp45$i$155) + (get_local $$cmp46$i) ) - (set_local $$v$3$i - (get_local $$v$1$i) + ) + (set_local $$rst$1$i + (if + (get_local $$or$cond1$i) + (get_local $$rst$0$i) + (get_local $$54) ) - (set_local $label - (i32.const 86) + ) + (set_local $$cmp49$i + (i32.eq + (get_local $$55) + (i32.const 0) ) - (br $while-out$3) ) - (block - (set_local $$rsize$0$i$152 - (get_local $$rsize$1$i) + (set_local $$56 + (i32.and + (get_local $$cmp49$i) + (i32.const 1) ) - (set_local $$rst$0$i - (get_local $$rst$1$i) + ) + (set_local $$shl52$i + (i32.xor + (get_local $$56) + (i32.const 1) ) - (set_local $$sizebits$0$i - (get_local $$sizebits$0$shl52$i) + ) + (set_local $$sizebits$0$shl52$i + (i32.shl + (get_local $$sizebits$0$i) + (get_local $$shl52$i) ) - (set_local $$t$0$i$151 - (get_local $$55) + ) + (if + (get_local $$cmp49$i) + (block + (set_local $$rsize$3$i + (get_local $$rsize$1$i) + ) + (set_local $$t$2$i + (get_local $$rst$1$i) + ) + (set_local $$v$3$i + (get_local $$v$1$i) + ) + (set_local $label + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $$v$0$i$153 - (get_local $$v$1$i) + (block + (set_local $$rsize$0$i$152 + (get_local $$rsize$1$i) + ) + (set_local $$rst$0$i + (get_local $$rst$1$i) + ) + (set_local $$sizebits$0$i + (get_local $$sizebits$0$shl52$i) + ) + (set_local $$t$0$i$151 + (get_local $$55) + ) + (set_local $$v$0$i$153 + (get_local $$v$1$i) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -20362,134 +20462,136 @@ (get_local $label) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $label - (i32.const 0) - ) - (set_local $$head99$i - (i32.add - (get_local $$t$48$i) - (i32.const 4) - ) - ) - (set_local $$58 - (i32.load - (get_local $$head99$i) - ) - ) - (set_local $$and100$i - (i32.and - (get_local $$58) - (i32.const -8) + (loop $while-in$6 + (block $while-out$5 + (set_local $label + (i32.const 0) ) - ) - (set_local $$sub101$i - (i32.sub - (get_local $$and100$i) - (get_local $$and145) + (set_local $$head99$i + (i32.add + (get_local $$t$48$i) + (i32.const 4) + ) ) - ) - (set_local $$cmp102$i - (i32.lt_u - (get_local $$sub101$i) - (get_local $$rsize$49$i) + (set_local $$58 + (i32.load + (get_local $$head99$i) + ) ) - ) - (set_local $$sub101$rsize$4$i - (if - (get_local $$cmp102$i) - (get_local $$sub101$i) - (get_local $$rsize$49$i) + (set_local $$and100$i + (i32.and + (get_local $$58) + (i32.const -8) + ) ) - ) - (set_local $$t$4$v$4$i - (if - (get_local $$cmp102$i) - (get_local $$t$48$i) - (get_local $$v$410$i) + (set_local $$sub101$i + (i32.sub + (get_local $$and100$i) + (get_local $$and145) + ) ) - ) - (set_local $$arrayidx106$i - (i32.add - (get_local $$t$48$i) - (i32.const 16) + (set_local $$cmp102$i + (i32.lt_u + (get_local $$sub101$i) + (get_local $$rsize$49$i) + ) ) - ) - (set_local $$59 - (i32.load - (get_local $$arrayidx106$i) + (set_local $$sub101$rsize$4$i + (if + (get_local $$cmp102$i) + (get_local $$sub101$i) + (get_local $$rsize$49$i) + ) ) - ) - (set_local $$cmp107$i$157 - (i32.eq - (get_local $$59) - (i32.const 0) + (set_local $$t$4$v$4$i + (if + (get_local $$cmp102$i) + (get_local $$t$48$i) + (get_local $$v$410$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp107$i$157) + (set_local $$arrayidx106$i + (i32.add + (get_local $$t$48$i) + (i32.const 16) + ) ) - (block - (set_local $$rsize$49$i - (get_local $$sub101$rsize$4$i) + (set_local $$59 + (i32.load + (get_local $$arrayidx106$i) ) - (set_local $$t$48$i + ) + (set_local $$cmp107$i$157 + (i32.eq (get_local $$59) + (i32.const 0) ) - (set_local $$v$410$i - (get_local $$t$4$v$4$i) + ) + (if + (i32.eqz + (get_local $$cmp107$i$157) ) - (set_local $label - (i32.const 90) + (block + (set_local $$rsize$49$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$t$48$i + (get_local $$59) + ) + (set_local $$v$410$i + (get_local $$t$4$v$4$i) + ) + (set_local $label + (i32.const 90) + ) + (br $while-in$6) ) - (br $while-in$6) - ) - ) - (set_local $$arrayidx113$i$159 - (i32.add - (get_local $$t$48$i) - (i32.const 20) - ) - ) - (set_local $$60 - (i32.load - (get_local $$arrayidx113$i$159) - ) - ) - (set_local $$cmp97$i - (i32.eq - (get_local $$60) - (i32.const 0) ) - ) - (if - (get_local $$cmp97$i) - (block - (set_local $$rsize$4$lcssa$i - (get_local $$sub101$rsize$4$i) - ) - (set_local $$v$4$lcssa$i - (get_local $$t$4$v$4$i) + (set_local $$arrayidx113$i$159 + (i32.add + (get_local $$t$48$i) + (i32.const 20) ) - (br $while-out$5) ) - (block - (set_local $$rsize$49$i - (get_local $$sub101$rsize$4$i) + (set_local $$60 + (i32.load + (get_local $$arrayidx113$i$159) ) - (set_local $$t$48$i + ) + (set_local $$cmp97$i + (i32.eq (get_local $$60) + (i32.const 0) ) - (set_local $$v$410$i - (get_local $$t$4$v$4$i) + ) + (if + (get_local $$cmp97$i) + (block + (set_local $$rsize$4$lcssa$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$v$4$lcssa$i + (get_local $$t$4$v$4$i) + ) + (br $while-out$5) ) - (set_local $label - (i32.const 90) + (block + (set_local $$rsize$49$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$t$48$i + (get_local $$60) + ) + (set_local $$v$410$i + (get_local $$t$4$v$4$i) + ) + (set_local $label + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (set_local $$cmp116$i @@ -20644,85 +20746,87 @@ ) ) ) - (block - (set_local $$R$1$i$168 - (get_local $$68) - ) - (set_local $$RP$1$i$167 - (get_local $$arrayidx151$i) - ) - ) - ) - (loop $while-out$9 $while-in$10 - (set_local $$arrayidx161$i - (i32.add - (get_local $$R$1$i$168) - (i32.const 20) - ) - ) - (set_local $$70 - (i32.load - (get_local $$arrayidx161$i) - ) - ) - (set_local $$cmp162$i - (i32.eq - (get_local $$70) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp162$i) + (block + (set_local $$R$1$i$168 + (get_local $$68) ) - (block - (set_local $$R$1$i$168 - (get_local $$70) + (set_local $$RP$1$i$167 + (get_local $$arrayidx151$i) + ) + ) + ) + (loop $while-in$10 + (block $while-out$9 + (set_local $$arrayidx161$i + (i32.add + (get_local $$R$1$i$168) + (i32.const 20) ) - (set_local $$RP$1$i$167 + ) + (set_local $$70 + (i32.load (get_local $$arrayidx161$i) ) - (br $while-in$10) ) - ) - (set_local $$arrayidx165$i$169 - (i32.add - (get_local $$R$1$i$168) - (i32.const 16) - ) - ) - (set_local $$71 - (i32.load - (get_local $$arrayidx165$i$169) + (set_local $$cmp162$i + (i32.eq + (get_local $$70) + (i32.const 0) + ) ) - ) - (set_local $$cmp166$i - (i32.eq - (get_local $$71) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp162$i) + ) + (block + (set_local $$R$1$i$168 + (get_local $$70) + ) + (set_local $$RP$1$i$167 + (get_local $$arrayidx161$i) + ) + (br $while-in$10) + ) ) - ) - (if - (get_local $$cmp166$i) - (block - (set_local $$R$1$i$168$lcssa + (set_local $$arrayidx165$i$169 + (i32.add (get_local $$R$1$i$168) + (i32.const 16) ) - (set_local $$RP$1$i$167$lcssa - (get_local $$RP$1$i$167) + ) + (set_local $$71 + (i32.load + (get_local $$arrayidx165$i$169) ) - (br $while-out$9) ) - (block - (set_local $$R$1$i$168 + (set_local $$cmp166$i + (i32.eq (get_local $$71) + (i32.const 0) ) - (set_local $$RP$1$i$167 - (get_local $$arrayidx165$i$169) + ) + (if + (get_local $$cmp166$i) + (block + (set_local $$R$1$i$168$lcssa + (get_local $$R$1$i$168) + ) + (set_local $$RP$1$i$167$lcssa + (get_local $$RP$1$i$167) + ) + (br $while-out$9) + ) + (block + (set_local $$R$1$i$168 + (get_local $$71) + ) + (set_local $$RP$1$i$167 + (get_local $$arrayidx165$i$169) + ) ) ) + (br $while-in$10) ) - (br $while-in$10) ) (set_local $$cmp171$i (i32.lt_u @@ -21710,101 +21814,103 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-out$17 $while-in$18 - (set_local $$head386$i - (i32.add - (get_local $$T$0$i) - (i32.const 4) - ) - ) - (set_local $$88 - (i32.load - (get_local $$head386$i) + (loop $while-in$18 + (block $while-out$17 + (set_local $$head386$i + (i32.add + (get_local $$T$0$i) + (i32.const 4) + ) ) - ) - (set_local $$and387$i - (i32.and - (get_local $$88) - (i32.const -8) + (set_local $$88 + (i32.load + (get_local $$head386$i) + ) ) - ) - (set_local $$cmp388$i - (i32.eq - (get_local $$and387$i) - (get_local $$rsize$4$lcssa$i) + (set_local $$and387$i + (i32.and + (get_local $$88) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp388$i) - (block - (set_local $$T$0$i$lcssa - (get_local $$T$0$i) + (set_local $$cmp388$i + (i32.eq + (get_local $$and387$i) + (get_local $$rsize$4$lcssa$i) ) - (set_local $label - (i32.const 148) + ) + (if + (get_local $$cmp388$i) + (block + (set_local $$T$0$i$lcssa + (get_local $$T$0$i) + ) + (set_local $label + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $$shr391$i - (i32.shr_u - (get_local $$K373$0$i) - (i32.const 31) + (set_local $$shr391$i + (i32.shr_u + (get_local $$K373$0$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx394$i - (i32.add + (set_local $$arrayidx394$i (i32.add - (get_local $$T$0$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr391$i) + (i32.const 2) + ) ) + ) + (set_local $$shl395$i (i32.shl - (get_local $$shr391$i) - (i32.const 2) + (get_local $$K373$0$i) + (i32.const 1) ) ) - ) - (set_local $$shl395$i - (i32.shl - (get_local $$K373$0$i) - (i32.const 1) - ) - ) - (set_local $$89 - (i32.load - (get_local $$arrayidx394$i) - ) - ) - (set_local $$cmp396$i - (i32.eq - (get_local $$89) - (i32.const 0) - ) - ) - (if - (get_local $$cmp396$i) - (block - (set_local $$T$0$i$lcssa293 - (get_local $$T$0$i) - ) - (set_local $$arrayidx394$i$lcssa + (set_local $$89 + (i32.load (get_local $$arrayidx394$i) ) - (set_local $label - (i32.const 145) + ) + (set_local $$cmp396$i + (i32.eq + (get_local $$89) + (i32.const 0) ) - (br $while-out$17) ) - (block - (set_local $$K373$0$i - (get_local $$shl395$i) + (if + (get_local $$cmp396$i) + (block + (set_local $$T$0$i$lcssa293 + (get_local $$T$0$i) + ) + (set_local $$arrayidx394$i$lcssa + (get_local $$arrayidx394$i) + ) + (set_local $label + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $$T$0$i - (get_local $$89) + (block + (set_local $$K373$0$i + (get_local $$shl395$i) + ) + (set_local $$T$0$i + (get_local $$89) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -22481,90 +22587,92 @@ (set_local $$sp$0$i$i (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (set_local $$105 - (i32.load - (get_local $$sp$0$i$i) - ) - ) - (set_local $$cmp$i$9$i - (i32.gt_u - (get_local $$105) - (get_local $$104) + (loop $while-in$38 + (block $while-out$37 + (set_local $$105 + (i32.load + (get_local $$sp$0$i$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp$i$9$i) + (set_local $$cmp$i$9$i + (i32.gt_u + (get_local $$105) + (get_local $$104) + ) ) - (block - (set_local $$size$i$i - (i32.add - (get_local $$sp$0$i$i) - (i32.const 4) - ) + (if + (i32.eqz + (get_local $$cmp$i$9$i) ) - (set_local $$106 - (i32.load - (get_local $$size$i$i) + (block + (set_local $$size$i$i + (i32.add + (get_local $$sp$0$i$i) + (i32.const 4) + ) ) - ) - (set_local $$add$ptr$i$i - (i32.add - (get_local $$105) - (get_local $$106) + (set_local $$106 + (i32.load + (get_local $$size$i$i) + ) ) - ) - (set_local $$cmp2$i$i - (i32.gt_u - (get_local $$add$ptr$i$i) - (get_local $$104) + (set_local $$add$ptr$i$i + (i32.add + (get_local $$105) + (get_local $$106) + ) ) - ) - (if - (get_local $$cmp2$i$i) - (block - (set_local $$base$i$i$lcssa - (get_local $$sp$0$i$i) + (set_local $$cmp2$i$i + (i32.gt_u + (get_local $$add$ptr$i$i) + (get_local $$104) ) - (set_local $$size$i$i$lcssa - (get_local $$size$i$i) + ) + (if + (get_local $$cmp2$i$i) + (block + (set_local $$base$i$i$lcssa + (get_local $$sp$0$i$i) + ) + (set_local $$size$i$i$lcssa + (get_local $$size$i$i) + ) + (br $while-out$37) ) - (br $while-out$37) ) ) ) - ) - (set_local $$next$i$i - (i32.add - (get_local $$sp$0$i$i) - (i32.const 8) - ) - ) - (set_local $$107 - (i32.load - (get_local $$next$i$i) + (set_local $$next$i$i + (i32.add + (get_local $$sp$0$i$i) + (i32.const 8) + ) ) - ) - (set_local $$cmp3$i$i - (i32.eq - (get_local $$107) - (i32.const 0) + (set_local $$107 + (i32.load + (get_local $$next$i$i) + ) ) - ) - (if - (get_local $$cmp3$i$i) - (block - (set_local $label - (i32.const 173) + (set_local $$cmp3$i$i + (i32.eq + (get_local $$107) + (i32.const 0) ) - (br $label$break$L259) ) - (set_local $$sp$0$i$i - (get_local $$107) + (if + (get_local $$cmp3$i$i) + (block + (set_local $label + (i32.const 173) + ) + (br $label$break$L259) + ) + (set_local $$sp$0$i$i + (get_local $$107) + ) ) + (br $while-in$38) ) - (br $while-in$38) ) (set_local $$112 (i32.load @@ -23263,62 +23371,64 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-out$77 $while-in$78 - (set_local $$shl$i$i - (i32.shl - (get_local $$i$01$i$i) - (i32.const 1) - ) - ) - (set_local $$arrayidx$i$i - (i32.add - (i32.const 216) + (loop $while-in$78 + (block $while-out$77 + (set_local $$shl$i$i (i32.shl - (get_local $$shl$i$i) - (i32.const 2) + (get_local $$i$01$i$i) + (i32.const 1) ) ) - ) - (set_local $$122 - (i32.add - (get_local $$arrayidx$i$i) - (i32.const 12) + (set_local $$arrayidx$i$i + (i32.add + (i32.const 216) + (i32.shl + (get_local $$shl$i$i) + (i32.const 2) + ) + ) ) - ) - (i32.store - (get_local $$122) - (get_local $$arrayidx$i$i) - ) - (set_local $$123 - (i32.add + (set_local $$122 + (i32.add + (get_local $$arrayidx$i$i) + (i32.const 12) + ) + ) + (i32.store + (get_local $$122) (get_local $$arrayidx$i$i) - (i32.const 8) ) - ) - (i32.store - (get_local $$123) - (get_local $$arrayidx$i$i) - ) - (set_local $$inc$i$i - (i32.add - (get_local $$i$01$i$i) - (i32.const 1) + (set_local $$123 + (i32.add + (get_local $$arrayidx$i$i) + (i32.const 8) + ) + ) + (i32.store + (get_local $$123) + (get_local $$arrayidx$i$i) ) - ) - (set_local $$exitcond$i$i - (i32.eq - (get_local $$inc$i$i) - (i32.const 32) + (set_local $$inc$i$i + (i32.add + (get_local $$i$01$i$i) + (i32.const 1) + ) ) - ) - (if - (get_local $$exitcond$i$i) - (br $while-out$77) - (set_local $$i$01$i$i - (get_local $$inc$i$i) + (set_local $$exitcond$i$i + (i32.eq + (get_local $$inc$i$i) + (i32.const 32) + ) + ) + (if + (get_local $$exitcond$i$i) + (br $while-out$77) + (set_local $$i$01$i$i + (get_local $$inc$i$i) + ) ) + (br $while-in$78) ) - (br $while-in$78) ) (set_local $$sub172$i (i32.add @@ -23432,81 +23542,83 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-out$46 $while-in$47 - (set_local $$127 - (i32.load - (get_local $$sp$0108$i) - ) - ) - (set_local $$size188$i - (i32.add - (get_local $$sp$0108$i) - (i32.const 4) - ) - ) - (set_local $$128 - (i32.load - (get_local $$size188$i) + (loop $while-in$47 + (block $while-out$46 + (set_local $$127 + (i32.load + (get_local $$sp$0108$i) + ) ) - ) - (set_local $$add$ptr189$i - (i32.add - (get_local $$127) - (get_local $$128) + (set_local $$size188$i + (i32.add + (get_local $$sp$0108$i) + (i32.const 4) + ) ) - ) - (set_local $$cmp190$i - (i32.eq - (get_local $$tbase$796$i) - (get_local $$add$ptr189$i) + (set_local $$128 + (i32.load + (get_local $$size188$i) + ) ) - ) - (if - (get_local $$cmp190$i) - (block - (set_local $$$lcssa + (set_local $$add$ptr189$i + (i32.add (get_local $$127) - ) - (set_local $$$lcssa290 (get_local $$128) ) - (set_local $$size188$i$lcssa - (get_local $$size188$i) - ) - (set_local $$sp$0108$i$lcssa - (get_local $$sp$0108$i) + ) + (set_local $$cmp190$i + (i32.eq + (get_local $$tbase$796$i) + (get_local $$add$ptr189$i) ) - (set_local $label - (i32.const 203) + ) + (if + (get_local $$cmp190$i) + (block + (set_local $$$lcssa + (get_local $$127) + ) + (set_local $$$lcssa290 + (get_local $$128) + ) + (set_local $$size188$i$lcssa + (get_local $$size188$i) + ) + (set_local $$sp$0108$i$lcssa + (get_local $$sp$0108$i) + ) + (set_local $label + (i32.const 203) + ) + (br $while-out$46) ) - (br $while-out$46) ) - ) - (set_local $$next$i - (i32.add - (get_local $$sp$0108$i) - (i32.const 8) + (set_local $$next$i + (i32.add + (get_local $$sp$0108$i) + (i32.const 8) + ) ) - ) - (set_local $$129 - (i32.load - (get_local $$next$i) + (set_local $$129 + (i32.load + (get_local $$next$i) + ) ) - ) - (set_local $$cmp186$i - (i32.eq - (get_local $$129) - (i32.const 0) + (set_local $$cmp186$i + (i32.eq + (get_local $$129) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp186$i) - (br $while-out$46) - (set_local $$sp$0108$i - (get_local $$129) + (if + (get_local $$cmp186$i) + (br $while-out$46) + (set_local $$sp$0108$i + (get_local $$129) + ) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -23725,63 +23837,65 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-out$48 $while-in$49 - (set_local $$136 - (i32.load - (get_local $$sp$1107$i) - ) - ) - (set_local $$cmp228$i - (i32.eq - (get_local $$136) - (get_local $$add$ptr227$i) - ) - ) - (if - (get_local $$cmp228$i) - (block - (set_local $$base226$i$lcssa - (get_local $$sp$1107$i) - ) - (set_local $$sp$1107$i$lcssa + (loop $while-in$49 + (block $while-out$48 + (set_local $$136 + (i32.load (get_local $$sp$1107$i) ) - (set_local $label - (i32.const 211) + ) + (set_local $$cmp228$i + (i32.eq + (get_local $$136) + (get_local $$add$ptr227$i) ) - (br $while-out$48) ) - ) - (set_local $$next231$i - (i32.add - (get_local $$sp$1107$i) - (i32.const 8) + (if + (get_local $$cmp228$i) + (block + (set_local $$base226$i$lcssa + (get_local $$sp$1107$i) + ) + (set_local $$sp$1107$i$lcssa + (get_local $$sp$1107$i) + ) + (set_local $label + (i32.const 211) + ) + (br $while-out$48) + ) ) - ) - (set_local $$137 - (i32.load - (get_local $$next231$i) + (set_local $$next231$i + (i32.add + (get_local $$sp$1107$i) + (i32.const 8) + ) ) - ) - (set_local $$cmp224$i - (i32.eq - (get_local $$137) - (i32.const 0) + (set_local $$137 + (i32.load + (get_local $$next231$i) + ) ) - ) - (if - (get_local $$cmp224$i) - (block - (set_local $$sp$0$i$i$i - (i32.const 624) + (set_local $$cmp224$i + (i32.eq + (get_local $$137) + (i32.const 0) ) - (br $while-out$48) ) - (set_local $$sp$1107$i - (get_local $$137) + (if + (get_local $$cmp224$i) + (block + (set_local $$sp$0$i$i$i + (i32.const 624) + ) + (br $while-out$48) + ) + (set_local $$sp$1107$i + (get_local $$137) + ) ) + (br $while-in$49) ) - (br $while-in$49) ) (if (i32.eq @@ -24425,76 +24539,78 @@ ) ) ) - (loop $while-out$55 $while-in$56 - (set_local $$arrayidx103$i$i - (i32.add - (get_local $$R$1$i$i) - (i32.const 20) - ) - ) - (set_local $$161 - (i32.load - (get_local $$arrayidx103$i$i) - ) - ) - (set_local $$cmp104$i$i - (i32.eq - (get_local $$161) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp104$i$i) - ) - (block - (set_local $$R$1$i$i - (get_local $$161) + (loop $while-in$56 + (block $while-out$55 + (set_local $$arrayidx103$i$i + (i32.add + (get_local $$R$1$i$i) + (i32.const 20) ) - (set_local $$RP$1$i$i + ) + (set_local $$161 + (i32.load (get_local $$arrayidx103$i$i) ) - (br $while-in$56) - ) - ) - (set_local $$arrayidx107$i$i - (i32.add - (get_local $$R$1$i$i) - (i32.const 16) ) - ) - (set_local $$162 - (i32.load - (get_local $$arrayidx107$i$i) + (set_local $$cmp104$i$i + (i32.eq + (get_local $$161) + (i32.const 0) + ) ) - ) - (set_local $$cmp108$i$i - (i32.eq - (get_local $$162) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp104$i$i) + ) + (block + (set_local $$R$1$i$i + (get_local $$161) + ) + (set_local $$RP$1$i$i + (get_local $$arrayidx103$i$i) + ) + (br $while-in$56) + ) ) - ) - (if - (get_local $$cmp108$i$i) - (block - (set_local $$R$1$i$i$lcssa + (set_local $$arrayidx107$i$i + (i32.add (get_local $$R$1$i$i) + (i32.const 16) ) - (set_local $$RP$1$i$i$lcssa - (get_local $$RP$1$i$i) + ) + (set_local $$162 + (i32.load + (get_local $$arrayidx107$i$i) ) - (br $while-out$55) ) - (block - (set_local $$R$1$i$i + (set_local $$cmp108$i$i + (i32.eq (get_local $$162) + (i32.const 0) ) - (set_local $$RP$1$i$i - (get_local $$arrayidx107$i$i) + ) + (if + (get_local $$cmp108$i$i) + (block + (set_local $$R$1$i$i$lcssa + (get_local $$R$1$i$i) + ) + (set_local $$RP$1$i$i$lcssa + (get_local $$RP$1$i$i) + ) + (br $while-out$55) + ) + (block + (set_local $$R$1$i$i + (get_local $$162) + ) + (set_local $$RP$1$i$i + (get_local $$arrayidx107$i$i) + ) ) ) + (br $while-in$56) ) - (br $while-in$56) ) (set_local $$cmp112$i$i (i32.lt_u @@ -25460,101 +25576,103 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-out$69 $while-in$70 - (set_local $$head317$i$i - (i32.add - (get_local $$T$0$i$58$i) - (i32.const 4) - ) - ) - (set_local $$179 - (i32.load - (get_local $$head317$i$i) + (loop $while-in$70 + (block $while-out$69 + (set_local $$head317$i$i + (i32.add + (get_local $$T$0$i$58$i) + (i32.const 4) + ) ) - ) - (set_local $$and318$i$i - (i32.and - (get_local $$179) - (i32.const -8) + (set_local $$179 + (i32.load + (get_local $$head317$i$i) + ) ) - ) - (set_local $$cmp319$i$i - (i32.eq - (get_local $$and318$i$i) - (get_local $$qsize$0$i$i) + (set_local $$and318$i$i + (i32.and + (get_local $$179) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp319$i$i) - (block - (set_local $$T$0$i$58$i$lcssa - (get_local $$T$0$i$58$i) + (set_local $$cmp319$i$i + (i32.eq + (get_local $$and318$i$i) + (get_local $$qsize$0$i$i) ) - (set_local $label - (i32.const 281) + ) + (if + (get_local $$cmp319$i$i) + (block + (set_local $$T$0$i$58$i$lcssa + (get_local $$T$0$i$58$i) + ) + (set_local $label + (i32.const 281) + ) + (br $while-out$69) ) - (br $while-out$69) ) - ) - (set_local $$shr322$i$i - (i32.shr_u - (get_local $$K305$0$i$i) - (i32.const 31) + (set_local $$shr322$i$i + (i32.shr_u + (get_local $$K305$0$i$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx325$i$i - (i32.add + (set_local $$arrayidx325$i$i (i32.add - (get_local $$T$0$i$58$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i$58$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr322$i$i) + (i32.const 2) + ) ) + ) + (set_local $$shl326$i$i (i32.shl - (get_local $$shr322$i$i) - (i32.const 2) + (get_local $$K305$0$i$i) + (i32.const 1) ) ) - ) - (set_local $$shl326$i$i - (i32.shl - (get_local $$K305$0$i$i) - (i32.const 1) - ) - ) - (set_local $$180 - (i32.load - (get_local $$arrayidx325$i$i) - ) - ) - (set_local $$cmp327$i$i - (i32.eq - (get_local $$180) - (i32.const 0) - ) - ) - (if - (get_local $$cmp327$i$i) - (block - (set_local $$T$0$i$58$i$lcssa283 - (get_local $$T$0$i$58$i) - ) - (set_local $$arrayidx325$i$i$lcssa + (set_local $$180 + (i32.load (get_local $$arrayidx325$i$i) ) - (set_local $label - (i32.const 278) + ) + (set_local $$cmp327$i$i + (i32.eq + (get_local $$180) + (i32.const 0) ) - (br $while-out$69) ) - (block - (set_local $$K305$0$i$i - (get_local $$shl326$i$i) + (if + (get_local $$cmp327$i$i) + (block + (set_local $$T$0$i$58$i$lcssa283 + (get_local $$T$0$i$58$i) + ) + (set_local $$arrayidx325$i$i$lcssa + (get_local $$arrayidx325$i$i) + ) + (set_local $label + (i32.const 278) + ) + (br $while-out$69) ) - (set_local $$T$0$i$58$i - (get_local $$180) + (block + (set_local $$K305$0$i$i + (get_local $$shl326$i$i) + ) + (set_local $$T$0$i$58$i + (get_local $$180) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (if (i32.eq @@ -25731,72 +25849,74 @@ ) ) ) - (loop $while-out$71 $while-in$72 - (set_local $$185 - (i32.load - (get_local $$sp$0$i$i$i) - ) - ) - (set_local $$cmp$i$i$i - (i32.gt_u - (get_local $$185) - (get_local $$119) + (loop $while-in$72 + (block $while-out$71 + (set_local $$185 + (i32.load + (get_local $$sp$0$i$i$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp$i$i$i) + (set_local $$cmp$i$i$i + (i32.gt_u + (get_local $$185) + (get_local $$119) + ) ) - (block - (set_local $$size$i$i$i - (i32.add - (get_local $$sp$0$i$i$i) - (i32.const 4) - ) + (if + (i32.eqz + (get_local $$cmp$i$i$i) ) - (set_local $$186 - (i32.load - (get_local $$size$i$i$i) + (block + (set_local $$size$i$i$i + (i32.add + (get_local $$sp$0$i$i$i) + (i32.const 4) + ) ) - ) - (set_local $$add$ptr$i$i$i - (i32.add - (get_local $$185) - (get_local $$186) + (set_local $$186 + (i32.load + (get_local $$size$i$i$i) + ) ) - ) - (set_local $$cmp2$i$i$i - (i32.gt_u - (get_local $$add$ptr$i$i$i) - (get_local $$119) + (set_local $$add$ptr$i$i$i + (i32.add + (get_local $$185) + (get_local $$186) + ) ) - ) - (if - (get_local $$cmp2$i$i$i) - (block - (set_local $$add$ptr$i$i$i$lcssa + (set_local $$cmp2$i$i$i + (i32.gt_u (get_local $$add$ptr$i$i$i) + (get_local $$119) + ) + ) + (if + (get_local $$cmp2$i$i$i) + (block + (set_local $$add$ptr$i$i$i$lcssa + (get_local $$add$ptr$i$i$i) + ) + (br $while-out$71) ) - (br $while-out$71) ) ) ) - ) - (set_local $$next$i$i$i - (i32.add - (get_local $$sp$0$i$i$i) - (i32.const 8) + (set_local $$next$i$i$i + (i32.add + (get_local $$sp$0$i$i$i) + (i32.const 8) + ) ) - ) - (set_local $$187 - (i32.load - (get_local $$next$i$i$i) + (set_local $$187 + (i32.load + (get_local $$next$i$i$i) + ) ) + (set_local $$sp$0$i$i$i + (get_local $$187) + ) + (br $while-in$72) ) - (set_local $$sp$0$i$i$i - (get_local $$187) - ) - (br $while-in$72) ) (set_local $$add$ptr2$i$i (i32.add @@ -26059,37 +26179,39 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-out$73 $while-in$74 - (set_local $$add$ptr24$i$i - (i32.add - (get_local $$p$0$i$i) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (set_local $$add$ptr24$i$i + (i32.add + (get_local $$p$0$i$i) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$add$ptr24$i$i) - (i32.const 7) - ) - (set_local $$193 - (i32.add + (i32.store (get_local $$add$ptr24$i$i) - (i32.const 4) + (i32.const 7) ) - ) - (set_local $$cmp27$i$i - (i32.lt_u - (get_local $$193) - (get_local $$add$ptr$i$i$i$lcssa) + (set_local $$193 + (i32.add + (get_local $$add$ptr24$i$i) + (i32.const 4) + ) ) - ) - (if - (get_local $$cmp27$i$i) - (set_local $$p$0$i$i - (get_local $$add$ptr24$i$i) + (set_local $$cmp27$i$i + (i32.lt_u + (get_local $$193) + (get_local $$add$ptr$i$i$i$lcssa) + ) + ) + (if + (get_local $$cmp27$i$i) + (set_local $$p$0$i$i + (get_local $$add$ptr24$i$i) + ) + (br $while-out$73) ) - (br $while-out$73) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $$cmp28$i$i (i32.eq @@ -26619,101 +26741,103 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-out$75 $while-in$76 - (set_local $$head118$i$i - (i32.add - (get_local $$T$0$i$i) - (i32.const 4) - ) - ) - (set_local $$201 - (i32.load - (get_local $$head118$i$i) + (loop $while-in$76 + (block $while-out$75 + (set_local $$head118$i$i + (i32.add + (get_local $$T$0$i$i) + (i32.const 4) + ) ) - ) - (set_local $$and119$i$i - (i32.and - (get_local $$201) - (i32.const -8) + (set_local $$201 + (i32.load + (get_local $$head118$i$i) + ) ) - ) - (set_local $$cmp120$i$i - (i32.eq - (get_local $$and119$i$i) - (get_local $$sub$ptr$sub$i$i) + (set_local $$and119$i$i + (i32.and + (get_local $$201) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp120$i$i) - (block - (set_local $$T$0$i$i$lcssa - (get_local $$T$0$i$i) + (set_local $$cmp120$i$i + (i32.eq + (get_local $$and119$i$i) + (get_local $$sub$ptr$sub$i$i) ) - (set_local $label - (i32.const 307) + ) + (if + (get_local $$cmp120$i$i) + (block + (set_local $$T$0$i$i$lcssa + (get_local $$T$0$i$i) + ) + (set_local $label + (i32.const 307) + ) + (br $while-out$75) ) - (br $while-out$75) ) - ) - (set_local $$shr123$i$i - (i32.shr_u - (get_local $$K105$0$i$i) - (i32.const 31) + (set_local $$shr123$i$i + (i32.shr_u + (get_local $$K105$0$i$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx126$i$i - (i32.add + (set_local $$arrayidx126$i$i (i32.add - (get_local $$T$0$i$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr123$i$i) + (i32.const 2) + ) ) + ) + (set_local $$shl127$i$i (i32.shl - (get_local $$shr123$i$i) - (i32.const 2) + (get_local $$K105$0$i$i) + (i32.const 1) ) ) - ) - (set_local $$shl127$i$i - (i32.shl - (get_local $$K105$0$i$i) - (i32.const 1) - ) - ) - (set_local $$202 - (i32.load - (get_local $$arrayidx126$i$i) - ) - ) - (set_local $$cmp128$i$i - (i32.eq - (get_local $$202) - (i32.const 0) - ) - ) - (if - (get_local $$cmp128$i$i) - (block - (set_local $$T$0$i$i$lcssa284 - (get_local $$T$0$i$i) - ) - (set_local $$arrayidx126$i$i$lcssa + (set_local $$202 + (i32.load (get_local $$arrayidx126$i$i) ) - (set_local $label - (i32.const 304) + ) + (set_local $$cmp128$i$i + (i32.eq + (get_local $$202) + (i32.const 0) ) - (br $while-out$75) ) - (block - (set_local $$K105$0$i$i - (get_local $$shl127$i$i) + (if + (get_local $$cmp128$i$i) + (block + (set_local $$T$0$i$i$lcssa284 + (get_local $$T$0$i$i) + ) + (set_local $$arrayidx126$i$i$lcssa + (get_local $$arrayidx126$i$i) + ) + (set_local $label + (i32.const 304) + ) + (br $while-out$75) ) - (set_local $$T$0$i$i - (get_local $$202) + (block + (set_local $$K105$0$i$i + (get_local $$shl127$i$i) + ) + (set_local $$T$0$i$i + (get_local $$202) + ) ) ) + (br $while-in$76) ) - (br $while-in$76) ) (if (i32.eq @@ -27874,76 +27998,78 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $$arrayidx108 - (i32.add - (get_local $$R$1) - (i32.const 20) - ) - ) - (set_local $$16 - (i32.load - (get_local $$arrayidx108) - ) - ) - (set_local $$cmp109 - (i32.eq - (get_local $$16) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp109) - ) - (block - (set_local $$R$1 - (get_local $$16) + (loop $while-in$5 + (block $while-out$4 + (set_local $$arrayidx108 + (i32.add + (get_local $$R$1) + (i32.const 20) ) - (set_local $$RP$1 + ) + (set_local $$16 + (i32.load (get_local $$arrayidx108) ) - (br $while-in$5) - ) - ) - (set_local $$arrayidx113 - (i32.add - (get_local $$R$1) - (i32.const 16) ) - ) - (set_local $$17 - (i32.load - (get_local $$arrayidx113) + (set_local $$cmp109 + (i32.eq + (get_local $$16) + (i32.const 0) + ) ) - ) - (set_local $$cmp114 - (i32.eq - (get_local $$17) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp109) + ) + (block + (set_local $$R$1 + (get_local $$16) + ) + (set_local $$RP$1 + (get_local $$arrayidx108) + ) + (br $while-in$5) + ) ) - ) - (if - (get_local $$cmp114) - (block - (set_local $$R$1$lcssa + (set_local $$arrayidx113 + (i32.add (get_local $$R$1) + (i32.const 16) ) - (set_local $$RP$1$lcssa - (get_local $$RP$1) + ) + (set_local $$17 + (i32.load + (get_local $$arrayidx113) ) - (br $while-out$4) ) - (block - (set_local $$R$1 + (set_local $$cmp114 + (i32.eq (get_local $$17) + (i32.const 0) ) - (set_local $$RP$1 - (get_local $$arrayidx113) + ) + (if + (get_local $$cmp114) + (block + (set_local $$R$1$lcssa + (get_local $$R$1) + ) + (set_local $$RP$1$lcssa + (get_local $$RP$1) + ) + (br $while-out$4) + ) + (block + (set_local $$R$1 + (get_local $$17) + ) + (set_local $$RP$1 + (get_local $$arrayidx113) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (set_local $$cmp118 (i32.lt_u @@ -28913,77 +29039,79 @@ (get_local $$arrayidx362) ) ) - ) - (loop $while-out$12 $while-in$13 - (set_local $$arrayidx374 - (i32.add - (get_local $$R332$1) - (i32.const 20) - ) - ) - (set_local $$49 - (i32.load - (get_local $$arrayidx374) - ) - ) - (set_local $$cmp375 - (i32.eq - (get_local $$49) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp375) - ) - (block - (set_local $$R332$1 - (get_local $$49) + ) + (loop $while-in$13 + (block $while-out$12 + (set_local $$arrayidx374 + (i32.add + (get_local $$R332$1) + (i32.const 20) ) - (set_local $$RP360$1 + ) + (set_local $$49 + (i32.load (get_local $$arrayidx374) ) - (br $while-in$13) - ) - ) - (set_local $$arrayidx379 - (i32.add - (get_local $$R332$1) - (i32.const 16) ) - ) - (set_local $$50 - (i32.load - (get_local $$arrayidx379) + (set_local $$cmp375 + (i32.eq + (get_local $$49) + (i32.const 0) + ) ) - ) - (set_local $$cmp380 - (i32.eq - (get_local $$50) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp375) + ) + (block + (set_local $$R332$1 + (get_local $$49) + ) + (set_local $$RP360$1 + (get_local $$arrayidx374) + ) + (br $while-in$13) + ) ) - ) - (if - (get_local $$cmp380) - (block - (set_local $$R332$1$lcssa + (set_local $$arrayidx379 + (i32.add (get_local $$R332$1) + (i32.const 16) ) - (set_local $$RP360$1$lcssa - (get_local $$RP360$1) + ) + (set_local $$50 + (i32.load + (get_local $$arrayidx379) ) - (br $while-out$12) ) - (block - (set_local $$R332$1 + (set_local $$cmp380 + (i32.eq (get_local $$50) + (i32.const 0) ) - (set_local $$RP360$1 - (get_local $$arrayidx379) + ) + (if + (get_local $$cmp380) + (block + (set_local $$R332$1$lcssa + (get_local $$R332$1) + ) + (set_local $$RP360$1$lcssa + (get_local $$RP360$1) + ) + (br $while-out$12) + ) + (block + (set_local $$R332$1 + (get_local $$50) + ) + (set_local $$RP360$1 + (get_local $$arrayidx379) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (set_local $$51 (i32.load @@ -29972,101 +30100,103 @@ (set_local $$T$0 (get_local $$67) ) - (loop $while-out$18 $while-in$19 - (set_local $$head591 - (i32.add - (get_local $$T$0) - (i32.const 4) - ) - ) - (set_local $$68 - (i32.load - (get_local $$head591) + (loop $while-in$19 + (block $while-out$18 + (set_local $$head591 + (i32.add + (get_local $$T$0) + (i32.const 4) + ) ) - ) - (set_local $$and592 - (i32.and - (get_local $$68) - (i32.const -8) + (set_local $$68 + (i32.load + (get_local $$head591) + ) ) - ) - (set_local $$cmp593 - (i32.eq - (get_local $$and592) - (get_local $$psize$2) + (set_local $$and592 + (i32.and + (get_local $$68) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp593) - (block - (set_local $$T$0$lcssa - (get_local $$T$0) + (set_local $$cmp593 + (i32.eq + (get_local $$and592) + (get_local $$psize$2) ) - (set_local $label - (i32.const 130) + ) + (if + (get_local $$cmp593) + (block + (set_local $$T$0$lcssa + (get_local $$T$0) + ) + (set_local $label + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $$shr596 - (i32.shr_u - (get_local $$K583$0) - (i32.const 31) + (set_local $$shr596 + (i32.shr_u + (get_local $$K583$0) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx599 - (i32.add + (set_local $$arrayidx599 (i32.add - (get_local $$T$0) - (i32.const 16) + (i32.add + (get_local $$T$0) + (i32.const 16) + ) + (i32.shl + (get_local $$shr596) + (i32.const 2) + ) ) + ) + (set_local $$shl600 (i32.shl - (get_local $$shr596) - (i32.const 2) + (get_local $$K583$0) + (i32.const 1) ) ) - ) - (set_local $$shl600 - (i32.shl - (get_local $$K583$0) - (i32.const 1) - ) - ) - (set_local $$69 - (i32.load - (get_local $$arrayidx599) - ) - ) - (set_local $$cmp601 - (i32.eq - (get_local $$69) - (i32.const 0) - ) - ) - (if - (get_local $$cmp601) - (block - (set_local $$T$0$lcssa319 - (get_local $$T$0) - ) - (set_local $$arrayidx599$lcssa + (set_local $$69 + (i32.load (get_local $$arrayidx599) ) - (set_local $label - (i32.const 127) + ) + (set_local $$cmp601 + (i32.eq + (get_local $$69) + (i32.const 0) ) - (br $while-out$18) ) - (block - (set_local $$K583$0 - (get_local $$shl600) + (if + (get_local $$cmp601) + (block + (set_local $$T$0$lcssa319 + (get_local $$T$0) + ) + (set_local $$arrayidx599$lcssa + (get_local $$arrayidx599) + ) + (set_local $label + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $$T$0 - (get_local $$69) + (block + (set_local $$K583$0 + (get_local $$shl600) + ) + (set_local $$T$0 + (get_local $$69) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -30252,32 +30382,34 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $$sp$0$i - (i32.load - (get_local $$sp$0$in$i) + (loop $while-in$21 + (block $while-out$20 + (set_local $$sp$0$i + (i32.load + (get_local $$sp$0$in$i) + ) ) - ) - (set_local $$cmp$i - (i32.eq - (get_local $$sp$0$i) - (i32.const 0) + (set_local $$cmp$i + (i32.eq + (get_local $$sp$0$i) + (i32.const 0) + ) ) - ) - (set_local $$next4$i - (i32.add - (get_local $$sp$0$i) - (i32.const 8) + (set_local $$next4$i + (i32.add + (get_local $$sp$0$i) + (i32.const 8) + ) ) - ) - (if - (get_local $$cmp$i) - (br $while-out$20) - (set_local $$sp$0$in$i - (get_local $$next4$i) + (if + (get_local $$cmp$i) + (br $while-out$20) + (set_local $$sp$0$in$i + (get_local $$next4$i) + ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -30427,81 +30559,87 @@ (get_local $unaligned) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $unaligned) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $unaligned) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $ptr) - (get_local $value) - ) - (set_local $ptr - (i32.add + (block + (i32.store8 (get_local $ptr) - (i32.const 1) + (get_local $value) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $stop4) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $stop4) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $ptr) - (get_local $value4) - ) - (set_local $ptr - (i32.add + (block + (i32.store (get_local $ptr) - (i32.const 4) + (get_local $value4) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $stop) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $stop) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $ptr) - (get_local $value) - ) - (set_local $ptr - (i32.add + (block + (i32.store8 (get_local $ptr) - (i32.const 1) + (get_local $value) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub @@ -30662,130 +30800,136 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $dest) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if - (i32.eq - (get_local $num) - (i32.const 0) - ) - (return - (get_local $ret) + (i32.eqz + (i32.and + (get_local $dest) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $dest) - (i32.load8_s - (get_local $src) + (block + (if + (i32.eq + (get_local $num) + (i32.const 0) + ) + (return + (get_local $ret) + ) ) - ) - (set_local $dest - (i32.add + (i32.store8 (get_local $dest) - (i32.const 1) + (i32.load8_s + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 1) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 1) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 1) + (set_local $src + (i32.add + (get_local $src) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $num) - (i32.const 4) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $dest) - (i32.load - (get_local $src) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $num) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $dest - (i32.add + (block + (i32.store (get_local $dest) - (i32.const 4) + (i32.load + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 4) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 4) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 4) + (set_local $src + (i32.add + (get_local $src) + (i32.const 4) + ) + ) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $num) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $dest) - (i32.load8_s - (get_local $src) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $num) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $dest - (i32.add + (block + (i32.store8 (get_local $dest) - (i32.const 1) + (i32.load8_s + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 1) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 1) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 1) + (set_local $src + (i32.add + (get_local $src) + (i32.const 1) + ) + ) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $ret) @@ -32433,172 +32577,174 @@ (set_local $$carry_0203 (i32.const 0) ) - (loop $while-out$2 $while-in$3 - (set_local $$147 - (i32.or - (i32.shr_u - (get_local $$q_sroa_0_1199) - (i32.const 31) - ) - (i32.shl - (get_local $$q_sroa_1_1198) - (i32.const 1) - ) - ) - ) - (set_local $$149 - (i32.or - (get_local $$carry_0203) - (i32.shl - (get_local $$q_sroa_0_1199) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (set_local $$147 + (i32.or + (i32.shr_u + (get_local $$q_sroa_0_1199) + (i32.const 31) + ) + (i32.shl + (get_local $$q_sroa_1_1198) + (i32.const 1) + ) ) ) - ) - (set_local $$r_sroa_0_0_insert_insert42$0 - (i32.or - (i32.const 0) + (set_local $$149 (i32.or + (get_local $$carry_0203) (i32.shl - (get_local $$r_sroa_0_1201) + (get_local $$q_sroa_0_1199) (i32.const 1) ) + ) + ) + (set_local $$r_sroa_0_0_insert_insert42$0 + (i32.or + (i32.const 0) + (i32.or + (i32.shl + (get_local $$r_sroa_0_1201) + (i32.const 1) + ) + (i32.shr_u + (get_local $$q_sroa_1_1198) + (i32.const 31) + ) + ) + ) + ) + (set_local $$r_sroa_0_0_insert_insert42$1 + (i32.or (i32.shr_u - (get_local $$q_sroa_1_1198) + (get_local $$r_sroa_0_1201) (i32.const 31) ) + (i32.shl + (get_local $$r_sroa_1_1200) + (i32.const 1) + ) ) ) - ) - (set_local $$r_sroa_0_0_insert_insert42$1 - (i32.or - (i32.shr_u - (get_local $$r_sroa_0_1201) - (i32.const 31) - ) - (i32.shl - (get_local $$r_sroa_1_1200) - (i32.const 1) + (drop + (call $_i64Subtract + (get_local $$137$0) + (get_local $$137$1) + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) ) ) - ) - (drop - (call $_i64Subtract - (get_local $$137$0) - (get_local $$137$1) - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) - ) - ) - (set_local $$150$1 - (i32.load - (i32.const 168) - ) - ) - (set_local $$151$0 - (i32.or - (i32.shr_s - (get_local $$150$1) - (i32.const 31) + (set_local $$150$1 + (i32.load + (i32.const 168) ) - (i32.shl - (if - (i32.lt_s - (get_local $$150$1) + ) + (set_local $$151$0 + (i32.or + (i32.shr_s + (get_local $$150$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $$152 - (i32.and - (get_local $$151$0) - (i32.const 1) - ) - ) - (set_local $$154$0 - (call $_i64Subtract - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) + (set_local $$152 (i32.and (get_local $$151$0) - (get_local $$d_sroa_0_0_insert_insert99$0) + (i32.const 1) ) - (i32.and - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$150$1) + ) + (set_local $$154$0 + (call $_i64Subtract + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) + (i32.and + (get_local $$151$0) + (get_local $$d_sroa_0_0_insert_insert99$0) + ) + (i32.and + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$150$1) + (i32.shl + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) + (get_local $$d_sroa_0_0_insert_insert99$1) ) - (get_local $$d_sroa_0_0_insert_insert99$1) ) ) - ) - (set_local $$r_sroa_0_0_extract_trunc - (get_local $$154$0) - ) - (set_local $$r_sroa_1_4_extract_trunc - (i32.load - (i32.const 168) - ) - ) - (set_local $$155 - (i32.sub - (get_local $$sr_1202) - (i32.const 1) - ) - ) - (if - (i32.eq - (get_local $$155) - (i32.const 0) + (set_local $$r_sroa_0_0_extract_trunc + (get_local $$154$0) ) - (br $while-out$2) - (block - (set_local $$q_sroa_1_1198 - (get_local $$147) - ) - (set_local $$q_sroa_0_1199 - (get_local $$149) - ) - (set_local $$r_sroa_1_1200 - (get_local $$r_sroa_1_4_extract_trunc) + (set_local $$r_sroa_1_4_extract_trunc + (i32.load + (i32.const 168) ) - (set_local $$r_sroa_0_1201 - (get_local $$r_sroa_0_0_extract_trunc) + ) + (set_local $$155 + (i32.sub + (get_local $$sr_1202) + (i32.const 1) ) - (set_local $$sr_1202 + ) + (if + (i32.eq (get_local $$155) + (i32.const 0) ) - (set_local $$carry_0203 - (get_local $$152) + (br $while-out$2) + (block + (set_local $$q_sroa_1_1198 + (get_local $$147) + ) + (set_local $$q_sroa_0_1199 + (get_local $$149) + ) + (set_local $$r_sroa_1_1200 + (get_local $$r_sroa_1_4_extract_trunc) + ) + (set_local $$r_sroa_0_1201 + (get_local $$r_sroa_0_0_extract_trunc) + ) + (set_local $$sr_1202 + (get_local $$155) + ) + (set_local $$carry_0203 + (get_local $$152) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$q_sroa_1_1_lcssa (get_local $$147) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 414971404..53111ec31 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -614,73 +614,75 @@ (set_local $$i$012 (i32.const 0) ) - (loop $while-out$0 $while-in$1 - (set_local $$arrayidx - (i32.add - (i32.const 687) - (get_local $$i$012) - ) - ) - (set_local $$0 - (i32.load8_s - (get_local $$arrayidx) - ) - ) - (set_local $$conv - (i32.and - (get_local $$0) - (i32.const 255) + (loop $while-in$1 + (block $while-out$0 + (set_local $$arrayidx + (i32.add + (i32.const 687) + (get_local $$i$012) + ) ) - ) - (set_local $$cmp - (i32.eq - (get_local $$conv) - (get_local $$e) + (set_local $$0 + (i32.load8_s + (get_local $$arrayidx) + ) ) - ) - (if - (get_local $$cmp) - (block - (set_local $$i$012$lcssa - (get_local $$i$012) + (set_local $$conv + (i32.and + (get_local $$0) + (i32.const 255) ) - (set_local $label - (i32.const 2) + ) + (set_local $$cmp + (i32.eq + (get_local $$conv) + (get_local $$e) ) - (br $while-out$0) ) - ) - (set_local $$inc - (i32.add - (get_local $$i$012) - (i32.const 1) + (if + (get_local $$cmp) + (block + (set_local $$i$012$lcssa + (get_local $$i$012) + ) + (set_local $label + (i32.const 2) + ) + (br $while-out$0) + ) ) - ) - (set_local $$tobool - (i32.eq - (get_local $$inc) - (i32.const 87) + (set_local $$inc + (i32.add + (get_local $$i$012) + (i32.const 1) + ) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$i$111 + (set_local $$tobool + (i32.eq + (get_local $$inc) (i32.const 87) ) - (set_local $$s$010 - (i32.const 775) + ) + (if + (get_local $$tobool) + (block + (set_local $$i$111 + (i32.const 87) + ) + (set_local $$s$010 + (i32.const 775) + ) + (set_local $label + (i32.const 5) + ) + (br $while-out$0) ) - (set_local $label - (i32.const 5) + (set_local $$i$012 + (get_local $$inc) ) - (br $while-out$0) - ) - (set_local $$i$012 - (get_local $$inc) ) + (br $while-in$1) ) - (br $while-in$1) ) (if (i32.eq @@ -718,84 +720,88 @@ (get_local $label) (i32.const 5) ) - (loop $while-out$2 $while-in$3 - (set_local $label - (i32.const 0) - ) - (set_local $$s$1 - (get_local $$s$010) - ) - (loop $while-out$4 $while-in$5 - (set_local $$1 - (i32.load8_s - (get_local $$s$1) - ) + (loop $while-in$3 + (block $while-out$2 + (set_local $label + (i32.const 0) ) - (set_local $$tobool8 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$1) - (i32.const 24) + (set_local $$s$1 + (get_local $$s$010) + ) + (loop $while-in$5 + (block $while-out$4 + (set_local $$1 + (i32.load8_s + (get_local $$s$1) ) - (i32.const 24) ) - (i32.const 0) + (set_local $$tobool8 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (set_local $$incdec$ptr + (i32.add + (get_local $$s$1) + (i32.const 1) + ) + ) + (if + (get_local $$tobool8) + (block + (set_local $$incdec$ptr$lcssa + (get_local $$incdec$ptr) + ) + (br $while-out$4) + ) + (set_local $$s$1 + (get_local $$incdec$ptr) + ) + ) + (br $while-in$5) ) ) - (set_local $$incdec$ptr + (set_local $$dec (i32.add - (get_local $$s$1) - (i32.const 1) + (get_local $$i$111) + (i32.const -1) + ) + ) + (set_local $$tobool5 + (i32.eq + (get_local $$dec) + (i32.const 0) ) ) (if - (get_local $$tobool8) + (get_local $$tobool5) (block - (set_local $$incdec$ptr$lcssa - (get_local $$incdec$ptr) + (set_local $$s$0$lcssa + (get_local $$incdec$ptr$lcssa) ) - (br $while-out$4) - ) - (set_local $$s$1 - (get_local $$incdec$ptr) - ) - ) - (br $while-in$5) - ) - (set_local $$dec - (i32.add - (get_local $$i$111) - (i32.const -1) - ) - ) - (set_local $$tobool5 - (i32.eq - (get_local $$dec) - (i32.const 0) - ) - ) - (if - (get_local $$tobool5) - (block - (set_local $$s$0$lcssa - (get_local $$incdec$ptr$lcssa) - ) - (br $while-out$2) - ) - (block - (set_local $$i$111 - (get_local $$dec) - ) - (set_local $$s$010 - (get_local $$incdec$ptr$lcssa) + (br $while-out$2) ) - (set_local $label - (i32.const 5) + (block + (set_local $$i$111 + (get_local $$dec) + ) + (set_local $$s$010 + (get_local $$incdec$ptr$lcssa) + ) + (set_local $label + (i32.const 5) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) (return @@ -1352,139 +1358,141 @@ (set_local $$r$021 (get_local $$cond10) ) - (loop $while-out$2 $while-in$3 - (set_local $$lock13 - (i32.add - (get_local $$f$addr$022) - (i32.const 76) + (loop $while-in$3 + (block $while-out$2 + (set_local $$lock13 + (i32.add + (get_local $$f$addr$022) + (i32.const 76) + ) ) - ) - (set_local $$3 - (i32.load - (get_local $$lock13) + (set_local $$3 + (i32.load + (get_local $$lock13) + ) ) - ) - (set_local $$cmp14 - (i32.gt_s - (get_local $$3) - (i32.const -1) + (set_local $$cmp14 + (i32.gt_s + (get_local $$3) + (i32.const -1) + ) ) - ) - (if - (get_local $$cmp14) - (block - (set_local $$call16 - (call $___lockfile - (get_local $$f$addr$022) + (if + (get_local $$cmp14) + (block + (set_local $$call16 + (call $___lockfile + (get_local $$f$addr$022) + ) + ) + (set_local $$cond19 + (get_local $$call16) ) ) (set_local $$cond19 - (get_local $$call16) + (i32.const 0) ) ) - (set_local $$cond19 - (i32.const 0) - ) - ) - (set_local $$wpos - (i32.add - (get_local $$f$addr$022) - (i32.const 20) + (set_local $$wpos + (i32.add + (get_local $$f$addr$022) + (i32.const 20) + ) ) - ) - (set_local $$4 - (i32.load - (get_local $$wpos) + (set_local $$4 + (i32.load + (get_local $$wpos) + ) ) - ) - (set_local $$wbase - (i32.add - (get_local $$f$addr$022) - (i32.const 28) + (set_local $$wbase + (i32.add + (get_local $$f$addr$022) + (i32.const 28) + ) ) - ) - (set_local $$5 - (i32.load - (get_local $$wbase) + (set_local $$5 + (i32.load + (get_local $$wbase) + ) ) - ) - (set_local $$cmp20 - (i32.gt_u - (get_local $$4) - (get_local $$5) + (set_local $$cmp20 + (i32.gt_u + (get_local $$4) + (get_local $$5) + ) ) - ) - (if - (get_local $$cmp20) - (block - (set_local $$call22 - (call $___fflush_unlocked - (get_local $$f$addr$022) + (if + (get_local $$cmp20) + (block + (set_local $$call22 + (call $___fflush_unlocked + (get_local $$f$addr$022) + ) ) - ) - (set_local $$or - (i32.or - (get_local $$call22) - (get_local $$r$021) + (set_local $$or + (i32.or + (get_local $$call22) + (get_local $$r$021) + ) + ) + (set_local $$r$1 + (get_local $$or) ) ) (set_local $$r$1 - (get_local $$or) + (get_local $$r$021) ) ) - (set_local $$r$1 - (get_local $$r$021) - ) - ) - (set_local $$tobool24 - (i32.eq - (get_local $$cond19) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool24) - ) - (call $___unlockfile - (get_local $$f$addr$022) - ) - ) - (set_local $$next - (i32.add - (get_local $$f$addr$022) - (i32.const 56) + (set_local $$tobool24 + (i32.eq + (get_local $$cond19) + (i32.const 0) + ) ) - ) - (set_local $$f$addr$0 - (i32.load - (get_local $$next) + (if + (i32.eqz + (get_local $$tobool24) + ) + (call $___unlockfile + (get_local $$f$addr$022) + ) ) - ) - (set_local $$tobool11 - (i32.eq - (get_local $$f$addr$0) - (i32.const 0) + (set_local $$next + (i32.add + (get_local $$f$addr$022) + (i32.const 56) + ) ) - ) - (if - (get_local $$tobool11) - (block - (set_local $$r$0$lcssa - (get_local $$r$1) + (set_local $$f$addr$0 + (i32.load + (get_local $$next) ) - (br $while-out$2) ) - (block - (set_local $$f$addr$022 + (set_local $$tobool11 + (i32.eq (get_local $$f$addr$0) + (i32.const 0) + ) + ) + (if + (get_local $$tobool11) + (block + (set_local $$r$0$lcssa + (get_local $$r$1) + ) + (br $while-out$2) ) - (set_local $$r$021 - (get_local $$r$1) + (block + (set_local $$f$addr$022 + (get_local $$f$addr$0) + ) + (set_local $$r$021 + (get_local $$r$1) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -1847,331 +1855,333 @@ (set_local $$rem$0 (get_local $$add) ) - (loop $while-out$0 $while-in$1 - (set_local $$2 - (i32.load - (i32.const 16) + (loop $while-in$1 + (block $while-out$0 + (set_local $$2 + (i32.load + (i32.const 16) + ) ) - ) - (set_local $$tobool - (i32.eq - (get_local $$2) - (i32.const 0) + (set_local $$tobool + (i32.eq + (get_local $$2) + (i32.const 0) + ) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$4 - (i32.load - (get_local $$fd8) + (if + (get_local $$tobool) + (block + (set_local $$4 + (i32.load + (get_local $$fd8) + ) ) - ) - (i32.store - (get_local $$vararg_buffer3) - (get_local $$4) - ) - (set_local $$vararg_ptr6 - (i32.add + (i32.store (get_local $$vararg_buffer3) - (i32.const 4) + (get_local $$4) ) - ) - (i32.store - (get_local $$vararg_ptr6) - (get_local $$iov$0) - ) - (set_local $$vararg_ptr7 - (i32.add - (get_local $$vararg_buffer3) - (i32.const 8) + (set_local $$vararg_ptr6 + (i32.add + (get_local $$vararg_buffer3) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$vararg_ptr7) - (get_local $$iovcnt$0) - ) - (set_local $$call9 - (call_import $___syscall146 - (i32.const 146) - (get_local $$vararg_buffer3) + (i32.store + (get_local $$vararg_ptr6) + (get_local $$iov$0) ) - ) - (set_local $$call10 - (call $___syscall_ret - (get_local $$call9) + (set_local $$vararg_ptr7 + (i32.add + (get_local $$vararg_buffer3) + (i32.const 8) + ) ) - ) - (set_local $$cnt$0 - (get_local $$call10) - ) - ) - (block - (call_import $_pthread_cleanup_push - (i32.const 5) - (get_local $$f) - ) - (set_local $$3 - (i32.load - (get_local $$fd8) + (i32.store + (get_local $$vararg_ptr7) + (get_local $$iovcnt$0) ) - ) - (i32.store - (get_local $$vararg_buffer) - (get_local $$3) - ) - (set_local $$vararg_ptr1 - (i32.add - (get_local $$vararg_buffer) - (i32.const 4) + (set_local $$call9 + (call_import $___syscall146 + (i32.const 146) + (get_local $$vararg_buffer3) + ) ) - ) - (i32.store - (get_local $$vararg_ptr1) - (get_local $$iov$0) - ) - (set_local $$vararg_ptr2 - (i32.add - (get_local $$vararg_buffer) - (i32.const 8) + (set_local $$call10 + (call $___syscall_ret + (get_local $$call9) + ) + ) + (set_local $$cnt$0 + (get_local $$call10) ) ) - (i32.store - (get_local $$vararg_ptr2) - (get_local $$iovcnt$0) - ) - (set_local $$call - (call_import $___syscall146 - (i32.const 146) + (block + (call_import $_pthread_cleanup_push + (i32.const 5) + (get_local $$f) + ) + (set_local $$3 + (i32.load + (get_local $$fd8) + ) + ) + (i32.store (get_local $$vararg_buffer) + (get_local $$3) ) - ) - (set_local $$call7 - (call $___syscall_ret - (get_local $$call) + (set_local $$vararg_ptr1 + (i32.add + (get_local $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (get_local $$vararg_ptr1) + (get_local $$iov$0) + ) + (set_local $$vararg_ptr2 + (i32.add + (get_local $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (get_local $$vararg_ptr2) + (get_local $$iovcnt$0) + ) + (set_local $$call + (call_import $___syscall146 + (i32.const 146) + (get_local $$vararg_buffer) + ) + ) + (set_local $$call7 + (call $___syscall_ret + (get_local $$call) + ) + ) + (call_import $_pthread_cleanup_pop + (i32.const 0) + ) + (set_local $$cnt$0 + (get_local $$call7) ) ) - (call_import $_pthread_cleanup_pop - (i32.const 0) - ) - (set_local $$cnt$0 - (get_local $$call7) - ) - ) - ) - (set_local $$cmp - (i32.eq - (get_local $$rem$0) - (get_local $$cnt$0) - ) - ) - (if - (get_local $$cmp) - (block - (set_local $label - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (set_local $$cmp17 - (i32.lt_s - (get_local $$cnt$0) - (i32.const 0) ) - ) - (if - (get_local $$cmp17) - (block - (set_local $$iov$0$lcssa57 - (get_local $$iov$0) - ) - (set_local $$iovcnt$0$lcssa58 - (get_local $$iovcnt$0) - ) - (set_local $label - (i32.const 8) + (set_local $$cmp + (i32.eq + (get_local $$rem$0) + (get_local $$cnt$0) ) - (br $while-out$0) - ) - ) - (set_local $$sub26 - (i32.sub - (get_local $$rem$0) - (get_local $$cnt$0) - ) - ) - (set_local $$iov_len28 - (i32.add - (get_local $$iov$0) - (i32.const 4) - ) - ) - (set_local $$10 - (i32.load - (get_local $$iov_len28) - ) - ) - (set_local $$cmp29 - (i32.gt_u - (get_local $$cnt$0) - (get_local $$10) ) - ) - (if - (get_local $$cmp29) - (block - (set_local $$11 - (i32.load - (get_local $$buf31) + (if + (get_local $$cmp) + (block + (set_local $label + (i32.const 6) ) + (br $while-out$0) ) - (i32.store - (get_local $$wbase) - (get_local $$11) - ) - (i32.store - (get_local $$wpos) - (get_local $$11) - ) - (set_local $$sub36 - (i32.sub - (get_local $$cnt$0) - (get_local $$10) - ) + ) + (set_local $$cmp17 + (i32.lt_s + (get_local $$cnt$0) + (i32.const 0) ) - (set_local $$incdec$ptr - (i32.add + ) + (if + (get_local $$cmp17) + (block + (set_local $$iov$0$lcssa57 (get_local $$iov$0) - (i32.const 8) ) - ) - (set_local $$dec - (i32.add + (set_local $$iovcnt$0$lcssa58 (get_local $$iovcnt$0) - (i32.const -1) - ) - ) - (set_local $$iov_len50$phi$trans$insert - (i32.add - (get_local $$iov$0) - (i32.const 12) ) - ) - (set_local $$$pre - (i32.load - (get_local $$iov_len50$phi$trans$insert) + (set_local $label + (i32.const 8) ) + (br $while-out$0) ) - (set_local $$14 - (get_local $$$pre) - ) - (set_local $$cnt$1 - (get_local $$sub36) + ) + (set_local $$sub26 + (i32.sub + (get_local $$rem$0) + (get_local $$cnt$0) ) - (set_local $$iov$1 - (get_local $$incdec$ptr) + ) + (set_local $$iov_len28 + (i32.add + (get_local $$iov$0) + (i32.const 4) ) - (set_local $$iovcnt$1 - (get_local $$dec) + ) + (set_local $$10 + (i32.load + (get_local $$iov_len28) ) ) - (block - (set_local $$cmp38 - (i32.eq - (get_local $$iovcnt$0) - (i32.const 2) - ) + (set_local $$cmp29 + (i32.gt_u + (get_local $$cnt$0) + (get_local $$10) ) - (if - (get_local $$cmp38) - (block - (set_local $$12 - (i32.load - (get_local $$wbase) - ) - ) - (set_local $$add$ptr41 - (i32.add - (get_local $$12) - (get_local $$cnt$0) - ) - ) - (i32.store - (get_local $$wbase) - (get_local $$add$ptr41) - ) - (set_local $$14 - (get_local $$10) + ) + (if + (get_local $$cmp29) + (block + (set_local $$11 + (i32.load + (get_local $$buf31) ) - (set_local $$cnt$1 + ) + (i32.store + (get_local $$wbase) + (get_local $$11) + ) + (i32.store + (get_local $$wpos) + (get_local $$11) + ) + (set_local $$sub36 + (i32.sub (get_local $$cnt$0) + (get_local $$10) ) - (set_local $$iov$1 + ) + (set_local $$incdec$ptr + (i32.add (get_local $$iov$0) - ) - (set_local $$iovcnt$1 - (i32.const 2) + (i32.const 8) ) ) - (block - (set_local $$14 - (get_local $$10) - ) - (set_local $$cnt$1 - (get_local $$cnt$0) + (set_local $$dec + (i32.add + (get_local $$iovcnt$0) + (i32.const -1) ) - (set_local $$iov$1 + ) + (set_local $$iov_len50$phi$trans$insert + (i32.add (get_local $$iov$0) + (i32.const 12) + ) + ) + (set_local $$$pre + (i32.load + (get_local $$iov_len50$phi$trans$insert) ) - (set_local $$iovcnt$1 + ) + (set_local $$14 + (get_local $$$pre) + ) + (set_local $$cnt$1 + (get_local $$sub36) + ) + (set_local $$iov$1 + (get_local $$incdec$ptr) + ) + (set_local $$iovcnt$1 + (get_local $$dec) + ) + ) + (block + (set_local $$cmp38 + (i32.eq (get_local $$iovcnt$0) + (i32.const 2) + ) + ) + (if + (get_local $$cmp38) + (block + (set_local $$12 + (i32.load + (get_local $$wbase) + ) + ) + (set_local $$add$ptr41 + (i32.add + (get_local $$12) + (get_local $$cnt$0) + ) + ) + (i32.store + (get_local $$wbase) + (get_local $$add$ptr41) + ) + (set_local $$14 + (get_local $$10) + ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) + (set_local $$iov$1 + (get_local $$iov$0) + ) + (set_local $$iovcnt$1 + (i32.const 2) + ) + ) + (block + (set_local $$14 + (get_local $$10) + ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) + (set_local $$iov$1 + (get_local $$iov$0) + ) + (set_local $$iovcnt$1 + (get_local $$iovcnt$0) + ) ) ) ) ) - ) - (set_local $$13 - (i32.load + (set_local $$13 + (i32.load + (get_local $$iov$1) + ) + ) + (set_local $$add$ptr46 + (i32.add + (get_local $$13) + (get_local $$cnt$1) + ) + ) + (i32.store (get_local $$iov$1) + (get_local $$add$ptr46) ) - ) - (set_local $$add$ptr46 - (i32.add - (get_local $$13) - (get_local $$cnt$1) + (set_local $$iov_len50 + (i32.add + (get_local $$iov$1) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$iov$1) - (get_local $$add$ptr46) - ) - (set_local $$iov_len50 - (i32.add + (set_local $$sub51 + (i32.sub + (get_local $$14) + (get_local $$cnt$1) + ) + ) + (i32.store + (get_local $$iov_len50) + (get_local $$sub51) + ) + (set_local $$iov$0 (get_local $$iov$1) - (i32.const 4) ) - ) - (set_local $$sub51 - (i32.sub - (get_local $$14) - (get_local $$cnt$1) + (set_local $$iovcnt$0 + (get_local $$iovcnt$1) ) + (set_local $$rem$0 + (get_local $$sub26) + ) + (br $while-in$1) ) - (i32.store - (get_local $$iov_len50) - (get_local $$sub51) - ) - (set_local $$iov$0 - (get_local $$iov$1) - ) - (set_local $$iovcnt$0 - (get_local $$iovcnt$1) - ) - (set_local $$rem$0 - (get_local $$sub26) - ) - (br $while-in$1) ) (if (i32.eq @@ -2413,21 +2423,23 @@ (i32.const 40) ) ) - (loop $do-out$0 $do-in$1 - (i32.store - (get_local $dest) - (i32.const 0) - ) - (set_local $dest - (i32.add + (loop $do-in$1 + (block $do-out$0 + (i32.store (get_local $dest) - (i32.const 4) + (i32.const 0) ) - ) - (br_if $do-in$1 - (i32.lt_s - (get_local $dest) - (get_local $stop) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 4) + ) + ) + (br_if $do-in$1 + (i32.lt_s + (get_local $dest) + (get_local $stop) + ) ) ) ) @@ -2993,73 +3005,75 @@ (set_local $$i$0 (get_local $$l) ) - (loop $while-out$2 $while-in$3 - (set_local $$tobool9 - (i32.eq - (get_local $$i$0) - (i32.const 0) - ) - ) - (if - (get_local $$tobool9) - (block - (set_local $$9 - (get_local $$4) - ) - (set_local $$i$1 + (loop $while-in$3 + (block $while-out$2 + (set_local $$tobool9 + (i32.eq + (get_local $$i$0) (i32.const 0) ) - (set_local $$l$addr$0 - (get_local $$l) - ) - (set_local $$s$addr$0 - (get_local $$s) + ) + (if + (get_local $$tobool9) + (block + (set_local $$9 + (get_local $$4) + ) + (set_local $$i$1 + (i32.const 0) + ) + (set_local $$l$addr$0 + (get_local $$l) + ) + (set_local $$s$addr$0 + (get_local $$s) + ) + (br $label$break$L10) ) - (br $label$break$L10) ) - ) - (set_local $$sub - (i32.add - (get_local $$i$0) - (i32.const -1) + (set_local $$sub + (i32.add + (get_local $$i$0) + (i32.const -1) + ) ) - ) - (set_local $$arrayidx - (i32.add - (get_local $$s) - (get_local $$sub) + (set_local $$arrayidx + (i32.add + (get_local $$s) + (get_local $$sub) + ) ) - ) - (set_local $$7 - (i32.load8_s - (get_local $$arrayidx) + (set_local $$7 + (i32.load8_s + (get_local $$arrayidx) + ) ) - ) - (set_local $$cmp11 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$7) + (set_local $$cmp11 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 10) ) - (i32.const 10) ) - ) - (if - (get_local $$cmp11) - (block - (set_local $$i$0$lcssa36 - (get_local $$i$0) + (if + (get_local $$cmp11) + (block + (set_local $$i$0$lcssa36 + (get_local $$i$0) + ) + (br $while-out$2) + ) + (set_local $$i$0 + (get_local $$sub) ) - (br $while-out$2) - ) - (set_local $$i$0 - (get_local $$sub) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$write15 (i32.add @@ -3969,111 +3983,113 @@ (set_local $$s$044 (get_local $$src) ) - (loop $while-out$1 $while-in$2 - (set_local $$2 - (i32.load8_s - (get_local $$s$044) + (loop $while-in$2 + (block $while-out$1 + (set_local $$2 + (i32.load8_s + (get_local $$s$044) + ) ) - ) - (set_local $$cmp - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$2) + (set_local $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$2) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $$1) + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) ) - ) - (if - (get_local $$cmp) - (block - (set_local $$n$addr$0$lcssa61 - (get_local $$n$addr$043) + (if + (get_local $$cmp) + (block + (set_local $$n$addr$0$lcssa61 + (get_local $$n$addr$043) + ) + (set_local $$s$0$lcssa60 + (get_local $$s$044) + ) + (set_local $label + (i32.const 6) + ) + (br $label$break$L1) ) - (set_local $$s$0$lcssa60 + ) + (set_local $$incdec$ptr + (i32.add (get_local $$s$044) + (i32.const 1) ) - (set_local $label - (i32.const 6) - ) - (br $label$break$L1) ) - ) - (set_local $$incdec$ptr - (i32.add - (get_local $$s$044) - (i32.const 1) + (set_local $$dec + (i32.add + (get_local $$n$addr$043) + (i32.const -1) + ) ) - ) - (set_local $$dec - (i32.add - (get_local $$n$addr$043) - (i32.const -1) + (set_local $$3 + (get_local $$incdec$ptr) ) - ) - (set_local $$3 - (get_local $$incdec$ptr) - ) - (set_local $$and - (i32.and - (get_local $$3) - (i32.const 3) + (set_local $$and + (i32.and + (get_local $$3) + (i32.const 3) + ) ) - ) - (set_local $$tobool - (i32.ne - (get_local $$and) - (i32.const 0) + (set_local $$tobool + (i32.ne + (get_local $$and) + (i32.const 0) + ) ) - ) - (set_local $$tobool2 - (i32.ne - (get_local $$dec) - (i32.const 0) - ) - ) - (set_local $$or$cond - (i32.and - (get_local $$tobool2) - (get_local $$tobool) - ) - ) - (if - (get_local $$or$cond) - (block - (set_local $$n$addr$043 + (set_local $$tobool2 + (i32.ne (get_local $$dec) - ) - (set_local $$s$044 - (get_local $$incdec$ptr) + (i32.const 0) ) ) - (block - (set_local $$n$addr$0$lcssa - (get_local $$dec) - ) - (set_local $$s$0$lcssa - (get_local $$incdec$ptr) - ) - (set_local $$tobool2$lcssa + (set_local $$or$cond + (i32.and (get_local $$tobool2) + (get_local $$tobool) ) - (set_local $label - (i32.const 5) + ) + (if + (get_local $$or$cond) + (block + (set_local $$n$addr$043 + (get_local $$dec) + ) + (set_local $$s$044 + (get_local $$incdec$ptr) + ) + ) + (block + (set_local $$n$addr$0$lcssa + (get_local $$dec) + ) + (set_local $$s$0$lcssa + (get_local $$incdec$ptr) + ) + (set_local $$tobool2$lcssa + (get_local $$tobool2) + ) + (set_local $label + (i32.const 5) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -4189,104 +4205,106 @@ (set_local $$w$034 (get_local $$s$0$lcssa60) ) - (loop $while-out$5 $while-in$6 - (set_local $$6 - (i32.load - (get_local $$w$034) - ) - ) - (set_local $$xor - (i32.xor - (get_local $$6) - (get_local $$mul) + (loop $while-in$6 + (block $while-out$5 + (set_local $$6 + (i32.load + (get_local $$w$034) + ) ) - ) - (set_local $$sub - (i32.add - (get_local $$xor) - (i32.const -16843009) + (set_local $$xor + (i32.xor + (get_local $$6) + (get_local $$mul) + ) ) - ) - (set_local $$neg - (i32.and - (get_local $$xor) - (i32.const -2139062144) + (set_local $$sub + (i32.add + (get_local $$xor) + (i32.const -16843009) + ) ) - ) - (set_local $$and15 - (i32.xor - (get_local $$neg) - (i32.const -2139062144) + (set_local $$neg + (i32.and + (get_local $$xor) + (i32.const -2139062144) + ) ) - ) - (set_local $$and16 - (i32.and - (get_local $$and15) - (get_local $$sub) + (set_local $$and15 + (i32.xor + (get_local $$neg) + (i32.const -2139062144) + ) ) - ) - (set_local $$lnot - (i32.eq - (get_local $$and16) - (i32.const 0) + (set_local $$and16 + (i32.and + (get_local $$and15) + (get_local $$sub) + ) ) - ) - (if - (i32.eqz - (get_local $$lnot) + (set_local $$lnot + (i32.eq + (get_local $$and16) + (i32.const 0) + ) ) - (block - (set_local $$n$addr$133$lcssa - (get_local $$n$addr$133) + (if + (i32.eqz + (get_local $$lnot) ) - (set_local $$w$034$lcssa - (get_local $$w$034) + (block + (set_local $$n$addr$133$lcssa + (get_local $$n$addr$133) + ) + (set_local $$w$034$lcssa + (get_local $$w$034) + ) + (br $while-out$5) ) - (br $while-out$5) - ) - ) - (set_local $$incdec$ptr21 - (i32.add - (get_local $$w$034) - (i32.const 4) - ) - ) - (set_local $$sub22 - (i32.add - (get_local $$n$addr$133) - (i32.const -4) - ) - ) - (set_local $$cmp11 - (i32.gt_u - (get_local $$sub22) - (i32.const 3) ) - ) - (if - (get_local $$cmp11) - (block - (set_local $$n$addr$133 - (get_local $$sub22) + (set_local $$incdec$ptr21 + (i32.add + (get_local $$w$034) + (i32.const 4) ) - (set_local $$w$034 - (get_local $$incdec$ptr21) + ) + (set_local $$sub22 + (i32.add + (get_local $$n$addr$133) + (i32.const -4) ) ) - (block - (set_local $$n$addr$1$lcssa + (set_local $$cmp11 + (i32.gt_u (get_local $$sub22) + (i32.const 3) ) - (set_local $$w$0$lcssa - (get_local $$incdec$ptr21) + ) + (if + (get_local $$cmp11) + (block + (set_local $$n$addr$133 + (get_local $$sub22) + ) + (set_local $$w$034 + (get_local $$incdec$ptr21) + ) ) - (set_local $label - (i32.const 11) + (block + (set_local $$n$addr$1$lcssa + (get_local $$sub22) + ) + (set_local $$w$0$lcssa + (get_local $$incdec$ptr21) + ) + (set_local $label + (i32.const 11) + ) + (br $label$break$L11) ) - (br $label$break$L11) ) + (br $while-in$6) ) - (br $while-in$6) ) (set_local $$n$addr$227 (get_local $$n$addr$133$lcssa) @@ -4342,81 +4360,83 @@ ) ) ) - (loop $while-out$7 $while-in$8 - (set_local $$7 - (i32.load8_s - (get_local $$s$128) + (loop $while-in$8 + (block $while-out$7 + (set_local $$7 + (i32.load8_s + (get_local $$s$128) + ) ) - ) - (set_local $$cmp28 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$7) + (set_local $$cmp28 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (get_local $$5) + (i32.shr_s + (i32.shl + (get_local $$5) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) ) - ) - (if - (get_local $$cmp28) - (block - (set_local $$n$addr$3 - (get_local $$n$addr$227) + (if + (get_local $$cmp28) + (block + (set_local $$n$addr$3 + (get_local $$n$addr$227) + ) + (set_local $$s$2 + (get_local $$s$128) + ) + (br $label$break$L8) ) - (set_local $$s$2 + ) + (set_local $$incdec$ptr33 + (i32.add (get_local $$s$128) + (i32.const 1) ) - (br $label$break$L8) - ) - ) - (set_local $$incdec$ptr33 - (i32.add - (get_local $$s$128) - (i32.const 1) - ) - ) - (set_local $$dec34 - (i32.add - (get_local $$n$addr$227) - (i32.const -1) ) - ) - (set_local $$tobool25 - (i32.eq - (get_local $$dec34) - (i32.const 0) + (set_local $$dec34 + (i32.add + (get_local $$n$addr$227) + (i32.const -1) + ) ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$n$addr$3 + (set_local $$tobool25 + (i32.eq + (get_local $$dec34) (i32.const 0) ) - (set_local $$s$2 - (get_local $$incdec$ptr33) - ) - (br $while-out$7) ) - (block - (set_local $$n$addr$227 - (get_local $$dec34) + (if + (get_local $$tobool25) + (block + (set_local $$n$addr$3 + (i32.const 0) + ) + (set_local $$s$2 + (get_local $$incdec$ptr33) + ) + (br $while-out$7) ) - (set_local $$s$128 - (get_local $$incdec$ptr33) + (block + (set_local $$n$addr$227 + (get_local $$dec34) + ) + (set_local $$s$128 + (get_local $$incdec$ptr33) + ) ) ) + (br $while-in$8) ) - (br $while-in$8) ) ) ) @@ -5972,1194 +5992,1187 @@ (set_local $$l10n$0 (i32.const 0) ) - (loop $label$break$L1 $label$continue$L1 - (set_local $$cmp - (i32.gt_s - (get_local $$cnt$0) - (i32.const -1) + (loop $label$continue$L1 + (block $label$break$L1 + (set_local $$cmp + (i32.gt_s + (get_local $$cnt$0) + (i32.const -1) + ) ) - ) - (block $do-once$0 - (if - (get_local $$cmp) - (block - (set_local $$sub - (i32.sub - (i32.const 2147483647) - (get_local $$cnt$0) - ) - ) - (set_local $$cmp1 - (i32.gt_s - (get_local $$l$0) - (get_local $$sub) - ) - ) - (if - (get_local $$cmp1) - (block - (set_local $$call - (call $___errno_location) - ) - (i32.store - (get_local $$call) - (i32.const 75) + (block $do-once$0 + (if + (get_local $$cmp) + (block + (set_local $$sub + (i32.sub + (i32.const 2147483647) + (get_local $$cnt$0) ) - (set_local $$cnt$1 - (i32.const -1) + ) + (set_local $$cmp1 + (i32.gt_s + (get_local $$l$0) + (get_local $$sub) ) - (br $do-once$0) ) - (block - (set_local $$add - (i32.add - (get_local $$l$0) - (get_local $$cnt$0) + (if + (get_local $$cmp1) + (block + (set_local $$call + (call $___errno_location) + ) + (i32.store + (get_local $$call) + (i32.const 75) + ) + (set_local $$cnt$1 + (i32.const -1) ) + (br $do-once$0) ) - (set_local $$cnt$1 - (get_local $$add) + (block + (set_local $$add + (i32.add + (get_local $$l$0) + (get_local $$cnt$0) + ) + ) + (set_local $$cnt$1 + (get_local $$add) + ) + (br $do-once$0) ) - (br $do-once$0) ) ) + (set_local $$cnt$1 + (get_local $$cnt$0) + ) ) - (set_local $$cnt$1 - (get_local $$cnt$0) + ) + (set_local $$0 + (i32.load8_s + (get_local $$incdec$ptr169275) ) ) - ) - (set_local $$0 - (i32.load8_s - (get_local $$incdec$ptr169275) - ) - ) - (set_local $$tobool - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$0) + (set_local $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$0) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 0) ) - (i32.const 0) ) - ) - (if - (get_local $$tobool) - (block - (set_local $$cnt$1$lcssa - (get_local $$cnt$1) - ) - (set_local $$l10n$0$lcssa - (get_local $$l10n$0) + (if + (get_local $$tobool) + (block + (set_local $$cnt$1$lcssa + (get_local $$cnt$1) + ) + (set_local $$l10n$0$lcssa + (get_local $$l10n$0) + ) + (set_local $label + (i32.const 242) + ) + (br $label$break$L1) ) - (set_local $label - (i32.const 242) + (block + (set_local $$1 + (get_local $$0) + ) + (set_local $$incdec$ptr169274 + (get_local $$incdec$ptr169275) + ) ) - (br $label$break$L1) ) - (block - (set_local $$1 - (get_local $$0) - ) - (set_local $$incdec$ptr169274 - (get_local $$incdec$ptr169275) + (loop $label$continue$L9 + (block $label$break$L9 + (block $switch$2 + (block $switch-default$5 + (block $switch-default$5 + (block $switch-case$4 + (block $switch-case$3 + (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 + (i32.sub + (i32.shr_s + (i32.shl + (get_local $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (set_local $$incdec$ptr169276301 + (get_local $$incdec$ptr169274) + ) + (set_local $$z$0302 + (get_local $$incdec$ptr169274) + ) + (set_local $label + (i32.const 9) + ) + (br $label$break$L9) + (br $switch$2) + ) + ) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$incdec$ptr169274) + ) + (set_local $$z$0$lcssa + (get_local $$incdec$ptr169274) + ) + (br $label$break$L9) + (br $switch$2) + ) + ) + (nop) + ) + ) + (set_local $$incdec$ptr + (i32.add + (get_local $$incdec$ptr169274) + (i32.const 1) + ) + ) + (set_local $$$pre + (i32.load8_s + (get_local $$incdec$ptr) + ) + ) + (set_local $$1 + (get_local $$$pre) + ) + (set_local $$incdec$ptr169274 + (get_local $$incdec$ptr) + ) + (br $label$continue$L9) ) ) - ) - (loop $label$break$L9 $label$continue$L9 - (block $switch$2 - (block $switch-default$5 - (block $switch-default$5 - (block $switch-case$4 - (block $switch-case$3 - (br_table $switch-case$4 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-default$5 $switch-case$3 $switch-default$5 - (i32.sub - (i32.shr_s - (i32.shl - (get_local $$1) - (i32.const 24) - ) + (block $label$break$L12 + (if + (i32.eq + (get_local $label) + (i32.const 9) + ) + (loop $while-in$8 + (block $while-out$7 + (set_local $label + (i32.const 0) + ) + (set_local $$arrayidx16 + (i32.add + (get_local $$incdec$ptr169276301) + (i32.const 1) + ) + ) + (set_local $$2 + (i32.load8_s + (get_local $$arrayidx16) + ) + ) + (set_local $$cmp18 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$2) (i32.const 24) ) - (i32.const 0) + (i32.const 24) ) + (i32.const 37) ) ) - (block - (set_local $$incdec$ptr169276301 - (get_local $$incdec$ptr169274) + (if + (i32.eqz + (get_local $$cmp18) ) - (set_local $$z$0302 - (get_local $$incdec$ptr169274) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$incdec$ptr169276301) + ) + (set_local $$z$0$lcssa + (get_local $$z$0302) + ) + (br $label$break$L12) ) - (set_local $label - (i32.const 9) + ) + (set_local $$incdec$ptr23 + (i32.add + (get_local $$z$0302) + (i32.const 1) ) - (br $label$break$L9) - (br $switch$2) ) - ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$incdec$ptr169274) + (set_local $$add$ptr + (i32.add + (get_local $$incdec$ptr169276301) + (i32.const 2) + ) + ) + (set_local $$3 + (i32.load8_s + (get_local $$add$ptr) + ) + ) + (set_local $$cmp13 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 37) + ) ) - (set_local $$z$0$lcssa - (get_local $$incdec$ptr169274) + (if + (get_local $$cmp13) + (block + (set_local $$incdec$ptr169276301 + (get_local $$add$ptr) + ) + (set_local $$z$0302 + (get_local $$incdec$ptr23) + ) + (set_local $label + (i32.const 9) + ) + ) + (block + (set_local $$incdec$ptr169276$lcssa + (get_local $$add$ptr) + ) + (set_local $$z$0$lcssa + (get_local $$incdec$ptr23) + ) + (br $while-out$7) + ) ) - (br $label$break$L9) - (br $switch$2) + (br $while-in$8) + ) + ) + ) + ) + (set_local $$sub$ptr$lhs$cast + (get_local $$z$0$lcssa) + ) + (set_local $$sub$ptr$rhs$cast + (get_local $$incdec$ptr169275) + ) + (set_local $$sub$ptr$sub + (i32.sub + (get_local $$sub$ptr$lhs$cast) + (get_local $$sub$ptr$rhs$cast) + ) + ) + (if + (get_local $$tobool25) + (block + (set_local $$4 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i + (i32.and + (get_local $$4) + (i32.const 32) + ) + ) + (set_local $$tobool$i + (i32.eq + (get_local $$and$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i) + (call $___fwritex + (get_local $$incdec$ptr169275) + (get_local $$sub$ptr$sub) + (get_local $$f) ) ) - (nop) ) ) - (set_local $$incdec$ptr + (set_local $$tobool28 + (i32.eq + (get_local $$z$0$lcssa) + (get_local $$incdec$ptr169275) + ) + ) + (if + (i32.eqz + (get_local $$tobool28) + ) + (block + (set_local $$l10n$0$phi + (get_local $$l10n$0) + ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169276$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$0$phi) + ) + (br $label$continue$L1) + ) + ) + (set_local $$arrayidx31 (i32.add - (get_local $$incdec$ptr169274) + (get_local $$incdec$ptr169276$lcssa) (i32.const 1) ) ) - (set_local $$$pre + (set_local $$5 (i32.load8_s - (get_local $$incdec$ptr) + (get_local $$arrayidx31) ) ) - (set_local $$1 - (get_local $$$pre) + (set_local $$conv32 + (i32.shr_s + (i32.shl + (get_local $$5) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$incdec$ptr169274 - (get_local $$incdec$ptr) + (set_local $$isdigittmp + (i32.add + (get_local $$conv32) + (i32.const -48) + ) ) - (br $label$continue$L9) - ) - (block $label$break$L12 - (if - (i32.eq - (get_local $label) - (i32.const 9) + (set_local $$isdigit + (i32.lt_u + (get_local $$isdigittmp) + (i32.const 10) ) - (loop $while-out$7 $while-in$8 - (set_local $label - (i32.const 0) - ) - (set_local $$arrayidx16 + ) + (if + (get_local $$isdigit) + (block + (set_local $$arrayidx35 (i32.add - (get_local $$incdec$ptr169276301) - (i32.const 1) + (get_local $$incdec$ptr169276$lcssa) + (i32.const 2) ) ) - (set_local $$2 + (set_local $$6 (i32.load8_s - (get_local $$arrayidx16) + (get_local $$arrayidx35) ) ) - (set_local $$cmp18 + (set_local $$cmp37 (i32.eq (i32.shr_s (i32.shl - (get_local $$2) + (get_local $$6) (i32.const 24) ) (i32.const 24) ) - (i32.const 37) + (i32.const 36) ) ) - (if - (i32.eqz - (get_local $$cmp18) + (set_local $$add$ptr43 + (i32.add + (get_local $$incdec$ptr169276$lcssa) + (i32.const 3) ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$incdec$ptr169276301) - ) - (set_local $$z$0$lcssa - (get_local $$z$0302) - ) - (br $label$break$L12) + ) + (set_local $$add$ptr43$arrayidx31 + (if + (get_local $$cmp37) + (get_local $$add$ptr43) + (get_local $$arrayidx31) ) ) - (set_local $$incdec$ptr23 - (i32.add - (get_local $$z$0302) + (set_local $$$l10n$0 + (if + (get_local $$cmp37) (i32.const 1) + (get_local $$l10n$0) ) ) - (set_local $$add$ptr - (i32.add - (get_local $$incdec$ptr169276301) - (i32.const 2) + (set_local $$isdigittmp$ + (if + (get_local $$cmp37) + (get_local $$isdigittmp) + (i32.const -1) ) ) - (set_local $$3 + (set_local $$$pre357 (i32.load8_s - (get_local $$add$ptr) + (get_local $$add$ptr43$arrayidx31) ) ) - (set_local $$cmp13 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$3) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 37) - ) - ) - (if - (get_local $$cmp13) - (block - (set_local $$incdec$ptr169276301 - (get_local $$add$ptr) - ) - (set_local $$z$0302 - (get_local $$incdec$ptr23) - ) - (set_local $label - (i32.const 9) - ) - ) - (block - (set_local $$incdec$ptr169276$lcssa - (get_local $$add$ptr) - ) - (set_local $$z$0$lcssa - (get_local $$incdec$ptr23) - ) - (br $while-out$7) - ) - ) - (br $while-in$8) - ) - ) - ) - (set_local $$sub$ptr$lhs$cast - (get_local $$z$0$lcssa) - ) - (set_local $$sub$ptr$rhs$cast - (get_local $$incdec$ptr169275) - ) - (set_local $$sub$ptr$sub - (i32.sub - (get_local $$sub$ptr$lhs$cast) - (get_local $$sub$ptr$rhs$cast) - ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$4 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i - (i32.and - (get_local $$4) - (i32.const 32) - ) - ) - (set_local $$tobool$i - (i32.eq - (get_local $$and$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i) - (call $___fwritex - (get_local $$incdec$ptr169275) - (get_local $$sub$ptr$sub) - (get_local $$f) + (set_local $$7 + (get_local $$$pre357) ) - ) - ) - ) - (set_local $$tobool28 - (i32.eq - (get_local $$z$0$lcssa) - (get_local $$incdec$ptr169275) - ) - ) - (if - (i32.eqz - (get_local $$tobool28) - ) - (block - (set_local $$l10n$0$phi - (get_local $$l10n$0) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169276$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$0$phi) - ) - (br $label$continue$L1) - ) - ) - (set_local $$arrayidx31 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 1) - ) - ) - (set_local $$5 - (i32.load8_s - (get_local $$arrayidx31) - ) - ) - (set_local $$conv32 - (i32.shr_s - (i32.shl - (get_local $$5) - (i32.const 24) - ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp - (i32.add - (get_local $$conv32) - (i32.const -48) - ) - ) - (set_local $$isdigit - (i32.lt_u - (get_local $$isdigittmp) - (i32.const 10) - ) - ) - (if - (get_local $$isdigit) - (block - (set_local $$arrayidx35 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 2) + (set_local $$argpos$0 + (get_local $$isdigittmp$) ) - ) - (set_local $$6 - (i32.load8_s - (get_local $$arrayidx35) + (set_local $$l10n$1 + (get_local $$$l10n$0) ) - ) - (set_local $$cmp37 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$6) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 36) + (set_local $$storemerge + (get_local $$add$ptr43$arrayidx31) ) ) - (set_local $$add$ptr43 - (i32.add - (get_local $$incdec$ptr169276$lcssa) - (i32.const 3) + (block + (set_local $$7 + (get_local $$5) ) - ) - (set_local $$add$ptr43$arrayidx31 - (if - (get_local $$cmp37) - (get_local $$add$ptr43) - (get_local $$arrayidx31) + (set_local $$argpos$0 + (i32.const -1) ) - ) - (set_local $$$l10n$0 - (if - (get_local $$cmp37) - (i32.const 1) + (set_local $$l10n$1 (get_local $$l10n$0) ) - ) - (set_local $$isdigittmp$ - (if - (get_local $$cmp37) - (get_local $$isdigittmp) - (i32.const -1) + (set_local $$storemerge + (get_local $$arrayidx31) ) ) - (set_local $$$pre357 - (i32.load8_s - (get_local $$add$ptr43$arrayidx31) + ) + (set_local $$conv48$307 + (i32.shr_s + (i32.shl + (get_local $$7) + (i32.const 24) ) - ) - (set_local $$7 - (get_local $$$pre357) - ) - (set_local $$argpos$0 - (get_local $$isdigittmp$) - ) - (set_local $$l10n$1 - (get_local $$$l10n$0) - ) - (set_local $$storemerge - (get_local $$add$ptr43$arrayidx31) + (i32.const 24) ) ) - (block - (set_local $$7 - (get_local $$5) - ) - (set_local $$argpos$0 - (i32.const -1) - ) - (set_local $$l10n$1 - (get_local $$l10n$0) - ) - (set_local $$storemerge - (get_local $$arrayidx31) + (set_local $$8 + (i32.and + (get_local $$conv48$307) + (i32.const -32) ) ) - ) - (set_local $$conv48$307 - (i32.shr_s - (i32.shl - (get_local $$7) - (i32.const 24) + (set_local $$cmp50$308 + (i32.eq + (get_local $$8) + (i32.const 32) ) - (i32.const 24) - ) - ) - (set_local $$8 - (i32.and - (get_local $$conv48$307) - (i32.const -32) - ) - ) - (set_local $$cmp50$308 - (i32.eq - (get_local $$8) - (i32.const 32) ) - ) - (block $label$break$L25 - (if - (get_local $$cmp50$308) - (block - (set_local $$9 - (get_local $$7) - ) - (set_local $$conv48311 - (get_local $$conv48$307) - ) - (set_local $$fl$0310 - (i32.const 0) - ) - (set_local $$storemerge$186309 - (get_local $$storemerge) - ) - (loop $while-out$10 $while-in$11 - (set_local $$sub54 - (i32.add - (get_local $$conv48311) - (i32.const -32) - ) + (block $label$break$L25 + (if + (get_local $$cmp50$308) + (block + (set_local $$9 + (get_local $$7) ) - (set_local $$shl - (i32.shl - (i32.const 1) - (get_local $$sub54) - ) + (set_local $$conv48311 + (get_local $$conv48$307) ) - (set_local $$and - (i32.and - (get_local $$shl) - (i32.const 75913) - ) + (set_local $$fl$0310 + (i32.const 0) ) - (set_local $$tobool55 - (i32.eq - (get_local $$and) - (i32.const 0) - ) + (set_local $$storemerge$186309 + (get_local $$storemerge) ) - (if - (get_local $$tobool55) - (block - (set_local $$12 - (get_local $$9) + (loop $while-in$11 + (block $while-out$10 + (set_local $$sub54 + (i32.add + (get_local $$conv48311) + (i32.const -32) + ) ) - (set_local $$fl$0284 - (get_local $$fl$0310) + (set_local $$shl + (i32.shl + (i32.const 1) + (get_local $$sub54) + ) ) - (set_local $$storemerge$186282 - (get_local $$storemerge$186309) + (set_local $$and + (i32.and + (get_local $$shl) + (i32.const 75913) + ) ) - (br $label$break$L25) - ) - ) - (set_local $$conv58 - (i32.shr_s - (i32.shl - (get_local $$9) - (i32.const 24) + (set_local $$tobool55 + (i32.eq + (get_local $$and) + (i32.const 0) + ) ) - (i32.const 24) - ) - ) - (set_local $$sub59 - (i32.add - (get_local $$conv58) - (i32.const -32) - ) - ) - (set_local $$shl60 - (i32.shl - (i32.const 1) - (get_local $$sub59) - ) - ) - (set_local $$or - (i32.or - (get_local $$shl60) - (get_local $$fl$0310) - ) - ) - (set_local $$incdec$ptr62 - (i32.add - (get_local $$storemerge$186309) - (i32.const 1) - ) - ) - (set_local $$10 - (i32.load8_s - (get_local $$incdec$ptr62) - ) - ) - (set_local $$conv48 - (i32.shr_s - (i32.shl - (get_local $$10) - (i32.const 24) + (if + (get_local $$tobool55) + (block + (set_local $$12 + (get_local $$9) + ) + (set_local $$fl$0284 + (get_local $$fl$0310) + ) + (set_local $$storemerge$186282 + (get_local $$storemerge$186309) + ) + (br $label$break$L25) + ) ) - (i32.const 24) - ) - ) - (set_local $$11 - (i32.and - (get_local $$conv48) - (i32.const -32) - ) - ) - (set_local $$cmp50 - (i32.eq - (get_local $$11) - (i32.const 32) - ) - ) - (if - (get_local $$cmp50) - (block - (set_local $$9 - (get_local $$10) + (set_local $$conv58 + (i32.shr_s + (i32.shl + (get_local $$9) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$conv48311 - (get_local $$conv48) + (set_local $$sub59 + (i32.add + (get_local $$conv58) + (i32.const -32) + ) ) - (set_local $$fl$0310 - (get_local $$or) + (set_local $$shl60 + (i32.shl + (i32.const 1) + (get_local $$sub59) + ) ) - (set_local $$storemerge$186309 - (get_local $$incdec$ptr62) + (set_local $$or + (i32.or + (get_local $$shl60) + (get_local $$fl$0310) + ) ) - ) - (block - (set_local $$12 - (get_local $$10) + (set_local $$incdec$ptr62 + (i32.add + (get_local $$storemerge$186309) + (i32.const 1) + ) + ) + (set_local $$10 + (i32.load8_s + (get_local $$incdec$ptr62) + ) + ) + (set_local $$conv48 + (i32.shr_s + (i32.shl + (get_local $$10) + (i32.const 24) + ) + (i32.const 24) + ) ) - (set_local $$fl$0284 - (get_local $$or) + (set_local $$11 + (i32.and + (get_local $$conv48) + (i32.const -32) + ) + ) + (set_local $$cmp50 + (i32.eq + (get_local $$11) + (i32.const 32) + ) ) - (set_local $$storemerge$186282 - (get_local $$incdec$ptr62) + (if + (get_local $$cmp50) + (block + (set_local $$9 + (get_local $$10) + ) + (set_local $$conv48311 + (get_local $$conv48) + ) + (set_local $$fl$0310 + (get_local $$or) + ) + (set_local $$storemerge$186309 + (get_local $$incdec$ptr62) + ) + ) + (block + (set_local $$12 + (get_local $$10) + ) + (set_local $$fl$0284 + (get_local $$or) + ) + (set_local $$storemerge$186282 + (get_local $$incdec$ptr62) + ) + (br $while-out$10) + ) ) - (br $while-out$10) + (br $while-in$11) ) ) - (br $while-in$11) - ) - ) - (block - (set_local $$12 - (get_local $$7) - ) - (set_local $$fl$0284 - (i32.const 0) ) - (set_local $$storemerge$186282 - (get_local $$storemerge) + (block + (set_local $$12 + (get_local $$7) + ) + (set_local $$fl$0284 + (i32.const 0) + ) + (set_local $$storemerge$186282 + (get_local $$storemerge) + ) ) ) ) - ) - (set_local $$cmp65 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$12) + (set_local $$cmp65 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$12) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 42) ) - (i32.const 42) ) - ) - (block $do-once$12 - (if - (get_local $$cmp65) - (block - (set_local $$arrayidx68 - (i32.add - (get_local $$storemerge$186282) - (i32.const 1) + (block $do-once$12 + (if + (get_local $$cmp65) + (block + (set_local $$arrayidx68 + (i32.add + (get_local $$storemerge$186282) + (i32.const 1) + ) ) - ) - (set_local $$13 - (i32.load8_s - (get_local $$arrayidx68) + (set_local $$13 + (i32.load8_s + (get_local $$arrayidx68) + ) ) - ) - (set_local $$conv69 - (i32.shr_s - (i32.shl - (get_local $$13) + (set_local $$conv69 + (i32.shr_s + (i32.shl + (get_local $$13) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$isdigittmp189 - (i32.add - (get_local $$conv69) - (i32.const -48) + (set_local $$isdigittmp189 + (i32.add + (get_local $$conv69) + (i32.const -48) + ) ) - ) - (set_local $$isdigit190 - (i32.lt_u - (get_local $$isdigittmp189) - (i32.const 10) + (set_local $$isdigit190 + (i32.lt_u + (get_local $$isdigittmp189) + (i32.const 10) + ) ) - ) - (if - (get_local $$isdigit190) - (block - (set_local $$arrayidx73 - (i32.add - (get_local $$storemerge$186282) - (i32.const 2) + (if + (get_local $$isdigit190) + (block + (set_local $$arrayidx73 + (i32.add + (get_local $$storemerge$186282) + (i32.const 2) + ) ) - ) - (set_local $$14 - (i32.load8_s - (get_local $$arrayidx73) + (set_local $$14 + (i32.load8_s + (get_local $$arrayidx73) + ) ) - ) - (set_local $$cmp75 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$14) + (set_local $$cmp75 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$14) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 36) ) - (i32.const 36) ) - ) - (if - (get_local $$cmp75) - (block - (set_local $$arrayidx81 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$isdigittmp189) - (i32.const 2) + (if + (get_local $$cmp75) + (block + (set_local $$arrayidx81 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$isdigittmp189) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx81) - (i32.const 10) - ) - (set_local $$15 - (i32.load8_s - (get_local $$arrayidx68) + (i32.store + (get_local $$arrayidx81) + (i32.const 10) ) - ) - (set_local $$conv83 - (i32.shr_s - (i32.shl - (get_local $$15) + (set_local $$15 + (i32.load8_s + (get_local $$arrayidx68) + ) + ) + (set_local $$conv83 + (i32.shr_s + (i32.shl + (get_local $$15) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$sub84 - (i32.add - (get_local $$conv83) - (i32.const -48) + (set_local $$sub84 + (i32.add + (get_local $$conv83) + (i32.const -48) + ) ) - ) - (set_local $$i86 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$sub84) - (i32.const 3) + (set_local $$i86 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$sub84) + (i32.const 3) + ) ) ) - ) - (set_local $$16 - (get_local $$i86) - ) - (set_local $$17 - (get_local $$16) - ) - (set_local $$18 - (i32.load - (get_local $$17) + (set_local $$16 + (get_local $$i86) ) - ) - (set_local $$19 - (i32.add + (set_local $$17 (get_local $$16) - (i32.const 4) ) - ) - (set_local $$20 - (get_local $$19) - ) - (set_local $$21 - (i32.load - (get_local $$20) + (set_local $$18 + (i32.load + (get_local $$17) + ) ) - ) - (set_local $$add$ptr88 - (i32.add - (get_local $$storemerge$186282) - (i32.const 3) + (set_local $$19 + (i32.add + (get_local $$16) + (i32.const 4) + ) + ) + (set_local $$20 + (get_local $$19) + ) + (set_local $$21 + (i32.load + (get_local $$20) + ) + ) + (set_local $$add$ptr88 + (i32.add + (get_local $$storemerge$186282) + (i32.const 3) + ) + ) + (set_local $$l10n$2 + (i32.const 1) + ) + (set_local $$storemerge$191 + (get_local $$add$ptr88) + ) + (set_local $$w$0 + (get_local $$18) ) ) - (set_local $$l10n$2 - (i32.const 1) - ) - (set_local $$storemerge$191 - (get_local $$add$ptr88) - ) - (set_local $$w$0 - (get_local $$18) + (set_local $label + (i32.const 24) ) ) - (set_local $label - (i32.const 24) - ) ) - ) - (set_local $label - (i32.const 24) - ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 24) - ) - (block (set_local $label - (i32.const 0) + (i32.const 24) ) - (set_local $$tobool90 - (i32.eq - (get_local $$l10n$1) - (i32.const 0) - ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 24) ) - (if - (i32.eqz - (get_local $$tobool90) + (block + (set_local $label + (i32.const 0) ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$tobool90 + (i32.eq + (get_local $$l10n$1) + (i32.const 0) ) - (br $label$break$L1) ) - ) - (if - (i32.eqz - (get_local $$tobool25) + (if + (i32.eqz + (get_local $$tobool90) + ) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) + (if + (i32.eqz + (get_local $$tobool25) + ) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$arrayidx68) + ) + (set_local $$l10n$3 + (i32.const 0) + ) + (set_local $$w$1 + (i32.const 0) + ) + (br $do-once$12) ) - (set_local $$incdec$ptr169269 - (get_local $$arrayidx68) + ) + (set_local $$arglist_current + (i32.load + (get_local $$ap) ) - (set_local $$l10n$3 + ) + (set_local $$22 + (get_local $$arglist_current) + ) + (set_local $$23 + (i32.add (i32.const 0) + (i32.const 4) + ) + ) + (set_local $$expanded4 + (get_local $$23) + ) + (set_local $$expanded + (i32.sub + (get_local $$expanded4) + (i32.const 1) + ) + ) + (set_local $$24 + (i32.add + (get_local $$22) + (get_local $$expanded) ) - (set_local $$w$1 + ) + (set_local $$25 + (i32.add (i32.const 0) + (i32.const 4) ) - (br $do-once$12) ) - ) - (set_local $$arglist_current - (i32.load - (get_local $$ap) + (set_local $$expanded8 + (get_local $$25) ) - ) - (set_local $$22 - (get_local $$arglist_current) - ) - (set_local $$23 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$expanded7 + (i32.sub + (get_local $$expanded8) + (i32.const 1) + ) ) - ) - (set_local $$expanded4 - (get_local $$23) - ) - (set_local $$expanded - (i32.sub - (get_local $$expanded4) - (i32.const 1) + (set_local $$expanded6 + (i32.xor + (get_local $$expanded7) + (i32.const -1) + ) ) - ) - (set_local $$24 - (i32.add - (get_local $$22) - (get_local $$expanded) + (set_local $$26 + (i32.and + (get_local $$24) + (get_local $$expanded6) + ) ) - ) - (set_local $$25 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$27 + (get_local $$26) ) - ) - (set_local $$expanded8 - (get_local $$25) - ) - (set_local $$expanded7 - (i32.sub - (get_local $$expanded8) - (i32.const 1) + (set_local $$28 + (i32.load + (get_local $$27) + ) ) - ) - (set_local $$expanded6 - (i32.xor - (get_local $$expanded7) - (i32.const -1) + (set_local $$arglist_next + (i32.add + (get_local $$27) + (i32.const 4) + ) ) - ) - (set_local $$26 - (i32.and - (get_local $$24) - (get_local $$expanded6) + (i32.store + (get_local $$ap) + (get_local $$arglist_next) ) - ) - (set_local $$27 - (get_local $$26) - ) - (set_local $$28 - (i32.load - (get_local $$27) + (set_local $$l10n$2 + (i32.const 0) ) - ) - (set_local $$arglist_next - (i32.add - (get_local $$27) - (i32.const 4) + (set_local $$storemerge$191 + (get_local $$arrayidx68) + ) + (set_local $$w$0 + (get_local $$28) ) ) - (i32.store - (get_local $$ap) - (get_local $$arglist_next) - ) - (set_local $$l10n$2 + ) + (set_local $$cmp97 + (i32.lt_s + (get_local $$w$0) (i32.const 0) ) - (set_local $$storemerge$191 - (get_local $$arrayidx68) - ) - (set_local $$w$0 - (get_local $$28) - ) - ) - ) - (set_local $$cmp97 - (i32.lt_s - (get_local $$w$0) - (i32.const 0) ) - ) - (if - (get_local $$cmp97) - (block - (set_local $$or100 - (i32.or - (get_local $$fl$0284) - (i32.const 8192) + (if + (get_local $$cmp97) + (block + (set_local $$or100 + (i32.or + (get_local $$fl$0284) + (i32.const 8192) + ) + ) + (set_local $$sub101 + (i32.sub + (i32.const 0) + (get_local $$w$0) + ) + ) + (set_local $$fl$1 + (get_local $$or100) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$191) + ) + (set_local $$l10n$3 + (get_local $$l10n$2) + ) + (set_local $$w$1 + (get_local $$sub101) ) ) - (set_local $$sub101 - (i32.sub - (i32.const 0) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$191) + ) + (set_local $$l10n$3 + (get_local $$l10n$2) + ) + (set_local $$w$1 (get_local $$w$0) ) ) - (set_local $$fl$1 - (get_local $$or100) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$191) - ) - (set_local $$l10n$3 - (get_local $$l10n$2) - ) - (set_local $$w$1 - (get_local $$sub101) - ) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$191) - ) - (set_local $$l10n$3 - (get_local $$l10n$2) - ) - (set_local $$w$1 - (get_local $$w$0) - ) ) ) - ) - (block - (set_local $$conv$4$i - (i32.shr_s - (i32.shl - (get_local $$12) + (block + (set_local $$conv$4$i + (i32.shr_s + (i32.shl + (get_local $$12) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp$5$i - (i32.add - (get_local $$conv$4$i) - (i32.const -48) - ) - ) - (set_local $$isdigit$6$i - (i32.lt_u - (get_local $$isdigittmp$5$i) - (i32.const 10) ) - ) - (if - (get_local $$isdigit$6$i) - (block - (set_local $$29 - (get_local $$storemerge$186282) - ) - (set_local $$i$07$i - (i32.const 0) + (set_local $$isdigittmp$5$i + (i32.add + (get_local $$conv$4$i) + (i32.const -48) ) - (set_local $$isdigittmp8$i + ) + (set_local $$isdigit$6$i + (i32.lt_u (get_local $$isdigittmp$5$i) + (i32.const 10) ) - (loop $while-out$14 $while-in$15 - (set_local $$mul$i - (i32.mul - (get_local $$i$07$i) - (i32.const 10) - ) - ) - (set_local $$add$i - (i32.add - (get_local $$mul$i) - (get_local $$isdigittmp8$i) - ) + ) + (if + (get_local $$isdigit$6$i) + (block + (set_local $$29 + (get_local $$storemerge$186282) ) - (set_local $$incdec$ptr$i - (i32.add - (get_local $$29) - (i32.const 1) - ) + (set_local $$i$07$i + (i32.const 0) ) - (set_local $$30 - (i32.load8_s - (get_local $$incdec$ptr$i) - ) + (set_local $$isdigittmp8$i + (get_local $$isdigittmp$5$i) ) - (set_local $$conv$i - (i32.shr_s - (i32.shl - (get_local $$30) - (i32.const 24) + (loop $while-in$15 + (block $while-out$14 + (set_local $$mul$i + (i32.mul + (get_local $$i$07$i) + (i32.const 10) + ) ) - (i32.const 24) - ) - ) - (set_local $$isdigittmp$i - (i32.add - (get_local $$conv$i) - (i32.const -48) + (set_local $$add$i + (i32.add + (get_local $$mul$i) + (get_local $$isdigittmp8$i) + ) + ) + (set_local $$incdec$ptr$i + (i32.add + (get_local $$29) + (i32.const 1) + ) + ) + (set_local $$30 + (i32.load8_s + (get_local $$incdec$ptr$i) + ) + ) + (set_local $$conv$i + (i32.shr_s + (i32.shl + (get_local $$30) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (set_local $$isdigittmp$i + (i32.add + (get_local $$conv$i) + (i32.const -48) + ) + ) + (set_local $$isdigit$i + (i32.lt_u + (get_local $$isdigittmp$i) + (i32.const 10) + ) + ) + (if + (get_local $$isdigit$i) + (block + (set_local $$29 + (get_local $$incdec$ptr$i) + ) + (set_local $$i$07$i + (get_local $$add$i) + ) + (set_local $$isdigittmp8$i + (get_local $$isdigittmp$i) + ) + ) + (block + (set_local $$add$i$lcssa + (get_local $$add$i) + ) + (set_local $$incdec$ptr$i$lcssa + (get_local $$incdec$ptr$i) + ) + (br $while-out$14) + ) + ) + (br $while-in$15) ) ) - (set_local $$isdigit$i - (i32.lt_u - (get_local $$isdigittmp$i) - (i32.const 10) + (set_local $$cmp105 + (i32.lt_s + (get_local $$add$i$lcssa) + (i32.const 0) ) ) (if - (get_local $$isdigit$i) + (get_local $$cmp105) (block - (set_local $$29 - (get_local $$incdec$ptr$i) - ) - (set_local $$i$07$i - (get_local $$add$i) - ) - (set_local $$isdigittmp8$i - (get_local $$isdigittmp$i) + (set_local $$retval$0 + (i32.const -1) ) + (br $label$break$L1) ) (block - (set_local $$add$i$lcssa - (get_local $$add$i) + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$incdec$ptr$i$lcssa) ) - (set_local $$incdec$ptr$i$lcssa - (get_local $$incdec$ptr$i) + (set_local $$l10n$3 + (get_local $$l10n$1) + ) + (set_local $$w$1 + (get_local $$add$i$lcssa) ) - (br $while-out$14) ) ) - (br $while-in$15) ) - (set_local $$cmp105 - (i32.lt_s - (get_local $$add$i$lcssa) + (block + (set_local $$fl$1 + (get_local $$fl$0284) + ) + (set_local $$incdec$ptr169269 + (get_local $$storemerge$186282) + ) + (set_local $$l10n$3 + (get_local $$l10n$1) + ) + (set_local $$w$1 (i32.const 0) ) ) - (if - (get_local $$cmp105) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$incdec$ptr$i$lcssa) - ) - (set_local $$l10n$3 - (get_local $$l10n$1) - ) - (set_local $$w$1 - (get_local $$add$i$lcssa) - ) - ) - ) - ) - (block - (set_local $$fl$1 - (get_local $$fl$0284) - ) - (set_local $$incdec$ptr169269 - (get_local $$storemerge$186282) - ) - (set_local $$l10n$3 - (get_local $$l10n$1) - ) - (set_local $$w$1 - (i32.const 0) - ) ) ) ) ) - ) - (set_local $$31 - (i32.load8_s - (get_local $$incdec$ptr169269) + (set_local $$31 + (i32.load8_s + (get_local $$incdec$ptr169269) + ) ) - ) - (set_local $$cmp111 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$31) + (set_local $$cmp111 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$31) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 46) ) - (i32.const 46) ) - ) - (block $label$break$L46 - (if - (get_local $$cmp111) - (block - (set_local $$arrayidx114 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 1) - ) - ) - (set_local $$32 - (i32.load8_s - (get_local $$arrayidx114) - ) - ) - (set_local $$cmp116 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$32) - (i32.const 24) - ) - (i32.const 24) + (block $label$break$L46 + (if + (get_local $$cmp111) + (block + (set_local $$arrayidx114 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 1) ) - (i32.const 42) ) - ) - (if - (i32.eqz - (get_local $$cmp116) + (set_local $$32 + (i32.load8_s + (get_local $$arrayidx114) + ) ) - (block - (set_local $$conv$4$i$197 + (set_local $$cmp116 + (i32.eq (i32.shr_s (i32.shl (get_local $$32) @@ -7167,415 +7180,528 @@ ) (i32.const 24) ) + (i32.const 42) ) - (set_local $$isdigittmp$5$i$198 - (i32.add - (get_local $$conv$4$i$197) - (i32.const -48) - ) - ) - (set_local $$isdigit$6$i$199 - (i32.lt_u - (get_local $$isdigittmp$5$i$198) - (i32.const 10) - ) - ) - (if - (get_local $$isdigit$6$i$199) - (block - (set_local $$49 - (get_local $$arrayidx114) - ) - (set_local $$i$07$i$201 - (i32.const 0) - ) - (set_local $$isdigittmp8$i$200 - (get_local $$isdigittmp$5$i$198) - ) - ) - (block - (set_local $$incdec$ptr169272 - (get_local $$arrayidx114) - ) - (set_local $$p$0 - (i32.const 0) - ) - (br $label$break$L46) - ) + ) + (if + (i32.eqz + (get_local $$cmp116) ) - (loop $while-out$17 $while-in$18 - (set_local $$mul$i$202 - (i32.mul - (get_local $$i$07$i$201) - (i32.const 10) - ) - ) - (set_local $$add$i$203 - (i32.add - (get_local $$mul$i$202) - (get_local $$isdigittmp8$i$200) - ) - ) - (set_local $$incdec$ptr$i$204 - (i32.add - (get_local $$49) - (i32.const 1) - ) - ) - (set_local $$50 - (i32.load8_s - (get_local $$incdec$ptr$i$204) - ) - ) - (set_local $$conv$i$205 + (block + (set_local $$conv$4$i$197 (i32.shr_s (i32.shl - (get_local $$50) + (get_local $$32) (i32.const 24) ) (i32.const 24) ) ) - (set_local $$isdigittmp$i$206 + (set_local $$isdigittmp$5$i$198 (i32.add - (get_local $$conv$i$205) + (get_local $$conv$4$i$197) (i32.const -48) ) ) - (set_local $$isdigit$i$207 + (set_local $$isdigit$6$i$199 (i32.lt_u - (get_local $$isdigittmp$i$206) + (get_local $$isdigittmp$5$i$198) (i32.const 10) ) ) (if - (get_local $$isdigit$i$207) + (get_local $$isdigit$6$i$199) (block (set_local $$49 - (get_local $$incdec$ptr$i$204) + (get_local $$arrayidx114) ) (set_local $$i$07$i$201 - (get_local $$add$i$203) + (i32.const 0) ) (set_local $$isdigittmp8$i$200 - (get_local $$isdigittmp$i$206) + (get_local $$isdigittmp$5$i$198) ) ) (block (set_local $$incdec$ptr169272 - (get_local $$incdec$ptr$i$204) + (get_local $$arrayidx114) ) (set_local $$p$0 - (get_local $$add$i$203) + (i32.const 0) ) (br $label$break$L46) ) ) - (br $while-in$18) + (loop $while-in$18 + (block $while-out$17 + (set_local $$mul$i$202 + (i32.mul + (get_local $$i$07$i$201) + (i32.const 10) + ) + ) + (set_local $$add$i$203 + (i32.add + (get_local $$mul$i$202) + (get_local $$isdigittmp8$i$200) + ) + ) + (set_local $$incdec$ptr$i$204 + (i32.add + (get_local $$49) + (i32.const 1) + ) + ) + (set_local $$50 + (i32.load8_s + (get_local $$incdec$ptr$i$204) + ) + ) + (set_local $$conv$i$205 + (i32.shr_s + (i32.shl + (get_local $$50) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (set_local $$isdigittmp$i$206 + (i32.add + (get_local $$conv$i$205) + (i32.const -48) + ) + ) + (set_local $$isdigit$i$207 + (i32.lt_u + (get_local $$isdigittmp$i$206) + (i32.const 10) + ) + ) + (if + (get_local $$isdigit$i$207) + (block + (set_local $$49 + (get_local $$incdec$ptr$i$204) + ) + (set_local $$i$07$i$201 + (get_local $$add$i$203) + ) + (set_local $$isdigittmp8$i$200 + (get_local $$isdigittmp$i$206) + ) + ) + (block + (set_local $$incdec$ptr169272 + (get_local $$incdec$ptr$i$204) + ) + (set_local $$p$0 + (get_local $$add$i$203) + ) + (br $label$break$L46) + ) + ) + (br $while-in$18) + ) + ) ) ) - ) - (set_local $$arrayidx119 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 2) + (set_local $$arrayidx119 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 2) + ) ) - ) - (set_local $$33 - (i32.load8_s - (get_local $$arrayidx119) + (set_local $$33 + (i32.load8_s + (get_local $$arrayidx119) + ) ) - ) - (set_local $$conv120 - (i32.shr_s - (i32.shl - (get_local $$33) + (set_local $$conv120 + (i32.shr_s + (i32.shl + (get_local $$33) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$isdigittmp187 - (i32.add - (get_local $$conv120) - (i32.const -48) + (set_local $$isdigittmp187 + (i32.add + (get_local $$conv120) + (i32.const -48) + ) ) - ) - (set_local $$isdigit188 - (i32.lt_u - (get_local $$isdigittmp187) - (i32.const 10) + (set_local $$isdigit188 + (i32.lt_u + (get_local $$isdigittmp187) + (i32.const 10) + ) ) - ) - (if - (get_local $$isdigit188) - (block - (set_local $$arrayidx124 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 3) + (if + (get_local $$isdigit188) + (block + (set_local $$arrayidx124 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 3) + ) ) - ) - (set_local $$34 - (i32.load8_s - (get_local $$arrayidx124) + (set_local $$34 + (i32.load8_s + (get_local $$arrayidx124) + ) ) - ) - (set_local $$cmp126 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$34) + (set_local $$cmp126 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$34) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) + (i32.const 36) ) - (i32.const 36) ) - ) - (if - (get_local $$cmp126) - (block - (set_local $$arrayidx132 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$isdigittmp187) - (i32.const 2) + (if + (get_local $$cmp126) + (block + (set_local $$arrayidx132 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$isdigittmp187) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx132) - (i32.const 10) - ) - (set_local $$35 - (i32.load8_s - (get_local $$arrayidx119) + (i32.store + (get_local $$arrayidx132) + (i32.const 10) ) - ) - (set_local $$conv134 - (i32.shr_s - (i32.shl - (get_local $$35) + (set_local $$35 + (i32.load8_s + (get_local $$arrayidx119) + ) + ) + (set_local $$conv134 + (i32.shr_s + (i32.shl + (get_local $$35) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$sub135 - (i32.add - (get_local $$conv134) - (i32.const -48) + (set_local $$sub135 + (i32.add + (get_local $$conv134) + (i32.const -48) + ) ) - ) - (set_local $$i137 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$sub135) - (i32.const 3) + (set_local $$i137 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$sub135) + (i32.const 3) + ) ) ) - ) - (set_local $$36 - (get_local $$i137) - ) - (set_local $$37 - (get_local $$36) - ) - (set_local $$38 - (i32.load - (get_local $$37) + (set_local $$36 + (get_local $$i137) ) - ) - (set_local $$39 - (i32.add + (set_local $$37 (get_local $$36) - (i32.const 4) ) - ) - (set_local $$40 - (get_local $$39) - ) - (set_local $$41 - (i32.load - (get_local $$40) + (set_local $$38 + (i32.load + (get_local $$37) + ) ) - ) - (set_local $$add$ptr139 - (i32.add - (get_local $$incdec$ptr169269) - (i32.const 4) + (set_local $$39 + (i32.add + (get_local $$36) + (i32.const 4) + ) ) + (set_local $$40 + (get_local $$39) + ) + (set_local $$41 + (i32.load + (get_local $$40) + ) + ) + (set_local $$add$ptr139 + (i32.add + (get_local $$incdec$ptr169269) + (i32.const 4) + ) + ) + (set_local $$incdec$ptr169272 + (get_local $$add$ptr139) + ) + (set_local $$p$0 + (get_local $$38) + ) + (br $label$break$L46) ) - (set_local $$incdec$ptr169272 - (get_local $$add$ptr139) - ) - (set_local $$p$0 - (get_local $$38) - ) - (br $label$break$L46) ) ) ) - ) - (set_local $$tobool141 - (i32.eq - (get_local $$l10n$3) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool141) - ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$tobool141 + (i32.eq + (get_local $$l10n$3) + (i32.const 0) ) - (br $label$break$L1) ) - ) - (if - (get_local $$tobool25) - (block - (set_local $$arglist_current2 - (i32.load - (get_local $$ap) - ) - ) - (set_local $$42 - (get_local $$arglist_current2) + (if + (i32.eqz + (get_local $$tobool141) ) - (set_local $$43 - (i32.add - (i32.const 0) - (i32.const 4) + (block + (set_local $$retval$0 + (i32.const -1) ) + (br $label$break$L1) ) - (set_local $$expanded11 - (get_local $$43) - ) - (set_local $$expanded10 - (i32.sub - (get_local $$expanded11) - (i32.const 1) + ) + (if + (get_local $$tobool25) + (block + (set_local $$arglist_current2 + (i32.load + (get_local $$ap) + ) ) - ) - (set_local $$44 - (i32.add - (get_local $$42) - (get_local $$expanded10) + (set_local $$42 + (get_local $$arglist_current2) ) - ) - (set_local $$45 - (i32.add - (i32.const 0) - (i32.const 4) + (set_local $$43 + (i32.add + (i32.const 0) + (i32.const 4) + ) ) - ) - (set_local $$expanded15 - (get_local $$45) - ) - (set_local $$expanded14 - (i32.sub - (get_local $$expanded15) - (i32.const 1) + (set_local $$expanded11 + (get_local $$43) ) - ) - (set_local $$expanded13 - (i32.xor - (get_local $$expanded14) - (i32.const -1) + (set_local $$expanded10 + (i32.sub + (get_local $$expanded11) + (i32.const 1) + ) + ) + (set_local $$44 + (i32.add + (get_local $$42) + (get_local $$expanded10) + ) + ) + (set_local $$45 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (set_local $$expanded15 + (get_local $$45) + ) + (set_local $$expanded14 + (i32.sub + (get_local $$expanded15) + (i32.const 1) + ) + ) + (set_local $$expanded13 + (i32.xor + (get_local $$expanded14) + (i32.const -1) + ) + ) + (set_local $$46 + (i32.and + (get_local $$44) + (get_local $$expanded13) + ) + ) + (set_local $$47 + (get_local $$46) + ) + (set_local $$48 + (i32.load + (get_local $$47) + ) + ) + (set_local $$arglist_next3 + (i32.add + (get_local $$47) + (i32.const 4) + ) + ) + (i32.store + (get_local $$ap) + (get_local $$arglist_next3) + ) + (set_local $$incdec$ptr169272 + (get_local $$arrayidx119) + ) + (set_local $$p$0 + (get_local $$48) ) ) - (set_local $$46 - (i32.and - (get_local $$44) - (get_local $$expanded13) + (block + (set_local $$incdec$ptr169272 + (get_local $$arrayidx119) + ) + (set_local $$p$0 + (i32.const 0) ) ) - (set_local $$47 - (get_local $$46) + ) + ) + (block + (set_local $$incdec$ptr169272 + (get_local $$incdec$ptr169269) + ) + (set_local $$p$0 + (i32.const -1) + ) + ) + ) + ) + (set_local $$incdec$ptr169271 + (get_local $$incdec$ptr169272) + ) + (set_local $$st$0 + (i32.const 0) + ) + (loop $while-in$20 + (block $while-out$19 + (set_local $$51 + (i32.load8_s + (get_local $$incdec$ptr169271) + ) + ) + (set_local $$conv163 + (i32.shr_s + (i32.shl + (get_local $$51) + (i32.const 24) ) - (set_local $$48 - (i32.load - (get_local $$47) - ) + (i32.const 24) + ) + ) + (set_local $$sub164 + (i32.add + (get_local $$conv163) + (i32.const -65) + ) + ) + (set_local $$cmp165 + (i32.gt_u + (get_local $$sub164) + (i32.const 57) + ) + ) + (if + (get_local $$cmp165) + (block + (set_local $$retval$0 + (i32.const -1) ) - (set_local $$arglist_next3 - (i32.add - (get_local $$47) - (i32.const 4) + (br $label$break$L1) + ) + ) + (set_local $$incdec$ptr169 + (i32.add + (get_local $$incdec$ptr169271) + (i32.const 1) + ) + ) + (set_local $$arrayidx173 + (i32.add + (i32.add + (i32.const 3611) + (i32.mul + (get_local $$st$0) + (i32.const 58) ) ) - (i32.store - (get_local $$ap) - (get_local $$arglist_next3) - ) - (set_local $$incdec$ptr169272 - (get_local $$arrayidx119) + (get_local $$sub164) + ) + ) + (set_local $$52 + (i32.load8_s + (get_local $$arrayidx173) + ) + ) + (set_local $$conv174 + (i32.and + (get_local $$52) + (i32.const 255) + ) + ) + (set_local $$sub175 + (i32.add + (get_local $$conv174) + (i32.const -1) + ) + ) + (set_local $$cmp176 + (i32.lt_u + (get_local $$sub175) + (i32.const 8) + ) + ) + (if + (get_local $$cmp176) + (block + (set_local $$incdec$ptr169271 + (get_local $$incdec$ptr169) ) - (set_local $$p$0 - (get_local $$48) + (set_local $$st$0 + (get_local $$conv174) ) ) (block - (set_local $$incdec$ptr169272 - (get_local $$arrayidx119) + (set_local $$$lcssa + (get_local $$52) ) - (set_local $$p$0 - (i32.const 0) + (set_local $$conv174$lcssa + (get_local $$conv174) + ) + (set_local $$incdec$ptr169$lcssa + (get_local $$incdec$ptr169) ) + (set_local $$incdec$ptr169271$lcssa414 + (get_local $$incdec$ptr169271) + ) + (set_local $$st$0$lcssa415 + (get_local $$st$0) + ) + (br $while-out$19) ) ) - ) - (block - (set_local $$incdec$ptr169272 - (get_local $$incdec$ptr169269) - ) - (set_local $$p$0 - (i32.const -1) - ) - ) - ) - ) - (set_local $$incdec$ptr169271 - (get_local $$incdec$ptr169272) - ) - (set_local $$st$0 - (i32.const 0) - ) - (loop $while-out$19 $while-in$20 - (set_local $$51 - (i32.load8_s - (get_local $$incdec$ptr169271) + (br $while-in$20) ) ) - (set_local $$conv163 - (i32.shr_s - (i32.shl - (get_local $$51) + (set_local $$tobool178 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$$lcssa) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) - ) - ) - (set_local $$sub164 - (i32.add - (get_local $$conv163) - (i32.const -65) - ) - ) - (set_local $$cmp165 - (i32.gt_u - (get_local $$sub164) - (i32.const 57) + (i32.const 0) ) ) (if - (get_local $$cmp165) + (get_local $$tobool178) (block (set_local $$retval$0 (i32.const -1) @@ -7583,396 +7709,329 @@ (br $label$break$L1) ) ) - (set_local $$incdec$ptr169 - (i32.add - (get_local $$incdec$ptr169271) - (i32.const 1) - ) - ) - (set_local $$arrayidx173 - (i32.add - (i32.add - (i32.const 3611) - (i32.mul - (get_local $$st$0) - (i32.const 58) + (set_local $$cmp181 + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$$lcssa) + (i32.const 24) ) + (i32.const 24) ) - (get_local $$sub164) - ) - ) - (set_local $$52 - (i32.load8_s - (get_local $$arrayidx173) - ) - ) - (set_local $$conv174 - (i32.and - (get_local $$52) - (i32.const 255) + (i32.const 19) ) ) - (set_local $$sub175 - (i32.add - (get_local $$conv174) + (set_local $$cmp184 + (i32.gt_s + (get_local $$argpos$0) (i32.const -1) ) ) - (set_local $$cmp176 - (i32.lt_u - (get_local $$sub175) - (i32.const 8) - ) - ) - (if - (get_local $$cmp176) - (block - (set_local $$incdec$ptr169271 - (get_local $$incdec$ptr169) + (block $do-once$21 + (if + (get_local $$cmp181) + (if + (get_local $$cmp184) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + (set_local $label + (i32.const 52) + ) ) - (set_local $$st$0 - (get_local $$conv174) - ) - ) - (block - (set_local $$$lcssa - (get_local $$52) - ) - (set_local $$conv174$lcssa - (get_local $$conv174) - ) - (set_local $$incdec$ptr169$lcssa - (get_local $$incdec$ptr169) - ) - (set_local $$incdec$ptr169271$lcssa414 - (get_local $$incdec$ptr169271) - ) - (set_local $$st$0$lcssa415 - (get_local $$st$0) - ) - (br $while-out$19) - ) - ) - (br $while-in$20) - ) - (set_local $$tobool178 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$$lcssa) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 0) - ) - ) - (if - (get_local $$tobool178) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - ) - (set_local $$cmp181 - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$$lcssa) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 19) - ) - ) - (set_local $$cmp184 - (i32.gt_s - (get_local $$argpos$0) - (i32.const -1) - ) - ) - (block $do-once$21 - (if - (get_local $$cmp181) - (if - (get_local $$cmp184) (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) - (set_local $label - (i32.const 52) - ) - ) - (block - (if - (get_local $$cmp184) - (block - (set_local $$arrayidx192 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$argpos$0) - (i32.const 2) + (if + (get_local $$cmp184) + (block + (set_local $$arrayidx192 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$argpos$0) + (i32.const 2) + ) ) ) - ) - (i32.store - (get_local $$arrayidx192) - (get_local $$conv174$lcssa) - ) - (set_local $$53 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$argpos$0) - (i32.const 3) + (i32.store + (get_local $$arrayidx192) + (get_local $$conv174$lcssa) + ) + (set_local $$53 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$argpos$0) + (i32.const 3) + ) ) ) - ) - (set_local $$54 - (get_local $$53) - ) - (set_local $$55 - (get_local $$54) - ) - (set_local $$56 - (i32.load - (get_local $$55) + (set_local $$54 + (get_local $$53) ) - ) - (set_local $$57 - (i32.add + (set_local $$55 (get_local $$54) - (i32.const 4) ) - ) - (set_local $$58 - (get_local $$57) - ) - (set_local $$59 - (i32.load - (get_local $$58) + (set_local $$56 + (i32.load + (get_local $$55) + ) ) - ) - (set_local $$60 - (get_local $$arg) - ) - (set_local $$61 - (get_local $$60) - ) - (i32.store - (get_local $$61) - (get_local $$56) - ) - (set_local $$62 - (i32.add + (set_local $$57 + (i32.add + (get_local $$54) + (i32.const 4) + ) + ) + (set_local $$58 + (get_local $$57) + ) + (set_local $$59 + (i32.load + (get_local $$58) + ) + ) + (set_local $$60 + (get_local $$arg) + ) + (set_local $$61 (get_local $$60) - (i32.const 4) ) + (i32.store + (get_local $$61) + (get_local $$56) + ) + (set_local $$62 + (i32.add + (get_local $$60) + (i32.const 4) + ) + ) + (set_local $$63 + (get_local $$62) + ) + (i32.store + (get_local $$63) + (get_local $$59) + ) + (set_local $label + (i32.const 52) + ) + (br $do-once$21) ) - (set_local $$63 - (get_local $$62) - ) - (i32.store - (get_local $$63) - (get_local $$59) + ) + (if + (i32.eqz + (get_local $$tobool25) ) - (set_local $label - (i32.const 52) + (block + (set_local $$retval$0 + (i32.const 0) + ) + (br $label$break$L1) ) - (br $do-once$21) ) + (call $_pop_arg_336 + (get_local $$arg) + (get_local $$conv174$lcssa) + (get_local $$ap) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 52) + ) + (block + (set_local $label + (i32.const 0) ) (if (i32.eqz (get_local $$tobool25) ) (block - (set_local $$retval$0 - (i32.const 0) + (set_local $$cnt$0 + (get_local $$cnt$1) ) - (br $label$break$L1) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) ) ) - (call $_pop_arg_336 - (get_local $$arg) - (get_local $$conv174$lcssa) - (get_local $$ap) - ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 52) - ) - (block - (set_local $label - (i32.const 0) - ) - (if - (i32.eqz - (get_local $$tobool25) - ) - (block - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) - ) + (set_local $$64 + (i32.load8_s + (get_local $$incdec$ptr169271$lcssa414) ) ) - ) - (set_local $$64 - (i32.load8_s - (get_local $$incdec$ptr169271$lcssa414) - ) - ) - (set_local $$conv207 - (i32.shr_s - (i32.shl - (get_local $$64) + (set_local $$conv207 + (i32.shr_s + (i32.shl + (get_local $$64) + (i32.const 24) + ) (i32.const 24) ) - (i32.const 24) ) - ) - (set_local $$tobool208 - (i32.ne - (get_local $$st$0$lcssa415) - (i32.const 0) + (set_local $$tobool208 + (i32.ne + (get_local $$st$0$lcssa415) + (i32.const 0) + ) ) - ) - (set_local $$and210 - (i32.and - (get_local $$conv207) - (i32.const 15) + (set_local $$and210 + (i32.and + (get_local $$conv207) + (i32.const 15) + ) ) - ) - (set_local $$cmp211 - (i32.eq - (get_local $$and210) - (i32.const 3) + (set_local $$cmp211 + (i32.eq + (get_local $$and210) + (i32.const 3) + ) ) - ) - (set_local $$or$cond192 - (i32.and - (get_local $$tobool208) - (get_local $$cmp211) + (set_local $$or$cond192 + (i32.and + (get_local $$tobool208) + (get_local $$cmp211) + ) ) - ) - (set_local $$and214 - (i32.and - (get_local $$conv207) - (i32.const -33) + (set_local $$and214 + (i32.and + (get_local $$conv207) + (i32.const -33) + ) ) - ) - (set_local $$t$0 - (if - (get_local $$or$cond192) - (get_local $$and214) - (get_local $$conv207) + (set_local $$t$0 + (if + (get_local $$or$cond192) + (get_local $$and214) + (get_local $$conv207) + ) ) - ) - (set_local $$and216 - (i32.and - (get_local $$fl$1) - (i32.const 8192) + (set_local $$and216 + (i32.and + (get_local $$fl$1) + (i32.const 8192) + ) ) - ) - (set_local $$tobool217 - (i32.eq - (get_local $$and216) - (i32.const 0) + (set_local $$tobool217 + (i32.eq + (get_local $$and216) + (i32.const 0) + ) ) - ) - (set_local $$and219 - (i32.and - (get_local $$fl$1) - (i32.const -65537) + (set_local $$and219 + (i32.and + (get_local $$fl$1) + (i32.const -65537) + ) ) - ) - (set_local $$fl$1$and219 - (if - (get_local $$tobool217) - (get_local $$fl$1) - (get_local $$and219) + (set_local $$fl$1$and219 + (if + (get_local $$tobool217) + (get_local $$fl$1) + (get_local $$and219) + ) ) - ) - (block $label$break$L75 - (block $switch$24 - (block $switch-default$127 + (block $label$break$L75 + (block $switch$24 (block $switch-default$127 - (block $switch-case$126 - (block $switch-case$55 - (block $switch-case$54 - (block $switch-case$53 - (block $switch-case$52 - (block $switch-case$51 - (block $switch-case$50 - (block $switch-case$49 - (block $switch-case$48 - (block $switch-case$47 - (block $switch-case$46 - (block $switch-case$45 - (block $switch-case$44 - (block $switch-case$43 - (block $switch-case$42 - (block $switch-case$41 - (block $switch-case$40 - (block $switch-case$37 - (block $switch-case$36 - (block $switch-case$35 - (block $switch-case$34 - (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$52 $switch-case$51 $switch-case$50 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$53 $switch-default$127 $switch-case$44 $switch-case$42 $switch-case$126 $switch-case$55 $switch-case$54 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$37 $switch-default$127 - (i32.sub - (get_local $$t$0) - (i32.const 65) + (block $switch-default$127 + (block $switch-case$126 + (block $switch-case$55 + (block $switch-case$54 + (block $switch-case$53 + (block $switch-case$52 + (block $switch-case$51 + (block $switch-case$50 + (block $switch-case$49 + (block $switch-case$48 + (block $switch-case$47 + (block $switch-case$46 + (block $switch-case$45 + (block $switch-case$44 + (block $switch-case$43 + (block $switch-case$42 + (block $switch-case$41 + (block $switch-case$40 + (block $switch-case$37 + (block $switch-case$36 + (block $switch-case$35 + (block $switch-case$34 + (br_table $switch-case$49 $switch-default$127 $switch-case$47 $switch-default$127 $switch-case$52 $switch-case$51 $switch-case$50 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$48 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$36 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$53 $switch-default$127 $switch-case$44 $switch-case$42 $switch-case$126 $switch-case$55 $switch-case$54 $switch-default$127 $switch-case$41 $switch-default$127 $switch-default$127 $switch-default$127 $switch-case$45 $switch-case$34 $switch-case$40 $switch-case$35 $switch-default$127 $switch-default$127 $switch-case$46 $switch-default$127 $switch-case$43 $switch-default$127 $switch-default$127 $switch-case$37 $switch-default$127 + (i32.sub + (get_local $$t$0) + (i32.const 65) + ) ) ) - ) - (block - (block $switch$25 - (block $switch-default$33 + (block + (block $switch$25 (block $switch-default$33 - (block $switch-case$32 - (block $switch-case$31 - (block $switch-case$30 - (block $switch-case$29 - (block $switch-case$28 - (block $switch-case$27 - (block $switch-case$26 - (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 - (i32.sub - (get_local $$st$0$lcssa415) - (i32.const 0) + (block $switch-default$33 + (block $switch-case$32 + (block $switch-case$31 + (block $switch-case$30 + (block $switch-case$29 + (block $switch-case$28 + (block $switch-case$27 + (block $switch-case$26 + (br_table $switch-case$26 $switch-case$27 $switch-case$28 $switch-case$29 $switch-case$30 $switch-default$33 $switch-case$31 $switch-case$32 $switch-default$33 + (i32.sub + (get_local $$st$0$lcssa415) + (i32.const 0) + ) + ) + ) + (block + (set_local $$71 + (i32.load + (get_local $$arg) + ) + ) + (i32.store + (get_local $$71) + (get_local $$cnt$1) ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$sub$ptr$sub) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + (br $switch$25) ) ) (block - (set_local $$71 + (set_local $$72 (i32.load (get_local $$arg) ) ) (i32.store - (get_local $$71) + (get_local $$72) (get_local $$cnt$1) ) (set_local $$cnt$0 @@ -7992,15 +8051,49 @@ ) ) (block - (set_local $$72 - (i32.load - (get_local $$arg) + (set_local $$73 + (i32.lt_s + (get_local $$cnt$1) + (i32.const 0) ) ) - (i32.store - (get_local $$72) + (set_local $$74 + (i32.shr_s + (i32.shl + (get_local $$73) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (set_local $$75 + (i32.load + (get_local $$arg) + ) + ) + (set_local $$76 + (get_local $$75) + ) + (set_local $$77 + (get_local $$76) + ) + (i32.store + (get_local $$77) (get_local $$cnt$1) ) + (set_local $$78 + (i32.add + (get_local $$76) + (i32.const 4) + ) + ) + (set_local $$79 + (get_local $$78) + ) + (i32.store + (get_local $$79) + (get_local $$74) + ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8018,48 +8111,20 @@ ) ) (block - (set_local $$73 - (i32.lt_s + (set_local $$conv229 + (i32.and (get_local $$cnt$1) - (i32.const 0) - ) - ) - (set_local $$74 - (i32.shr_s - (i32.shl - (get_local $$73) - (i32.const 31) - ) - (i32.const 31) + (i32.const 65535) ) ) - (set_local $$75 + (set_local $$80 (i32.load (get_local $$arg) ) ) - (set_local $$76 - (get_local $$75) - ) - (set_local $$77 - (get_local $$76) - ) - (i32.store - (get_local $$77) - (get_local $$cnt$1) - ) - (set_local $$78 - (i32.add - (get_local $$76) - (i32.const 4) - ) - ) - (set_local $$79 - (get_local $$78) - ) - (i32.store - (get_local $$79) - (get_local $$74) + (i32.store16 + (get_local $$80) + (get_local $$conv229) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8078,20 +8143,20 @@ ) ) (block - (set_local $$conv229 + (set_local $$conv232 (i32.and (get_local $$cnt$1) - (i32.const 65535) + (i32.const 255) ) ) - (set_local $$80 + (set_local $$81 (i32.load (get_local $$arg) ) ) - (i32.store16 - (get_local $$80) - (get_local $$conv229) + (i32.store8 + (get_local $$81) + (get_local $$conv232) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8110,20 +8175,14 @@ ) ) (block - (set_local $$conv232 - (i32.and - (get_local $$cnt$1) - (i32.const 255) - ) - ) - (set_local $$81 + (set_local $$82 (i32.load (get_local $$arg) ) ) - (i32.store8 - (get_local $$81) - (get_local $$conv232) + (i32.store + (get_local $$82) + (get_local $$cnt$1) ) (set_local $$cnt$0 (get_local $$cnt$1) @@ -8142,15 +8201,49 @@ ) ) (block - (set_local $$82 + (set_local $$83 + (i32.lt_s + (get_local $$cnt$1) + (i32.const 0) + ) + ) + (set_local $$84 + (i32.shr_s + (i32.shl + (get_local $$83) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (set_local $$85 (i32.load (get_local $$arg) ) ) + (set_local $$86 + (get_local $$85) + ) + (set_local $$87 + (get_local $$86) + ) (i32.store - (get_local $$82) + (get_local $$87) (get_local $$cnt$1) ) + (set_local $$88 + (i32.add + (get_local $$86) + (i32.const 4) + ) + ) + (set_local $$89 + (get_local $$88) + ) + (i32.store + (get_local $$89) + (get_local $$84) + ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8168,49 +8261,6 @@ ) ) (block - (set_local $$83 - (i32.lt_s - (get_local $$cnt$1) - (i32.const 0) - ) - ) - (set_local $$84 - (i32.shr_s - (i32.shl - (get_local $$83) - (i32.const 31) - ) - (i32.const 31) - ) - ) - (set_local $$85 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$86 - (get_local $$85) - ) - (set_local $$87 - (get_local $$86) - ) - (i32.store - (get_local $$87) - (get_local $$cnt$1) - ) - (set_local $$88 - (i32.add - (get_local $$86) - (i32.const 4) - ) - ) - (set_local $$89 - (get_local $$88) - ) - (i32.store - (get_local $$89) - (get_local $$84) - ) (set_local $$cnt$0 (get_local $$cnt$1) ) @@ -8224,5729 +8274,5763 @@ (get_local $$l10n$3) ) (br $label$continue$L1) - (br $switch$25) - ) - ) - (block - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$sub$ptr$sub) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) ) - (br $label$continue$L1) ) ) + (br $switch$24) ) - (br $switch$24) ) - ) - (block - (set_local $$cmp240 - (i32.gt_u - (get_local $$p$0) - (i32.const 8) + (block + (set_local $$cmp240 + (i32.gt_u + (get_local $$p$0) + (i32.const 8) + ) ) - ) - (set_local $$cond245 - (if - (get_local $$cmp240) - (get_local $$p$0) - (i32.const 8) + (set_local $$cond245 + (if + (get_local $$cmp240) + (get_local $$p$0) + (i32.const 8) + ) ) - ) - (set_local $$or246 - (i32.or - (get_local $$fl$1$and219) - (i32.const 8) + (set_local $$or246 + (i32.or + (get_local $$fl$1$and219) + (i32.const 8) + ) ) + (set_local $$fl$3 + (get_local $$or246) + ) + (set_local $$p$1 + (get_local $$cond245) + ) + (set_local $$t$1 + (i32.const 120) + ) + (set_local $label + (i32.const 64) + ) + (br $switch$24) ) - (set_local $$fl$3 - (get_local $$or246) - ) - (set_local $$p$1 - (get_local $$cond245) - ) - (set_local $$t$1 - (i32.const 120) - ) - (set_local $label - (i32.const 64) - ) - (br $switch$24) ) + (nop) ) - (nop) - ) - (block - (set_local $$fl$3 - (get_local $$fl$1$and219) - ) - (set_local $$p$1 - (get_local $$p$0) - ) - (set_local $$t$1 - (get_local $$t$0) - ) - (set_local $label - (i32.const 64) + (block + (set_local $$fl$3 + (get_local $$fl$1$and219) + ) + (set_local $$p$1 + (get_local $$p$0) + ) + (set_local $$t$1 + (get_local $$t$0) + ) + (set_local $label + (i32.const 64) + ) + (br $switch$24) ) - (br $switch$24) - ) - ) - (block - (set_local $$116 - (get_local $$arg) ) - (set_local $$117 - (get_local $$116) - ) - (set_local $$118 - (i32.load - (get_local $$117) + (block + (set_local $$116 + (get_local $$arg) ) - ) - (set_local $$119 - (i32.add + (set_local $$117 (get_local $$116) - (i32.const 4) - ) - ) - (set_local $$120 - (get_local $$119) - ) - (set_local $$121 - (i32.load - (get_local $$120) ) - ) - (set_local $$122 - (i32.eq - (get_local $$118) - (i32.const 0) + (set_local $$118 + (i32.load + (get_local $$117) + ) ) - ) - (set_local $$123 - (i32.eq - (get_local $$121) - (i32.const 0) + (set_local $$119 + (i32.add + (get_local $$116) + (i32.const 4) + ) ) - ) - (set_local $$124 - (i32.and - (get_local $$122) - (get_local $$123) + (set_local $$120 + (get_local $$119) ) - ) - (if - (get_local $$124) - (set_local $$s$addr$0$lcssa$i$229 - (get_local $$add$ptr205) + (set_local $$121 + (i32.load + (get_local $$120) + ) ) - (block - (set_local $$126 + (set_local $$122 + (i32.eq (get_local $$118) + (i32.const 0) ) - (set_local $$129 + ) + (set_local $$123 + (i32.eq (get_local $$121) + (i32.const 0) + ) + ) + (set_local $$124 + (i32.and + (get_local $$122) + (get_local $$123) ) - (set_local $$s$addr$06$i$221 + ) + (if + (get_local $$124) + (set_local $$s$addr$0$lcssa$i$229 (get_local $$add$ptr205) ) - (loop $while-out$38 $while-in$39 - (set_local $$125 - (i32.and - (get_local $$126) - (i32.const 7) - ) - ) - (set_local $$127 - (i32.or - (get_local $$125) - (i32.const 48) - ) - ) - (set_local $$128 - (i32.and - (get_local $$127) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr$i$225 - (i32.add - (get_local $$s$addr$06$i$221) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr$i$225) - (get_local $$128) - ) - (set_local $$130 - (call $_bitshift64Lshr - (get_local $$126) - (get_local $$129) - (i32.const 3) - ) - ) - (set_local $$131 - (i32.load - (i32.const 168) - ) - ) - (set_local $$132 - (i32.eq - (get_local $$130) - (i32.const 0) - ) + (block + (set_local $$126 + (get_local $$118) ) - (set_local $$133 - (i32.eq - (get_local $$131) - (i32.const 0) - ) + (set_local $$129 + (get_local $$121) ) - (set_local $$134 - (i32.and - (get_local $$132) - (get_local $$133) - ) + (set_local $$s$addr$06$i$221 + (get_local $$add$ptr205) ) - (if - (get_local $$134) - (block - (set_local $$s$addr$0$lcssa$i$229 - (get_local $$incdec$ptr$i$225) + (loop $while-in$39 + (block $while-out$38 + (set_local $$125 + (i32.and + (get_local $$126) + (i32.const 7) + ) ) - (br $while-out$38) - ) - (block - (set_local $$126 - (get_local $$130) + (set_local $$127 + (i32.or + (get_local $$125) + (i32.const 48) + ) + ) + (set_local $$128 + (i32.and + (get_local $$127) + (i32.const 255) + ) ) - (set_local $$129 - (get_local $$131) + (set_local $$incdec$ptr$i$225 + (i32.add + (get_local $$s$addr$06$i$221) + (i32.const -1) + ) ) - (set_local $$s$addr$06$i$221 + (i32.store8 (get_local $$incdec$ptr$i$225) + (get_local $$128) + ) + (set_local $$130 + (call $_bitshift64Lshr + (get_local $$126) + (get_local $$129) + (i32.const 3) + ) + ) + (set_local $$131 + (i32.load + (i32.const 168) + ) + ) + (set_local $$132 + (i32.eq + (get_local $$130) + (i32.const 0) + ) + ) + (set_local $$133 + (i32.eq + (get_local $$131) + (i32.const 0) + ) ) + (set_local $$134 + (i32.and + (get_local $$132) + (get_local $$133) + ) + ) + (if + (get_local $$134) + (block + (set_local $$s$addr$0$lcssa$i$229 + (get_local $$incdec$ptr$i$225) + ) + (br $while-out$38) + ) + (block + (set_local $$126 + (get_local $$130) + ) + (set_local $$129 + (get_local $$131) + ) + (set_local $$s$addr$06$i$221 + (get_local $$incdec$ptr$i$225) + ) + ) + ) + (br $while-in$39) ) ) - (br $while-in$39) ) ) - ) - (set_local $$and263 - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) - ) - ) - (set_local $$tobool264 - (i32.eq - (get_local $$and263) - (i32.const 0) - ) - ) - (if - (get_local $$tobool264) - (block - (set_local $$a$0 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$fl$4 + (set_local $$and263 + (i32.and (get_local $$fl$1$and219) + (i32.const 8) ) - (set_local $$p$2 - (get_local $$p$0) - ) - (set_local $$pl$1 + ) + (set_local $$tobool264 + (i32.eq + (get_local $$and263) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) - ) ) - (block - (set_local $$sub$ptr$rhs$cast267 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$sub$ptr$sub268 - (i32.sub - (get_local $$sub$ptr$lhs$cast317) - (get_local $$sub$ptr$rhs$cast267) + (if + (get_local $$tobool264) + (block + (set_local $$a$0 + (get_local $$s$addr$0$lcssa$i$229) ) - ) - (set_local $$add269 - (i32.add - (get_local $$sub$ptr$sub268) - (i32.const 1) + (set_local $$fl$4 + (get_local $$fl$1$and219) ) - ) - (set_local $$cmp270 - (i32.lt_s + (set_local $$p$2 (get_local $$p$0) - (get_local $$add269) ) - ) - (set_local $$add269$p$0 - (if - (get_local $$cmp270) - (get_local $$add269) - (get_local $$p$0) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 + (i32.const 4091) + ) + (set_local $label + (i32.const 77) ) ) - (set_local $$a$0 - (get_local $$s$addr$0$lcssa$i$229) - ) - (set_local $$fl$4 - (get_local $$fl$1$and219) - ) - (set_local $$p$2 - (get_local $$add269$p$0) - ) - (set_local $$pl$1 - (i32.const 0) - ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) + (block + (set_local $$sub$ptr$rhs$cast267 + (get_local $$s$addr$0$lcssa$i$229) + ) + (set_local $$sub$ptr$sub268 + (i32.sub + (get_local $$sub$ptr$lhs$cast317) + (get_local $$sub$ptr$rhs$cast267) + ) + ) + (set_local $$add269 + (i32.add + (get_local $$sub$ptr$sub268) + (i32.const 1) + ) + ) + (set_local $$cmp270 + (i32.lt_s + (get_local $$p$0) + (get_local $$add269) + ) + ) + (set_local $$add269$p$0 + (if + (get_local $$cmp270) + (get_local $$add269) + (get_local $$p$0) + ) + ) + (set_local $$a$0 + (get_local $$s$addr$0$lcssa$i$229) + ) + (set_local $$fl$4 + (get_local $$fl$1$and219) + ) + (set_local $$p$2 + (get_local $$add269$p$0) + ) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 + (i32.const 4091) + ) + (set_local $label + (i32.const 77) + ) ) ) + (br $switch$24) ) - (br $switch$24) ) + (nop) ) - (nop) - ) - (block - (set_local $$135 - (get_local $$arg) - ) - (set_local $$136 - (get_local $$135) - ) - (set_local $$137 - (i32.load - (get_local $$136) + (block + (set_local $$135 + (get_local $$arg) ) - ) - (set_local $$138 - (i32.add + (set_local $$136 (get_local $$135) - (i32.const 4) ) - ) - (set_local $$139 - (get_local $$138) - ) - (set_local $$140 - (i32.load - (get_local $$139) - ) - ) - (set_local $$141 - (i32.lt_s - (get_local $$140) - (i32.const 0) - ) - ) - (if - (get_local $$141) - (block - (set_local $$142 - (call $_i64Subtract - (i32.const 0) - (i32.const 0) - (get_local $$137) - (get_local $$140) - ) - ) - (set_local $$143 - (i32.load - (i32.const 168) - ) + (set_local $$137 + (i32.load + (get_local $$136) ) - (set_local $$144 - (get_local $$arg) + ) + (set_local $$138 + (i32.add + (get_local $$135) + (i32.const 4) ) - (set_local $$145 - (get_local $$144) + ) + (set_local $$139 + (get_local $$138) + ) + (set_local $$140 + (i32.load + (get_local $$139) ) - (i32.store - (get_local $$145) - (get_local $$142) + ) + (set_local $$141 + (i32.lt_s + (get_local $$140) + (i32.const 0) ) - (set_local $$146 - (i32.add + ) + (if + (get_local $$141) + (block + (set_local $$142 + (call $_i64Subtract + (i32.const 0) + (i32.const 0) + (get_local $$137) + (get_local $$140) + ) + ) + (set_local $$143 + (i32.load + (i32.const 168) + ) + ) + (set_local $$144 + (get_local $$arg) + ) + (set_local $$145 (get_local $$144) - (i32.const 4) ) + (i32.store + (get_local $$145) + (get_local $$142) + ) + (set_local $$146 + (i32.add + (get_local $$144) + (i32.const 4) + ) + ) + (set_local $$147 + (get_local $$146) + ) + (i32.store + (get_local $$147) + (get_local $$143) + ) + (set_local $$148 + (get_local $$142) + ) + (set_local $$149 + (get_local $$143) + ) + (set_local $$pl$0 + (i32.const 1) + ) + (set_local $$prefix$0 + (i32.const 4091) + ) + (set_local $label + (i32.const 76) + ) + (br $label$break$L75) ) - (set_local $$147 - (get_local $$146) - ) - (i32.store - (get_local $$147) - (get_local $$143) - ) - (set_local $$148 - (get_local $$142) - ) - (set_local $$149 - (get_local $$143) - ) - (set_local $$pl$0 - (i32.const 1) - ) - (set_local $$prefix$0 - (i32.const 4091) - ) - (set_local $label - (i32.const 76) - ) - (br $label$break$L75) ) - ) - (set_local $$and289 - (i32.and - (get_local $$fl$1$and219) - (i32.const 2048) + (set_local $$and289 + (i32.and + (get_local $$fl$1$and219) + (i32.const 2048) + ) ) - ) - (set_local $$tobool290 - (i32.eq - (get_local $$and289) - (i32.const 0) + (set_local $$tobool290 + (i32.eq + (get_local $$and289) + (i32.const 0) + ) ) - ) - (if - (get_local $$tobool290) - (block - (set_local $$and294 - (i32.and - (get_local $$fl$1$and219) - (i32.const 1) + (if + (get_local $$tobool290) + (block + (set_local $$and294 + (i32.and + (get_local $$fl$1$and219) + (i32.const 1) + ) ) - ) - (set_local $$tobool295 - (i32.eq + (set_local $$tobool295 + (i32.eq + (get_local $$and294) + (i32.const 0) + ) + ) + (set_local $$$ + (if + (get_local $$tobool295) + (i32.const 4091) + (i32.const 4093) + ) + ) + (set_local $$148 + (get_local $$137) + ) + (set_local $$149 + (get_local $$140) + ) + (set_local $$pl$0 (get_local $$and294) - (i32.const 0) ) - ) - (set_local $$$ - (if - (get_local $$tobool295) - (i32.const 4091) - (i32.const 4093) + (set_local $$prefix$0 + (get_local $$$) + ) + (set_local $label + (i32.const 76) ) ) - (set_local $$148 - (get_local $$137) - ) - (set_local $$149 - (get_local $$140) - ) - (set_local $$pl$0 - (get_local $$and294) - ) - (set_local $$prefix$0 - (get_local $$$) - ) - (set_local $label - (i32.const 76) + (block + (set_local $$148 + (get_local $$137) + ) + (set_local $$149 + (get_local $$140) + ) + (set_local $$pl$0 + (i32.const 1) + ) + (set_local $$prefix$0 + (i32.const 4092) + ) + (set_local $label + (i32.const 76) + ) ) ) - (block - (set_local $$148 - (get_local $$137) - ) - (set_local $$149 - (get_local $$140) - ) - (set_local $$pl$0 - (i32.const 1) - ) - (set_local $$prefix$0 - (i32.const 4092) - ) - (set_local $label - (i32.const 76) - ) + (br $switch$24) + ) + ) + (block + (set_local $$65 + (get_local $$arg) + ) + (set_local $$66 + (get_local $$65) + ) + (set_local $$67 + (i32.load + (get_local $$66) + ) + ) + (set_local $$68 + (i32.add + (get_local $$65) + (i32.const 4) + ) + ) + (set_local $$69 + (get_local $$68) + ) + (set_local $$70 + (i32.load + (get_local $$69) ) ) + (set_local $$148 + (get_local $$67) + ) + (set_local $$149 + (get_local $$70) + ) + (set_local $$pl$0 + (i32.const 0) + ) + (set_local $$prefix$0 + (i32.const 4091) + ) + (set_local $label + (i32.const 76) + ) (br $switch$24) ) ) (block - (set_local $$65 + (set_local $$161 (get_local $$arg) ) - (set_local $$66 - (get_local $$65) + (set_local $$162 + (get_local $$161) ) - (set_local $$67 + (set_local $$163 (i32.load - (get_local $$66) + (get_local $$162) ) ) - (set_local $$68 + (set_local $$164 (i32.add - (get_local $$65) + (get_local $$161) (i32.const 4) ) ) - (set_local $$69 - (get_local $$68) + (set_local $$165 + (get_local $$164) ) - (set_local $$70 + (set_local $$166 (i32.load - (get_local $$69) + (get_local $$165) + ) + ) + (set_local $$167 + (i32.and + (get_local $$163) + (i32.const 255) ) ) - (set_local $$148 - (get_local $$67) + (i32.store8 + (get_local $$add$ptr340) + (get_local $$167) + ) + (set_local $$a$2 + (get_local $$add$ptr340) ) - (set_local $$149 - (get_local $$70) + (set_local $$fl$6 + (get_local $$and219) + ) + (set_local $$p$5 + (i32.const 1) ) - (set_local $$pl$0 + (set_local $$pl$2 (i32.const 0) ) - (set_local $$prefix$0 + (set_local $$prefix$2 (i32.const 4091) ) - (set_local $label - (i32.const 76) + (set_local $$z$2 + (get_local $$add$ptr205) ) (br $switch$24) ) ) (block - (set_local $$161 - (get_local $$arg) - ) - (set_local $$162 - (get_local $$161) - ) - (set_local $$163 - (i32.load - (get_local $$162) - ) - ) - (set_local $$164 - (i32.add - (get_local $$161) - (i32.const 4) - ) - ) - (set_local $$165 - (get_local $$164) + (set_local $$call344 + (call $___errno_location) ) - (set_local $$166 + (set_local $$168 (i32.load - (get_local $$165) - ) - ) - (set_local $$167 - (i32.and - (get_local $$163) - (i32.const 255) - ) - ) - (i32.store8 - (get_local $$add$ptr340) - (get_local $$167) - ) - (set_local $$a$2 - (get_local $$add$ptr340) - ) - (set_local $$fl$6 - (get_local $$and219) - ) - (set_local $$p$5 - (i32.const 1) - ) - (set_local $$pl$2 - (i32.const 0) - ) - (set_local $$prefix$2 - (i32.const 4091) - ) - (set_local $$z$2 - (get_local $$add$ptr205) - ) - (br $switch$24) - ) - ) - (block - (set_local $$call344 - (call $___errno_location) - ) - (set_local $$168 - (i32.load - (get_local $$call344) - ) - ) - (set_local $$call345 - (call $_strerror - (get_local $$168) - ) - ) - (set_local $$a$1 - (get_local $$call345) - ) - (set_local $label - (i32.const 82) - ) - (br $switch$24) - ) - ) - (block - (set_local $$169 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$tobool349 - (i32.ne - (get_local $$169) - (i32.const 0) - ) - ) - (set_local $$cond354 - (if - (get_local $$tobool349) - (get_local $$169) - (i32.const 4101) - ) - ) - (set_local $$a$1 - (get_local $$cond354) - ) - (set_local $label - (i32.const 82) - ) - (br $switch$24) - ) - ) - (block - (set_local $$170 - (get_local $$arg) - ) - (set_local $$171 - (get_local $$170) - ) - (set_local $$172 - (i32.load - (get_local $$171) - ) - ) - (set_local $$173 - (i32.add - (get_local $$170) - (i32.const 4) - ) - ) - (set_local $$174 - (get_local $$173) - ) - (set_local $$175 - (i32.load - (get_local $$174) - ) - ) - (i32.store - (get_local $$wc) - (get_local $$172) - ) - (i32.store - (get_local $$arrayidx370) - (i32.const 0) - ) - (i32.store - (get_local $$arg) - (get_local $$wc) - ) - (set_local $$p$4365 - (i32.const -1) - ) - (set_local $label - (i32.const 86) - ) - (br $switch$24) - ) - ) - (block - (set_local $$cmp377$314 - (i32.eq - (get_local $$p$0) - (i32.const 0) - ) - ) - (if - (get_local $$cmp377$314) - (block - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (i32.const 0) - (get_local $$fl$1$and219) - ) - (set_local $$i$0$lcssa368 - (i32.const 0) - ) - (set_local $label - (i32.const 98) - ) - ) - (block - (set_local $$p$4365 - (get_local $$p$0) - ) - (set_local $label - (i32.const 86) - ) - ) - ) - (br $switch$24) - ) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (nop) - ) - (block - (set_local $$181 - (f64.load - (get_local $$arg) - ) - ) - (i32.store - (get_local $$e2$i) - (i32.const 0) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $$181) - ) - (set_local $$182 - (i32.load - (i32.load - (i32.const 24) - ) - ) - ) - (set_local $$183 - (i32.load - (i32.add - (i32.load - (i32.const 24) - ) - (i32.const 4) - ) - ) - ) - (set_local $$184 - (i32.lt_s - (get_local $$183) - (i32.const 0) - ) - ) - (if - (get_local $$184) - (block - (set_local $$sub$i - (f64.neg - (get_local $$181) - ) - ) - (set_local $$pl$0$i - (i32.const 1) - ) - (set_local $$prefix$0$i - (i32.const 4108) - ) - (set_local $$y$addr$0$i - (get_local $$sub$i) - ) - ) - (block - (set_local $$and$i$238 - (i32.and - (get_local $$fl$1$and219) - (i32.const 2048) - ) - ) - (set_local $$tobool9$i - (i32.eq - (get_local $$and$i$238) - (i32.const 0) - ) - ) - (if - (get_local $$tobool9$i) - (block - (set_local $$and12$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 1) - ) - ) - (set_local $$tobool13$i - (i32.eq - (get_local $$and12$i) - (i32.const 0) - ) - ) - (set_local $$$$i - (if - (get_local $$tobool13$i) - (i32.const 4109) - (i32.const 4114) - ) - ) - (set_local $$pl$0$i - (get_local $$and12$i) - ) - (set_local $$prefix$0$i - (get_local $$$$i) - ) - (set_local $$y$addr$0$i - (get_local $$181) - ) - ) - (block - (set_local $$pl$0$i - (i32.const 1) - ) - (set_local $$prefix$0$i - (i32.const 4111) - ) - (set_local $$y$addr$0$i - (get_local $$181) - ) - ) - ) - ) - ) - (f64.store - (i32.load - (i32.const 24) - ) - (get_local $$y$addr$0$i) - ) - (set_local $$185 - (i32.load - (i32.load - (i32.const 24) - ) - ) - ) - (set_local $$186 - (i32.load - (i32.add - (i32.load - (i32.const 24) - ) - (i32.const 4) - ) - ) - ) - (set_local $$187 - (i32.and - (get_local $$186) - (i32.const 2146435072) - ) - ) - (set_local $$188 - (i32.lt_u - (get_local $$187) - (i32.const 2146435072) - ) - ) - (set_local $$189 - (i32.lt_s - (i32.const 0) - (i32.const 0) - ) - ) - (set_local $$190 - (i32.eq - (get_local $$187) - (i32.const 2146435072) - ) - ) - (set_local $$191 - (i32.and - (get_local $$190) - (get_local $$189) - ) - ) - (set_local $$192 - (i32.or - (get_local $$188) - (get_local $$191) - ) - ) - (block $do-once$56 - (if - (get_local $$192) - (block - (set_local $$call55$i - (call $_frexpl - (get_local $$y$addr$0$i) - (get_local $$e2$i) - ) - ) - (set_local $$mul$i$240 - (f64.mul - (get_local $$call55$i) - (f64.const 2) - ) - ) - (set_local $$tobool56$i - (f64.ne - (get_local $$mul$i$240) - (f64.const 0) - ) - ) - (if - (get_local $$tobool56$i) - (block - (set_local $$195 - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$dec$i - (i32.add - (get_local $$195) - (i32.const -1) - ) - ) - (i32.store - (get_local $$e2$i) - (get_local $$dec$i) - ) - ) - ) - (set_local $$or$i$241 - (i32.or - (get_local $$t$0) - (i32.const 32) - ) - ) - (set_local $$cmp59$i - (i32.eq - (get_local $$or$i$241) - (i32.const 97) - ) - ) - (if - (get_local $$cmp59$i) - (block - (set_local $$and62$i - (i32.and - (get_local $$t$0) - (i32.const 32) - ) - ) - (set_local $$tobool63$i - (i32.eq - (get_local $$and62$i) - (i32.const 0) - ) - ) - (set_local $$add$ptr65$i - (i32.add - (get_local $$prefix$0$i) - (i32.const 9) - ) - ) - (set_local $$prefix$0$add$ptr65$i - (if - (get_local $$tobool63$i) - (get_local $$prefix$0$i) - (get_local $$add$ptr65$i) - ) - ) - (set_local $$add67$i - (i32.or - (get_local $$pl$0$i) - (i32.const 2) - ) - ) - (set_local $$196 - (i32.gt_u - (get_local $$p$0) - (i32.const 11) - ) - ) - (set_local $$sub74$i - (i32.sub - (i32.const 12) - (get_local $$p$0) - ) - ) - (set_local $$tobool76552$i - (i32.eq - (get_local $$sub74$i) - (i32.const 0) - ) - ) - (set_local $$tobool76$i - (i32.or - (get_local $$196) - (get_local $$tobool76552$i) - ) - ) - (block $do-once$58 - (if - (get_local $$tobool76$i) - (set_local $$y$addr$1$i - (get_local $$mul$i$240) - ) - (block - (set_local $$re$1482$i - (get_local $$sub74$i) - ) - (set_local $$round$0481$i - (f64.const 8) - ) - (loop $while-out$60 $while-in$61 - (set_local $$dec78$i - (i32.add - (get_local $$re$1482$i) - (i32.const -1) - ) - ) - (set_local $$mul80$i - (f64.mul - (get_local $$round$0481$i) - (f64.const 16) - ) - ) - (set_local $$tobool79$i - (i32.eq - (get_local $$dec78$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool79$i) - (block - (set_local $$mul80$i$lcssa - (get_local $$mul80$i) - ) - (br $while-out$60) - ) - (block - (set_local $$re$1482$i - (get_local $$dec78$i) - ) - (set_local $$round$0481$i - (get_local $$mul80$i) - ) - ) - ) - (br $while-in$61) - ) - (set_local $$197 - (i32.load8_s - (get_local $$prefix$0$add$ptr65$i) - ) - ) - (set_local $$cmp82$i - (i32.eq - (i32.shr_s - (i32.shl - (get_local $$197) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 45) - ) - ) - (if - (get_local $$cmp82$i) - (block - (set_local $$sub85$i - (f64.neg - (get_local $$mul$i$240) - ) - ) - (set_local $$sub86$i - (f64.sub - (get_local $$sub85$i) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$add87$i - (f64.add - (get_local $$mul80$i$lcssa) - (get_local $$sub86$i) - ) - ) - (set_local $$sub88$i - (f64.neg - (get_local $$add87$i) - ) - ) - (set_local $$y$addr$1$i - (get_local $$sub88$i) - ) - (br $do-once$58) - ) - (block - (set_local $$add90$i - (f64.add - (get_local $$mul$i$240) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$sub91$i - (f64.sub - (get_local $$add90$i) - (get_local $$mul80$i$lcssa) - ) - ) - (set_local $$y$addr$1$i - (get_local $$sub91$i) - ) - (br $do-once$58) - ) - ) - ) - ) - ) - (set_local $$198 - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$cmp94$i - (i32.lt_s - (get_local $$198) - (i32.const 0) - ) - ) - (set_local $$sub97$i - (i32.sub - (i32.const 0) - (get_local $$198) - ) - ) - (set_local $$cond100$i - (if - (get_local $$cmp94$i) - (get_local $$sub97$i) - (get_local $$198) - ) - ) - (set_local $$199 - (i32.lt_s - (get_local $$cond100$i) - (i32.const 0) - ) - ) - (set_local $$200 - (i32.shr_s - (i32.shl - (get_local $$199) - (i32.const 31) - ) - (i32.const 31) - ) - ) - (set_local $$201 - (call $_fmt_u - (get_local $$cond100$i) - (get_local $$200) - (get_local $$arrayidx$i$236) - ) - ) - (set_local $$cmp103$i - (i32.eq - (get_local $$201) - (get_local $$arrayidx$i$236) - ) - ) - (if - (get_local $$cmp103$i) - (block - (i32.store8 - (get_local $$incdec$ptr106$i) - (i32.const 48) - ) - (set_local $$estr$0$i - (get_local $$incdec$ptr106$i) - ) - ) - (set_local $$estr$0$i - (get_local $$201) - ) - ) - (set_local $$202 - (i32.shr_s - (get_local $$198) - (i32.const 31) - ) - ) - (set_local $$203 - (i32.and - (get_local $$202) - (i32.const 2) - ) - ) - (set_local $$204 - (i32.add - (get_local $$203) - (i32.const 43) - ) - ) - (set_local $$conv111$i - (i32.and - (get_local $$204) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr112$i - (i32.add - (get_local $$estr$0$i) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr112$i) - (get_local $$conv111$i) - ) - (set_local $$add113$i - (i32.add - (get_local $$t$0) - (i32.const 15) - ) - ) - (set_local $$conv114$i - (i32.and - (get_local $$add113$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr115$i - (i32.add - (get_local $$estr$0$i) - (i32.const -2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr115$i) - (get_local $$conv114$i) - ) - (set_local $$notrhs$i - (i32.lt_s - (get_local $$p$0) - (i32.const 1) - ) - ) - (set_local $$and134$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) - ) - ) - (set_local $$tobool135$i - (i32.eq - (get_local $$and134$i) - (i32.const 0) - ) - ) - (set_local $$s$0$i - (get_local $$buf$i) - ) - (set_local $$y$addr$2$i - (get_local $$y$addr$1$i) - ) - (loop $while-out$62 $while-in$63 - (set_local $$conv116$i - (call_import $f64-to-int - (get_local $$y$addr$2$i) - ) - ) - (set_local $$arrayidx117$i - (i32.add - (i32.const 4075) - (get_local $$conv116$i) - ) - ) - (set_local $$205 - (i32.load8_s - (get_local $$arrayidx117$i) - ) - ) - (set_local $$conv118$393$i - (i32.and - (get_local $$205) - (i32.const 255) - ) - ) - (set_local $$or120$i - (i32.or - (get_local $$conv118$393$i) - (get_local $$and62$i) - ) - ) - (set_local $$conv121$i - (i32.and - (get_local $$or120$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr122$i - (i32.add - (get_local $$s$0$i) - (i32.const 1) - ) - ) - (i32.store8 - (get_local $$s$0$i) - (get_local $$conv121$i) - ) - (set_local $$conv123$i - (f64.convert_s/i32 - (get_local $$conv116$i) - ) - ) - (set_local $$sub124$i - (f64.sub - (get_local $$y$addr$2$i) - (get_local $$conv123$i) - ) - ) - (set_local $$mul125$i - (f64.mul - (get_local $$sub124$i) - (f64.const 16) - ) - ) - (set_local $$sub$ptr$lhs$cast$i - (get_local $$incdec$ptr122$i) - ) - (set_local $$sub$ptr$sub$i - (i32.sub - (get_local $$sub$ptr$lhs$cast$i) - (get_local $$sub$ptr$rhs$cast$i) - ) - ) - (set_local $$cmp127$i - (i32.eq - (get_local $$sub$ptr$sub$i) - (i32.const 1) - ) - ) - (block $do-once$64 - (if - (get_local $$cmp127$i) - (block - (set_local $$notlhs$i - (f64.eq - (get_local $$mul125$i) - (f64.const 0) - ) - ) - (set_local $$or$cond1$not$i - (i32.and - (get_local $$notrhs$i) - (get_local $$notlhs$i) - ) - ) - (set_local $$or$cond$i - (i32.and - (get_local $$tobool135$i) - (get_local $$or$cond1$not$i) - ) - ) - (if - (get_local $$or$cond$i) - (block - (set_local $$s$1$i - (get_local $$incdec$ptr122$i) - ) - (br $do-once$64) - ) - ) - (set_local $$incdec$ptr137$i - (i32.add - (get_local $$s$0$i) - (i32.const 2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr122$i) - (i32.const 46) - ) - (set_local $$s$1$i - (get_local $$incdec$ptr137$i) - ) - ) - (set_local $$s$1$i - (get_local $$incdec$ptr122$i) - ) - ) - ) - (set_local $$tobool139$i - (f64.ne - (get_local $$mul125$i) - (f64.const 0) - ) - ) - (if - (get_local $$tobool139$i) - (block - (set_local $$s$0$i - (get_local $$s$1$i) - ) - (set_local $$y$addr$2$i - (get_local $$mul125$i) - ) - ) - (block - (set_local $$s$1$i$lcssa - (get_local $$s$1$i) - ) - (br $while-out$62) - ) - ) - (br $while-in$63) - ) - (set_local $$tobool140$i - (i32.ne - (get_local $$p$0) - (i32.const 0) - ) - ) - (set_local $$$pre566$i - (get_local $$s$1$i$lcssa) - ) - (set_local $$sub146$i - (i32.add - (get_local $$sub$ptr$sub145$i) - (get_local $$$pre566$i) - ) - ) - (set_local $$cmp147$i - (i32.lt_s - (get_local $$sub146$i) - (get_local $$p$0) - ) - ) - (set_local $$or$cond384 - (i32.and - (get_local $$tobool140$i) - (get_local $$cmp147$i) - ) - ) - (set_local $$sub$ptr$rhs$cast152$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$add150$i - (i32.add - (get_local $$sub$ptr$sub153$i) - (get_local $$p$0) - ) - ) - (set_local $$add154$i - (i32.sub - (get_local $$add150$i) - (get_local $$sub$ptr$rhs$cast152$i) - ) - ) - (set_local $$sub$ptr$rhs$cast161$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$sub$ptr$sub162$i - (i32.sub - (get_local $$sub$ptr$sub159$i) - (get_local $$sub$ptr$rhs$cast161$i) - ) - ) - (set_local $$add163$i - (i32.add - (get_local $$sub$ptr$sub162$i) - (get_local $$$pre566$i) - ) - ) - (set_local $$l$0$i - (if - (get_local $$or$cond384) - (get_local $$add154$i) - (get_local $$add163$i) - ) - ) - (set_local $$add165$i - (i32.add - (get_local $$l$0$i) - (get_local $$add67$i) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$fl$1$and219) - ) - (set_local $$206 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$418$i - (i32.and - (get_local $$206) - (i32.const 32) - ) - ) - (set_local $$tobool$i$419$i - (i32.eq - (get_local $$and$i$418$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$419$i) - (call $___fwritex - (get_local $$prefix$0$add$ptr65$i) - (get_local $$add67$i) - (get_local $$f) - ) - ) - (set_local $$xor167$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 65536) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$xor167$i) - ) - (set_local $$sub$ptr$sub172$i - (i32.sub - (get_local $$$pre566$i) - (get_local $$sub$ptr$rhs$cast$i) - ) - ) - (set_local $$207 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$424$i - (i32.and - (get_local $$207) - (i32.const 32) - ) - ) - (set_local $$tobool$i$425$i - (i32.eq - (get_local $$and$i$424$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$425$i) - (call $___fwritex - (get_local $$buf$i) - (get_local $$sub$ptr$sub172$i) - (get_local $$f) - ) - ) - (set_local $$sub$ptr$rhs$cast174$i - (get_local $$incdec$ptr115$i) - ) - (set_local $$sub$ptr$sub175$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast174$i) - ) - ) - (set_local $$sum - (i32.add - (get_local $$sub$ptr$sub172$i) - (get_local $$sub$ptr$sub175$i) - ) - ) - (set_local $$sub181$i - (i32.sub - (get_local $$l$0$i) - (get_local $$sum) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$sub181$i) - (i32.const 0) - (i32.const 0) - ) - (set_local $$208 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$430$i - (i32.and - (get_local $$208) - (i32.const 32) - ) - ) - (set_local $$tobool$i$431$i - (i32.eq - (get_local $$and$i$430$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$431$i) - (call $___fwritex - (get_local $$incdec$ptr115$i) - (get_local $$sub$ptr$sub175$i) - (get_local $$f) - ) - ) - (set_local $$xor186$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add165$i) - (get_local $$xor186$i) - ) - (set_local $$cmp188$i - (i32.lt_s - (get_local $$add165$i) - (get_local $$w$1) - ) - ) - (set_local $$w$add165$i - (if - (get_local $$cmp188$i) - (get_local $$w$1) - (get_local $$add165$i) + (get_local $$call344) + ) + ) + (set_local $$call345 + (call $_strerror + (get_local $$168) + ) + ) + (set_local $$a$1 + (get_local $$call345) + ) + (set_local $label + (i32.const 82) + ) + (br $switch$24) + ) + ) + (block + (set_local $$169 + (i32.load + (get_local $$arg) + ) + ) + (set_local $$tobool349 + (i32.ne + (get_local $$169) + (i32.const 0) + ) + ) + (set_local $$cond354 + (if + (get_local $$tobool349) + (get_local $$169) + (i32.const 4101) + ) + ) + (set_local $$a$1 + (get_local $$cond354) + ) + (set_local $label + (i32.const 82) + ) + (br $switch$24) + ) + ) + (block + (set_local $$170 + (get_local $$arg) + ) + (set_local $$171 + (get_local $$170) + ) + (set_local $$172 + (i32.load + (get_local $$171) + ) + ) + (set_local $$173 + (i32.add + (get_local $$170) + (i32.const 4) + ) + ) + (set_local $$174 + (get_local $$173) + ) + (set_local $$175 + (i32.load + (get_local $$174) + ) + ) + (i32.store + (get_local $$wc) + (get_local $$172) + ) + (i32.store + (get_local $$arrayidx370) + (i32.const 0) + ) + (i32.store + (get_local $$arg) + (get_local $$wc) + ) + (set_local $$p$4365 + (i32.const -1) + ) + (set_local $label + (i32.const 86) + ) + (br $switch$24) + ) + ) + (block + (set_local $$cmp377$314 + (i32.eq + (get_local $$p$0) + (i32.const 0) + ) + ) + (if + (get_local $$cmp377$314) + (block + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (i32.const 0) + (get_local $$fl$1$and219) + ) + (set_local $$i$0$lcssa368 + (i32.const 0) + ) + (set_local $label + (i32.const 98) + ) + ) + (block + (set_local $$p$4365 + (get_local $$p$0) + ) + (set_local $label + (i32.const 86) + ) + ) + ) + (br $switch$24) + ) + ) + (nop) ) + (nop) ) - (set_local $$retval$0$i - (get_local $$w$add165$i) - ) - (br $do-once$56) + (nop) ) + (nop) ) - (set_local $$cmp196$i - (i32.lt_s - (get_local $$p$0) - (i32.const 0) + (nop) + ) + (nop) + ) + (nop) + ) + (block + (set_local $$181 + (f64.load + (get_local $$arg) + ) + ) + (i32.store + (get_local $$e2$i) + (i32.const 0) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $$181) + ) + (set_local $$182 + (i32.load + (i32.load + (i32.const 24) + ) + ) + ) + (set_local $$183 + (i32.load + (i32.add + (i32.load + (i32.const 24) ) + (i32.const 4) ) - (set_local $$$p$i - (if - (get_local $$cmp196$i) - (i32.const 6) - (get_local $$p$0) + ) + ) + (set_local $$184 + (i32.lt_s + (get_local $$183) + (i32.const 0) + ) + ) + (if + (get_local $$184) + (block + (set_local $$sub$i + (f64.neg + (get_local $$181) + ) + ) + (set_local $$pl$0$i + (i32.const 1) + ) + (set_local $$prefix$0$i + (i32.const 4108) + ) + (set_local $$y$addr$0$i + (get_local $$sub$i) + ) + ) + (block + (set_local $$and$i$238 + (i32.and + (get_local $$fl$1$and219) + (i32.const 2048) + ) + ) + (set_local $$tobool9$i + (i32.eq + (get_local $$and$i$238) + (i32.const 0) ) ) (if - (get_local $$tobool56$i) + (get_local $$tobool9$i) (block - (set_local $$mul202$i - (f64.mul - (get_local $$mul$i$240) - (f64.const 268435456) + (set_local $$and12$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 1) ) ) - (set_local $$209 - (i32.load - (get_local $$e2$i) + (set_local $$tobool13$i + (i32.eq + (get_local $$and12$i) + (i32.const 0) ) ) - (set_local $$sub203$i - (i32.add - (get_local $$209) - (i32.const -28) + (set_local $$$$i + (if + (get_local $$tobool13$i) + (i32.const 4109) + (i32.const 4114) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$sub203$i) + (set_local $$pl$0$i + (get_local $$and12$i) ) - (set_local $$210 - (get_local $$sub203$i) + (set_local $$prefix$0$i + (get_local $$$$i) ) - (set_local $$y$addr$3$i - (get_local $$mul202$i) + (set_local $$y$addr$0$i + (get_local $$181) ) ) (block - (set_local $$$pre564$i - (i32.load - (get_local $$e2$i) - ) + (set_local $$pl$0$i + (i32.const 1) ) - (set_local $$210 - (get_local $$$pre564$i) + (set_local $$prefix$0$i + (i32.const 4111) ) - (set_local $$y$addr$3$i - (get_local $$mul$i$240) + (set_local $$y$addr$0$i + (get_local $$181) ) ) ) - (set_local $$cmp205$i - (i32.lt_s - (get_local $$210) - (i32.const 0) - ) + ) + ) + (f64.store + (i32.load + (i32.const 24) + ) + (get_local $$y$addr$0$i) + ) + (set_local $$185 + (i32.load + (i32.load + (i32.const 24) ) - (set_local $$arraydecay208$add$ptr213$i - (if - (get_local $$cmp205$i) - (get_local $$big$i) - (get_local $$add$ptr213$i) + ) + ) + (set_local $$186 + (i32.load + (i32.add + (i32.load + (i32.const 24) ) + (i32.const 4) ) - (set_local $$sub$ptr$rhs$cast345$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (set_local $$y$addr$4$i - (get_local $$y$addr$3$i) - ) - (set_local $$z$0$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (loop $while-out$66 $while-in$67 - (set_local $$conv216$i - (call_import $f64-to-int - (get_local $$y$addr$4$i) - ) - ) - (i32.store - (get_local $$z$0$i) - (get_local $$conv216$i) - ) - (set_local $$incdec$ptr217$i - (i32.add - (get_local $$z$0$i) - (i32.const 4) - ) - ) - (set_local $$conv218$i - (f64.convert_u/i32 - (get_local $$conv216$i) - ) - ) - (set_local $$sub219$i - (f64.sub - (get_local $$y$addr$4$i) - (get_local $$conv218$i) + ) + ) + (set_local $$187 + (i32.and + (get_local $$186) + (i32.const 2146435072) + ) + ) + (set_local $$188 + (i32.lt_u + (get_local $$187) + (i32.const 2146435072) + ) + ) + (set_local $$189 + (i32.lt_s + (i32.const 0) + (i32.const 0) + ) + ) + (set_local $$190 + (i32.eq + (get_local $$187) + (i32.const 2146435072) + ) + ) + (set_local $$191 + (i32.and + (get_local $$190) + (get_local $$189) + ) + ) + (set_local $$192 + (i32.or + (get_local $$188) + (get_local $$191) + ) + ) + (block $do-once$56 + (if + (get_local $$192) + (block + (set_local $$call55$i + (call $_frexpl + (get_local $$y$addr$0$i) + (get_local $$e2$i) ) ) - (set_local $$mul220$i + (set_local $$mul$i$240 (f64.mul - (get_local $$sub219$i) - (f64.const 1e9) + (get_local $$call55$i) + (f64.const 2) ) ) - (set_local $$tobool222$i + (set_local $$tobool56$i (f64.ne - (get_local $$mul220$i) + (get_local $$mul$i$240) (f64.const 0) ) ) (if - (get_local $$tobool222$i) + (get_local $$tobool56$i) (block - (set_local $$y$addr$4$i - (get_local $$mul220$i) + (set_local $$195 + (i32.load + (get_local $$e2$i) + ) ) - (set_local $$z$0$i - (get_local $$incdec$ptr217$i) + (set_local $$dec$i + (i32.add + (get_local $$195) + (i32.const -1) + ) ) - ) - (block - (set_local $$incdec$ptr217$i$lcssa - (get_local $$incdec$ptr217$i) + (i32.store + (get_local $$e2$i) + (get_local $$dec$i) ) - (br $while-out$66) ) ) - (br $while-in$67) - ) - (set_local $$$pr$i - (i32.load - (get_local $$e2$i) - ) - ) - (set_local $$cmp225$547$i - (i32.gt_s - (get_local $$$pr$i) - (i32.const 0) - ) - ) - (if - (get_local $$cmp225$547$i) - (block - (set_local $$211 - (get_local $$$pr$i) - ) - (set_local $$a$1549$i - (get_local $$arraydecay208$add$ptr213$i) + (set_local $$or$i$241 + (i32.or + (get_local $$t$0) + (i32.const 32) ) - (set_local $$z$1548$i - (get_local $$incdec$ptr217$i$lcssa) + ) + (set_local $$cmp59$i + (i32.eq + (get_local $$or$i$241) + (i32.const 97) ) - (loop $while-out$68 $while-in$69 - (set_local $$cmp228$i - (i32.gt_s - (get_local $$211) - (i32.const 29) + ) + (if + (get_local $$cmp59$i) + (block + (set_local $$and62$i + (i32.and + (get_local $$t$0) + (i32.const 32) ) ) - (set_local $$cond233$i - (if - (get_local $$cmp228$i) - (i32.const 29) - (get_local $$211) + (set_local $$tobool63$i + (i32.eq + (get_local $$and62$i) + (i32.const 0) ) ) - (set_local $$d$0$542$i + (set_local $$add$ptr65$i (i32.add - (get_local $$z$1548$i) - (i32.const -4) + (get_local $$prefix$0$i) + (i32.const 9) ) ) - (set_local $$cmp235$543$i - (i32.lt_u - (get_local $$d$0$542$i) - (get_local $$a$1549$i) + (set_local $$prefix$0$add$ptr65$i + (if + (get_local $$tobool63$i) + (get_local $$prefix$0$i) + (get_local $$add$ptr65$i) + ) + ) + (set_local $$add67$i + (i32.or + (get_local $$pl$0$i) + (i32.const 2) ) ) - (block $do-once$70 + (set_local $$196 + (i32.gt_u + (get_local $$p$0) + (i32.const 11) + ) + ) + (set_local $$sub74$i + (i32.sub + (i32.const 12) + (get_local $$p$0) + ) + ) + (set_local $$tobool76552$i + (i32.eq + (get_local $$sub74$i) + (i32.const 0) + ) + ) + (set_local $$tobool76$i + (i32.or + (get_local $$196) + (get_local $$tobool76552$i) + ) + ) + (block $do-once$58 (if - (get_local $$cmp235$543$i) - (set_local $$a$2$ph$i - (get_local $$a$1549$i) + (get_local $$tobool76$i) + (set_local $$y$addr$1$i + (get_local $$mul$i$240) ) (block - (set_local $$carry$0544$i - (i32.const 0) + (set_local $$re$1482$i + (get_local $$sub74$i) ) - (set_local $$d$0545$i - (get_local $$d$0$542$i) + (set_local $$round$0481$i + (f64.const 8) ) - (loop $while-out$72 $while-in$73 - (set_local $$212 - (i32.load - (get_local $$d$0545$i) + (loop $while-in$61 + (block $while-out$60 + (set_local $$dec78$i + (i32.add + (get_local $$re$1482$i) + (i32.const -1) + ) ) - ) - (set_local $$213 - (call $_bitshift64Shl - (get_local $$212) - (i32.const 0) - (get_local $$cond233$i) + (set_local $$mul80$i + (f64.mul + (get_local $$round$0481$i) + (f64.const 16) + ) ) - ) - (set_local $$214 - (i32.load - (i32.const 168) + (set_local $$tobool79$i + (i32.eq + (get_local $$dec78$i) + (i32.const 0) + ) ) - ) - (set_local $$215 - (call $_i64Add - (get_local $$213) - (get_local $$214) - (get_local $$carry$0544$i) - (i32.const 0) + (if + (get_local $$tobool79$i) + (block + (set_local $$mul80$i$lcssa + (get_local $$mul80$i) + ) + (br $while-out$60) + ) + (block + (set_local $$re$1482$i + (get_local $$dec78$i) + ) + (set_local $$round$0481$i + (get_local $$mul80$i) + ) + ) ) + (br $while-in$61) ) - (set_local $$216 - (i32.load - (i32.const 168) - ) + ) + (set_local $$197 + (i32.load8_s + (get_local $$prefix$0$add$ptr65$i) ) - (set_local $$217 - (call $___uremdi3 - (get_local $$215) - (get_local $$216) - (i32.const 1000000000) - (i32.const 0) + ) + (set_local $$cmp82$i + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$197) + (i32.const 24) + ) + (i32.const 24) ) + (i32.const 45) ) - (set_local $$218 - (i32.load - (i32.const 168) + ) + (if + (get_local $$cmp82$i) + (block + (set_local $$sub85$i + (f64.neg + (get_local $$mul$i$240) + ) ) - ) - (i32.store - (get_local $$d$0545$i) - (get_local $$217) - ) - (set_local $$219 - (call $___udivdi3 - (get_local $$215) - (get_local $$216) - (i32.const 1000000000) - (i32.const 0) + (set_local $$sub86$i + (f64.sub + (get_local $$sub85$i) + (get_local $$mul80$i$lcssa) + ) ) - ) - (set_local $$220 - (i32.load - (i32.const 168) + (set_local $$add87$i + (f64.add + (get_local $$mul80$i$lcssa) + (get_local $$sub86$i) + ) ) - ) - (set_local $$d$0$i - (i32.add - (get_local $$d$0545$i) - (i32.const -4) + (set_local $$sub88$i + (f64.neg + (get_local $$add87$i) + ) ) - ) - (set_local $$cmp235$i - (i32.lt_u - (get_local $$d$0$i) - (get_local $$a$1549$i) + (set_local $$y$addr$1$i + (get_local $$sub88$i) ) + (br $do-once$58) ) - (if - (get_local $$cmp235$i) - (block - (set_local $$conv242$i$lcssa - (get_local $$219) + (block + (set_local $$add90$i + (f64.add + (get_local $$mul$i$240) + (get_local $$mul80$i$lcssa) ) - (br $while-out$72) ) - (block - (set_local $$carry$0544$i - (get_local $$219) - ) - (set_local $$d$0545$i - (get_local $$d$0$i) + (set_local $$sub91$i + (f64.sub + (get_local $$add90$i) + (get_local $$mul80$i$lcssa) ) ) - ) - (br $while-in$73) - ) - (set_local $$tobool244$i - (i32.eq - (get_local $$conv242$i$lcssa) - (i32.const 0) - ) - ) - (if - (get_local $$tobool244$i) - (block - (set_local $$a$2$ph$i - (get_local $$a$1549$i) + (set_local $$y$addr$1$i + (get_local $$sub91$i) ) - (br $do-once$70) - ) - ) - (set_local $$incdec$ptr246$i - (i32.add - (get_local $$a$1549$i) - (i32.const -4) + (br $do-once$58) ) ) - (i32.store - (get_local $$incdec$ptr246$i) - (get_local $$conv242$i$lcssa) - ) - (set_local $$a$2$ph$i - (get_local $$incdec$ptr246$i) - ) ) ) ) - (set_local $$z$2$i - (get_local $$z$1548$i) - ) - (loop $while-out$74 $while-in$75 - (set_local $$cmp249$i - (i32.gt_u - (get_local $$z$2$i) - (get_local $$a$2$ph$i) - ) - ) - (if - (i32.eqz - (get_local $$cmp249$i) - ) - (block - (set_local $$z$2$i$lcssa - (get_local $$z$2$i) - ) - (br $while-out$74) - ) - ) - (set_local $$arrayidx251$i - (i32.add - (get_local $$z$2$i) - (i32.const -4) - ) + (set_local $$198 + (i32.load + (get_local $$e2$i) ) - (set_local $$221 - (i32.load - (get_local $$arrayidx251$i) - ) + ) + (set_local $$cmp94$i + (i32.lt_s + (get_local $$198) + (i32.const 0) ) - (set_local $$lnot$i - (i32.eq - (get_local $$221) - (i32.const 0) - ) + ) + (set_local $$sub97$i + (i32.sub + (i32.const 0) + (get_local $$198) ) + ) + (set_local $$cond100$i (if - (get_local $$lnot$i) - (set_local $$z$2$i - (get_local $$arrayidx251$i) - ) - (block - (set_local $$z$2$i$lcssa - (get_local $$z$2$i) - ) - (br $while-out$74) - ) + (get_local $$cmp94$i) + (get_local $$sub97$i) + (get_local $$198) ) - (br $while-in$75) ) - (set_local $$222 - (i32.load - (get_local $$e2$i) + (set_local $$199 + (i32.lt_s + (get_local $$cond100$i) + (i32.const 0) ) ) - (set_local $$sub256$i - (i32.sub - (get_local $$222) - (get_local $$cond233$i) + (set_local $$200 + (i32.shr_s + (i32.shl + (get_local $$199) + (i32.const 31) + ) + (i32.const 31) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$sub256$i) + (set_local $$201 + (call $_fmt_u + (get_local $$cond100$i) + (get_local $$200) + (get_local $$arrayidx$i$236) + ) ) - (set_local $$cmp225$i - (i32.gt_s - (get_local $$sub256$i) - (i32.const 0) + (set_local $$cmp103$i + (i32.eq + (get_local $$201) + (get_local $$arrayidx$i$236) ) ) (if - (get_local $$cmp225$i) + (get_local $$cmp103$i) (block - (set_local $$211 - (get_local $$sub256$i) - ) - (set_local $$a$1549$i - (get_local $$a$2$ph$i) + (i32.store8 + (get_local $$incdec$ptr106$i) + (i32.const 48) ) - (set_local $$z$1548$i - (get_local $$z$2$i$lcssa) + (set_local $$estr$0$i + (get_local $$incdec$ptr106$i) ) ) - (block - (set_local $$$pr477$i - (get_local $$sub256$i) - ) - (set_local $$a$1$lcssa$i - (get_local $$a$2$ph$i) - ) - (set_local $$z$1$lcssa$i - (get_local $$z$2$i$lcssa) - ) - (br $while-out$68) + (set_local $$estr$0$i + (get_local $$201) ) ) - (br $while-in$69) - ) - ) - (block - (set_local $$$pr477$i - (get_local $$$pr$i) - ) - (set_local $$a$1$lcssa$i - (get_local $$arraydecay208$add$ptr213$i) - ) - (set_local $$z$1$lcssa$i - (get_local $$incdec$ptr217$i$lcssa) - ) - ) - ) - (set_local $$cmp259$537$i - (i32.lt_s - (get_local $$$pr477$i) - (i32.const 0) - ) - ) - (if - (get_local $$cmp259$537$i) - (block - (set_local $$add273$i - (i32.add - (get_local $$$p$i) - (i32.const 25) + (set_local $$202 + (i32.shr_s + (get_local $$198) + (i32.const 31) + ) ) - ) - (set_local $$div274$i - (i32.and - (call_import $i32s-div - (get_local $$add273$i) - (i32.const 9) + (set_local $$203 + (i32.and + (get_local $$202) + (i32.const 2) ) - (i32.const -1) ) - ) - (set_local $$add275$i - (i32.add - (get_local $$div274$i) - (i32.const 1) + (set_local $$204 + (i32.add + (get_local $$203) + (i32.const 43) + ) ) - ) - (set_local $$cmp299$i - (i32.eq - (get_local $$or$i$241) - (i32.const 102) + (set_local $$conv111$i + (i32.and + (get_local $$204) + (i32.const 255) + ) ) - ) - (set_local $$223 - (get_local $$$pr477$i) - ) - (set_local $$a$3539$i - (get_local $$a$1$lcssa$i) - ) - (set_local $$z$3538$i - (get_local $$z$1$lcssa$i) - ) - (loop $while-out$76 $while-in$77 - (set_local $$sub264$i - (i32.sub - (i32.const 0) - (get_local $$223) + (set_local $$incdec$ptr112$i + (i32.add + (get_local $$estr$0$i) + (i32.const -1) ) ) - (set_local $$cmp265$i - (i32.gt_s - (get_local $$sub264$i) - (i32.const 9) + (i32.store8 + (get_local $$incdec$ptr112$i) + (get_local $$conv111$i) + ) + (set_local $$add113$i + (i32.add + (get_local $$t$0) + (i32.const 15) ) ) - (set_local $$cond271$i - (if - (get_local $$cmp265$i) - (i32.const 9) - (get_local $$sub264$i) + (set_local $$conv114$i + (i32.and + (get_local $$add113$i) + (i32.const 255) ) ) - (set_local $$cmp277$533$i - (i32.lt_u - (get_local $$a$3539$i) - (get_local $$z$3538$i) + (set_local $$incdec$ptr115$i + (i32.add + (get_local $$estr$0$i) + (i32.const -2) ) ) - (block $do-once$78 - (if - (get_local $$cmp277$533$i) - (block - (set_local $$shl280$i - (i32.shl - (i32.const 1) - (get_local $$cond271$i) - ) + (i32.store8 + (get_local $$incdec$ptr115$i) + (get_local $$conv114$i) + ) + (set_local $$notrhs$i + (i32.lt_s + (get_local $$p$0) + (i32.const 1) + ) + ) + (set_local $$and134$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) + ) + ) + (set_local $$tobool135$i + (i32.eq + (get_local $$and134$i) + (i32.const 0) + ) + ) + (set_local $$s$0$i + (get_local $$buf$i) + ) + (set_local $$y$addr$2$i + (get_local $$y$addr$1$i) + ) + (loop $while-in$63 + (block $while-out$62 + (set_local $$conv116$i + (call_import $f64-to-int + (get_local $$y$addr$2$i) + ) + ) + (set_local $$arrayidx117$i + (i32.add + (i32.const 4075) + (get_local $$conv116$i) + ) + ) + (set_local $$205 + (i32.load8_s + (get_local $$arrayidx117$i) + ) + ) + (set_local $$conv118$393$i + (i32.and + (get_local $$205) + (i32.const 255) + ) + ) + (set_local $$or120$i + (i32.or + (get_local $$conv118$393$i) + (get_local $$and62$i) ) - (set_local $$sub281$i - (i32.add - (get_local $$shl280$i) - (i32.const -1) - ) + ) + (set_local $$conv121$i + (i32.and + (get_local $$or120$i) + (i32.const 255) ) - (set_local $$shr285$i - (i32.shr_u - (i32.const 1000000000) - (get_local $$cond271$i) - ) + ) + (set_local $$incdec$ptr122$i + (i32.add + (get_local $$s$0$i) + (i32.const 1) ) - (set_local $$carry262$0535$i - (i32.const 0) + ) + (i32.store8 + (get_local $$s$0$i) + (get_local $$conv121$i) + ) + (set_local $$conv123$i + (f64.convert_s/i32 + (get_local $$conv116$i) ) - (set_local $$d$1534$i - (get_local $$a$3539$i) + ) + (set_local $$sub124$i + (f64.sub + (get_local $$y$addr$2$i) + (get_local $$conv123$i) ) - (loop $while-out$80 $while-in$81 - (set_local $$225 - (i32.load - (get_local $$d$1534$i) - ) - ) - (set_local $$and282$i - (i32.and - (get_local $$225) - (get_local $$sub281$i) - ) - ) - (set_local $$shr283$i - (i32.shr_u - (get_local $$225) - (get_local $$cond271$i) - ) - ) - (set_local $$add284$i - (i32.add - (get_local $$shr283$i) - (get_local $$carry262$0535$i) - ) - ) - (i32.store - (get_local $$d$1534$i) - (get_local $$add284$i) - ) - (set_local $$mul286$i - (i32.mul - (get_local $$and282$i) - (get_local $$shr285$i) - ) - ) - (set_local $$incdec$ptr288$i - (i32.add - (get_local $$d$1534$i) - (i32.const 4) + ) + (set_local $$mul125$i + (f64.mul + (get_local $$sub124$i) + (f64.const 16) + ) + ) + (set_local $$sub$ptr$lhs$cast$i + (get_local $$incdec$ptr122$i) + ) + (set_local $$sub$ptr$sub$i + (i32.sub + (get_local $$sub$ptr$lhs$cast$i) + (get_local $$sub$ptr$rhs$cast$i) + ) + ) + (set_local $$cmp127$i + (i32.eq + (get_local $$sub$ptr$sub$i) + (i32.const 1) + ) + ) + (block $do-once$64 + (if + (get_local $$cmp127$i) + (block + (set_local $$notlhs$i + (f64.eq + (get_local $$mul125$i) + (f64.const 0) + ) ) - ) - (set_local $$cmp277$i - (i32.lt_u - (get_local $$incdec$ptr288$i) - (get_local $$z$3538$i) + (set_local $$or$cond1$not$i + (i32.and + (get_local $$notrhs$i) + (get_local $$notlhs$i) + ) ) - ) - (if - (get_local $$cmp277$i) - (block - (set_local $$carry262$0535$i - (get_local $$mul286$i) + (set_local $$or$cond$i + (i32.and + (get_local $$tobool135$i) + (get_local $$or$cond1$not$i) ) - (set_local $$d$1534$i - (get_local $$incdec$ptr288$i) + ) + (if + (get_local $$or$cond$i) + (block + (set_local $$s$1$i + (get_local $$incdec$ptr122$i) + ) + (br $do-once$64) ) ) - (block - (set_local $$mul286$i$lcssa - (get_local $$mul286$i) + (set_local $$incdec$ptr137$i + (i32.add + (get_local $$s$0$i) + (i32.const 2) ) - (br $while-out$80) ) - ) - (br $while-in$81) - ) - (set_local $$226 - (i32.load - (get_local $$a$3539$i) - ) - ) - (set_local $$tobool290$i - (i32.eq - (get_local $$226) - (i32.const 0) - ) - ) - (set_local $$incdec$ptr292$i - (i32.add - (get_local $$a$3539$i) - (i32.const 4) - ) - ) - (set_local $$incdec$ptr292$a$3$i - (if - (get_local $$tobool290$i) - (get_local $$incdec$ptr292$i) - (get_local $$a$3539$i) - ) - ) - (set_local $$tobool294$i - (i32.eq - (get_local $$mul286$i$lcssa) - (i32.const 0) - ) - ) - (if - (get_local $$tobool294$i) - (block - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$i) + (i32.store8 + (get_local $$incdec$ptr122$i) + (i32.const 46) ) - (set_local $$z$4$i - (get_local $$z$3538$i) + (set_local $$s$1$i + (get_local $$incdec$ptr137$i) ) - (br $do-once$78) ) - ) - (set_local $$incdec$ptr296$i - (i32.add - (get_local $$z$3538$i) - (i32.const 4) + (set_local $$s$1$i + (get_local $$incdec$ptr122$i) ) ) - (i32.store - (get_local $$z$3538$i) - (get_local $$mul286$i$lcssa) - ) - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$i) - ) - (set_local $$z$4$i - (get_local $$incdec$ptr296$i) - ) ) - (block - (set_local $$224 - (i32.load - (get_local $$a$3539$i) - ) + (set_local $$tobool139$i + (f64.ne + (get_local $$mul125$i) + (f64.const 0) ) - (set_local $$tobool290$569$i - (i32.eq - (get_local $$224) - (i32.const 0) + ) + (if + (get_local $$tobool139$i) + (block + (set_local $$s$0$i + (get_local $$s$1$i) ) - ) - (set_local $$incdec$ptr292$570$i - (i32.add - (get_local $$a$3539$i) - (i32.const 4) + (set_local $$y$addr$2$i + (get_local $$mul125$i) ) ) - (set_local $$incdec$ptr292$a$3$571$i - (if - (get_local $$tobool290$569$i) - (get_local $$incdec$ptr292$570$i) - (get_local $$a$3539$i) + (block + (set_local $$s$1$i$lcssa + (get_local $$s$1$i) ) - ) - (set_local $$incdec$ptr292$a$3573$i - (get_local $$incdec$ptr292$a$3$571$i) - ) - (set_local $$z$4$i - (get_local $$z$3538$i) + (br $while-out$62) ) ) + (br $while-in$63) ) ) - (set_local $$cond304$i - (if - (get_local $$cmp299$i) - (get_local $$arraydecay208$add$ptr213$i) - (get_local $$incdec$ptr292$a$3573$i) + (set_local $$tobool140$i + (i32.ne + (get_local $$p$0) + (i32.const 0) + ) + ) + (set_local $$$pre566$i + (get_local $$s$1$i$lcssa) + ) + (set_local $$sub146$i + (i32.add + (get_local $$sub$ptr$sub145$i) + (get_local $$$pre566$i) ) ) - (set_local $$sub$ptr$lhs$cast305$i - (get_local $$z$4$i) + (set_local $$cmp147$i + (i32.lt_s + (get_local $$sub146$i) + (get_local $$p$0) + ) ) - (set_local $$sub$ptr$rhs$cast306$i - (get_local $$cond304$i) + (set_local $$or$cond384 + (i32.and + (get_local $$tobool140$i) + (get_local $$cmp147$i) + ) ) - (set_local $$sub$ptr$sub307$i - (i32.sub - (get_local $$sub$ptr$lhs$cast305$i) - (get_local $$sub$ptr$rhs$cast306$i) + (set_local $$sub$ptr$rhs$cast152$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$add150$i + (i32.add + (get_local $$sub$ptr$sub153$i) + (get_local $$p$0) ) ) - (set_local $$sub$ptr$div$i - (i32.shr_s - (get_local $$sub$ptr$sub307$i) - (i32.const 2) + (set_local $$add154$i + (i32.sub + (get_local $$add150$i) + (get_local $$sub$ptr$rhs$cast152$i) ) ) - (set_local $$cmp308$i - (i32.gt_s - (get_local $$sub$ptr$div$i) - (get_local $$add275$i) + (set_local $$sub$ptr$rhs$cast161$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$sub$ptr$sub162$i + (i32.sub + (get_local $$sub$ptr$sub159$i) + (get_local $$sub$ptr$rhs$cast161$i) ) ) - (set_local $$add$ptr311$i + (set_local $$add163$i (i32.add - (get_local $$cond304$i) - (i32.shl - (get_local $$add275$i) - (i32.const 2) - ) + (get_local $$sub$ptr$sub162$i) + (get_local $$$pre566$i) ) ) - (set_local $$add$ptr311$z$4$i + (set_local $$l$0$i (if - (get_local $$cmp308$i) - (get_local $$add$ptr311$i) - (get_local $$z$4$i) + (get_local $$or$cond384) + (get_local $$add154$i) + (get_local $$add163$i) ) ) - (set_local $$227 + (set_local $$add165$i + (i32.add + (get_local $$l$0$i) + (get_local $$add67$i) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$fl$1$and219) + ) + (set_local $$206 (i32.load - (get_local $$e2$i) + (get_local $$f) + ) + ) + (set_local $$and$i$418$i + (i32.and + (get_local $$206) + (i32.const 32) + ) + ) + (set_local $$tobool$i$419$i + (i32.eq + (get_local $$and$i$418$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$419$i) + (call $___fwritex + (get_local $$prefix$0$add$ptr65$i) + (get_local $$add67$i) + (get_local $$f) + ) + ) + (set_local $$xor167$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$xor167$i) + ) + (set_local $$sub$ptr$sub172$i + (i32.sub + (get_local $$$pre566$i) + (get_local $$sub$ptr$rhs$cast$i) + ) + ) + (set_local $$207 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$424$i + (i32.and + (get_local $$207) + (i32.const 32) + ) + ) + (set_local $$tobool$i$425$i + (i32.eq + (get_local $$and$i$424$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$425$i) + (call $___fwritex + (get_local $$buf$i) + (get_local $$sub$ptr$sub172$i) + (get_local $$f) + ) + ) + (set_local $$sub$ptr$rhs$cast174$i + (get_local $$incdec$ptr115$i) + ) + (set_local $$sub$ptr$sub175$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast174$i) ) ) - (set_local $$add313$i + (set_local $$sum (i32.add - (get_local $$227) - (get_local $$cond271$i) + (get_local $$sub$ptr$sub172$i) + (get_local $$sub$ptr$sub175$i) ) ) - (i32.store - (get_local $$e2$i) - (get_local $$add313$i) + (set_local $$sub181$i + (i32.sub + (get_local $$l$0$i) + (get_local $$sum) + ) ) - (set_local $$cmp259$i - (i32.lt_s - (get_local $$add313$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$sub181$i) + (i32.const 0) + (i32.const 0) + ) + (set_local $$208 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$430$i + (i32.and + (get_local $$208) + (i32.const 32) + ) + ) + (set_local $$tobool$i$431$i + (i32.eq + (get_local $$and$i$430$i) (i32.const 0) ) ) (if - (get_local $$cmp259$i) - (block - (set_local $$223 - (get_local $$add313$i) - ) - (set_local $$a$3539$i - (get_local $$incdec$ptr292$a$3573$i) - ) - (set_local $$z$3538$i - (get_local $$add$ptr311$z$4$i) - ) + (get_local $$tobool$i$431$i) + (call $___fwritex + (get_local $$incdec$ptr115$i) + (get_local $$sub$ptr$sub175$i) + (get_local $$f) ) - (block - (set_local $$a$3$lcssa$i - (get_local $$incdec$ptr292$a$3573$i) - ) - (set_local $$z$3$lcssa$i - (get_local $$add$ptr311$z$4$i) - ) - (br $while-out$76) + ) + (set_local $$xor186$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) ) ) - (br $while-in$77) - ) - ) - (block - (set_local $$a$3$lcssa$i - (get_local $$a$1$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add165$i) + (get_local $$xor186$i) + ) + (set_local $$cmp188$i + (i32.lt_s + (get_local $$add165$i) + (get_local $$w$1) + ) + ) + (set_local $$w$add165$i + (if + (get_local $$cmp188$i) + (get_local $$w$1) + (get_local $$add165$i) + ) + ) + (set_local $$retval$0$i + (get_local $$w$add165$i) + ) + (br $do-once$56) ) - (set_local $$z$3$lcssa$i - (get_local $$z$1$lcssa$i) + ) + (set_local $$cmp196$i + (i32.lt_s + (get_local $$p$0) + (i32.const 0) ) ) - ) - (set_local $$cmp315$i - (i32.lt_u - (get_local $$a$3$lcssa$i) - (get_local $$z$3$lcssa$i) + (set_local $$$p$i + (if + (get_local $$cmp196$i) + (i32.const 6) + (get_local $$p$0) + ) ) - ) - (block $do-once$82 (if - (get_local $$cmp315$i) + (get_local $$tobool56$i) (block - (set_local $$sub$ptr$rhs$cast319$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$sub$ptr$sub320$i - (i32.sub - (get_local $$sub$ptr$rhs$cast345$i) - (get_local $$sub$ptr$rhs$cast319$i) + (set_local $$mul202$i + (f64.mul + (get_local $$mul$i$240) + (f64.const 268435456) ) ) - (set_local $$sub$ptr$div321$i - (i32.shr_s - (get_local $$sub$ptr$sub320$i) - (i32.const 2) + (set_local $$209 + (i32.load + (get_local $$e2$i) ) ) - (set_local $$mul322$i - (i32.mul - (get_local $$sub$ptr$div321$i) - (i32.const 9) + (set_local $$sub203$i + (i32.add + (get_local $$209) + (i32.const -28) ) ) - (set_local $$228 - (i32.load - (get_local $$a$3$lcssa$i) - ) + (i32.store + (get_local $$e2$i) + (get_local $$sub203$i) ) - (set_local $$cmp324$529$i - (i32.lt_u - (get_local $$228) - (i32.const 10) - ) + (set_local $$210 + (get_local $$sub203$i) ) - (if - (get_local $$cmp324$529$i) - (block - (set_local $$e$1$i - (get_local $$mul322$i) - ) - (br $do-once$82) - ) - (block - (set_local $$e$0531$i - (get_local $$mul322$i) - ) - (set_local $$i$0530$i - (i32.const 10) - ) - ) + (set_local $$y$addr$3$i + (get_local $$mul202$i) ) - (loop $while-out$84 $while-in$85 - (set_local $$mul328$i - (i32.mul - (get_local $$i$0530$i) - (i32.const 10) - ) - ) - (set_local $$inc$i - (i32.add - (get_local $$e$0531$i) - (i32.const 1) - ) - ) - (set_local $$cmp324$i - (i32.lt_u - (get_local $$228) - (get_local $$mul328$i) - ) - ) - (if - (get_local $$cmp324$i) - (block - (set_local $$e$1$i - (get_local $$inc$i) - ) - (br $while-out$84) - ) - (block - (set_local $$e$0531$i - (get_local $$inc$i) - ) - (set_local $$i$0530$i - (get_local $$mul328$i) - ) - ) + ) + (block + (set_local $$$pre564$i + (i32.load + (get_local $$e2$i) ) - (br $while-in$85) + ) + (set_local $$210 + (get_local $$$pre564$i) + ) + (set_local $$y$addr$3$i + (get_local $$mul$i$240) ) ) - (set_local $$e$1$i + ) + (set_local $$cmp205$i + (i32.lt_s + (get_local $$210) (i32.const 0) ) ) - ) - (set_local $$cmp333$i - (i32.ne - (get_local $$or$i$241) - (i32.const 102) - ) - ) - (set_local $$mul335$i - (if - (get_local $$cmp333$i) - (get_local $$e$1$i) - (i32.const 0) - ) - ) - (set_local $$sub336$i - (i32.sub - (get_local $$$p$i) - (get_local $$mul335$i) - ) - ) - (set_local $$cmp338$i - (i32.eq - (get_local $$or$i$241) - (i32.const 103) - ) - ) - (set_local $$tobool341$i - (i32.ne - (get_local $$$p$i) - (i32.const 0) - ) - ) - (set_local $$229 - (i32.and - (get_local $$tobool341$i) - (get_local $$cmp338$i) - ) - ) - (set_local $$land$ext$neg$i - (i32.shr_s - (i32.shl - (get_local $$229) - (i32.const 31) + (set_local $$arraydecay208$add$ptr213$i + (if + (get_local $$cmp205$i) + (get_local $$big$i) + (get_local $$add$ptr213$i) ) - (i32.const 31) - ) - ) - (set_local $$sub343$i - (i32.add - (get_local $$sub336$i) - (get_local $$land$ext$neg$i) ) - ) - (set_local $$sub$ptr$lhs$cast344$i - (get_local $$z$3$lcssa$i) - ) - (set_local $$sub$ptr$sub346$i - (i32.sub - (get_local $$sub$ptr$lhs$cast344$i) - (get_local $$sub$ptr$rhs$cast345$i) - ) - ) - (set_local $$sub$ptr$div347$i - (i32.shr_s - (get_local $$sub$ptr$sub346$i) - (i32.const 2) - ) - ) - (set_local $$230 - (i32.mul - (get_local $$sub$ptr$div347$i) - (i32.const 9) + (set_local $$sub$ptr$rhs$cast345$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (set_local $$mul349$i - (i32.add - (get_local $$230) - (i32.const -9) + (set_local $$y$addr$4$i + (get_local $$y$addr$3$i) ) - ) - (set_local $$cmp350$i - (i32.lt_s - (get_local $$sub343$i) - (get_local $$mul349$i) + (set_local $$z$0$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (if - (get_local $$cmp350$i) - (block - (set_local $$add$ptr354$i - (i32.add - (get_local $$arraydecay208$add$ptr213$i) - (i32.const 4) - ) - ) - (set_local $$add355$i - (i32.add - (get_local $$sub343$i) - (i32.const 9216) - ) - ) - (set_local $$div356$i - (i32.and - (call_import $i32s-div - (get_local $$add355$i) - (i32.const 9) + (loop $while-in$67 + (block $while-out$66 + (set_local $$conv216$i + (call_import $f64-to-int + (get_local $$y$addr$4$i) ) - (i32.const -1) ) - ) - (set_local $$sub357$i - (i32.add - (get_local $$div356$i) - (i32.const -1024) + (i32.store + (get_local $$z$0$i) + (get_local $$conv216$i) ) - ) - (set_local $$add$ptr358$i - (i32.add - (get_local $$add$ptr354$i) - (i32.shl - (get_local $$sub357$i) - (i32.const 2) + (set_local $$incdec$ptr217$i + (i32.add + (get_local $$z$0$i) + (i32.const 4) ) ) - ) - (set_local $$rem360$i - (i32.and - (call_import $i32s-rem - (get_local $$add355$i) - (i32.const 9) + (set_local $$conv218$i + (f64.convert_u/i32 + (get_local $$conv216$i) ) - (i32.const -1) - ) - ) - (set_local $$j$0$524$i - (i32.add - (get_local $$rem360$i) - (i32.const 1) ) - ) - (set_local $$cmp363$525$i - (i32.lt_s - (get_local $$j$0$524$i) - (i32.const 9) + (set_local $$sub219$i + (f64.sub + (get_local $$y$addr$4$i) + (get_local $$conv218$i) + ) ) - ) - (if - (get_local $$cmp363$525$i) - (block - (set_local $$i$1526$i - (i32.const 10) + (set_local $$mul220$i + (f64.mul + (get_local $$sub219$i) + (f64.const 1e9) ) - (set_local $$j$0527$i - (get_local $$j$0$524$i) + ) + (set_local $$tobool222$i + (f64.ne + (get_local $$mul220$i) + (f64.const 0) ) - (loop $while-out$86 $while-in$87 - (set_local $$mul367$i - (i32.mul - (get_local $$i$1526$i) - (i32.const 10) - ) - ) - (set_local $$j$0$i - (i32.add - (get_local $$j$0527$i) - (i32.const 1) - ) + ) + (if + (get_local $$tobool222$i) + (block + (set_local $$y$addr$4$i + (get_local $$mul220$i) ) - (set_local $$exitcond$i - (i32.eq - (get_local $$j$0$i) - (i32.const 9) - ) + (set_local $$z$0$i + (get_local $$incdec$ptr217$i) ) - (if - (get_local $$exitcond$i) - (block - (set_local $$i$1$lcssa$i - (get_local $$mul367$i) - ) - (br $while-out$86) - ) - (block - (set_local $$i$1526$i - (get_local $$mul367$i) - ) - (set_local $$j$0527$i - (get_local $$j$0$i) - ) - ) + ) + (block + (set_local $$incdec$ptr217$i$lcssa + (get_local $$incdec$ptr217$i) ) - (br $while-in$87) + (br $while-out$66) ) ) - (set_local $$i$1$lcssa$i - (i32.const 10) - ) - ) - (set_local $$231 - (i32.load - (get_local $$add$ptr358$i) - ) + (br $while-in$67) ) - (set_local $$rem370$i - (i32.and - (call_import $i32u-rem - (get_local $$231) - (get_local $$i$1$lcssa$i) - ) - (i32.const -1) - ) + ) + (set_local $$$pr$i + (i32.load + (get_local $$e2$i) ) - (set_local $$tobool371$i - (i32.eq - (get_local $$rem370$i) - (i32.const 0) - ) + ) + (set_local $$cmp225$547$i + (i32.gt_s + (get_local $$$pr$i) + (i32.const 0) ) - (set_local $$add$ptr373$i - (i32.add - (get_local $$add$ptr358$i) - (i32.const 4) + ) + (if + (get_local $$cmp225$547$i) + (block + (set_local $$211 + (get_local $$$pr$i) ) - ) - (set_local $$cmp374$i - (i32.eq - (get_local $$add$ptr373$i) - (get_local $$z$3$lcssa$i) + (set_local $$a$1549$i + (get_local $$arraydecay208$add$ptr213$i) ) - ) - (set_local $$or$cond395$i - (i32.and - (get_local $$cmp374$i) - (get_local $$tobool371$i) + (set_local $$z$1548$i + (get_local $$incdec$ptr217$i$lcssa) ) - ) - (block $do-once$88 - (if - (get_local $$or$cond395$i) - (block - (set_local $$a$8$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$4$i - (get_local $$add$ptr358$i) - ) - (set_local $$e$4$i - (get_local $$e$1$i) - ) - ) - (block - (set_local $$div378$i - (i32.and - (call_import $i32u-div - (get_local $$231) - (get_local $$i$1$lcssa$i) - ) - (i32.const -1) - ) - ) - (set_local $$and379$i - (i32.and - (get_local $$div378$i) - (i32.const 1) + (loop $while-in$69 + (block $while-out$68 + (set_local $$cmp228$i + (i32.gt_s + (get_local $$211) + (i32.const 29) ) ) - (set_local $$tobool380$i - (i32.eq - (get_local $$and379$i) - (i32.const 0) - ) - ) - (set_local $$$396$i + (set_local $$cond233$i (if - (get_local $$tobool380$i) - (f64.const 9007199254740992) - (f64.const 9007199254740994) - ) - ) - (set_local $$div384$i - (i32.and - (call_import $i32s-div - (get_local $$i$1$lcssa$i) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (set_local $$cmp385$i - (i32.lt_u - (get_local $$rem370$i) - (get_local $$div384$i) + (get_local $$cmp228$i) + (i32.const 29) + (get_local $$211) ) ) - (if - (get_local $$cmp385$i) - (set_local $$small$0$i - (f64.const 0.5) - ) - (block - (set_local $$cmp390$i - (i32.eq - (get_local $$rem370$i) - (get_local $$div384$i) - ) - ) - (set_local $$or$cond397$i - (i32.and - (get_local $$cmp374$i) - (get_local $$cmp390$i) - ) - ) - (set_local $$$404$i - (if - (get_local $$or$cond397$i) - (f64.const 1) - (f64.const 1.5) - ) - ) - (set_local $$small$0$i - (get_local $$$404$i) - ) + (set_local $$d$0$542$i + (i32.add + (get_local $$z$1548$i) + (i32.const -4) ) - ) - (set_local $$tobool400$i - (i32.eq - (get_local $$pl$0$i) - (i32.const 0) + ) + (set_local $$cmp235$543$i + (i32.lt_u + (get_local $$d$0$542$i) + (get_local $$a$1549$i) ) ) - (block $do-once$90 + (block $do-once$70 (if - (get_local $$tobool400$i) + (get_local $$cmp235$543$i) + (set_local $$a$2$ph$i + (get_local $$a$1549$i) + ) (block - (set_local $$round377$1$i - (get_local $$$396$i) + (set_local $$carry$0544$i + (i32.const 0) ) - (set_local $$small$1$i - (get_local $$small$0$i) + (set_local $$d$0545$i + (get_local $$d$0$542$i) ) - ) - (block - (set_local $$232 - (i32.load8_s - (get_local $$prefix$0$i) + (loop $while-in$73 + (block $while-out$72 + (set_local $$212 + (i32.load + (get_local $$d$0545$i) + ) + ) + (set_local $$213 + (call $_bitshift64Shl + (get_local $$212) + (i32.const 0) + (get_local $$cond233$i) + ) + ) + (set_local $$214 + (i32.load + (i32.const 168) + ) + ) + (set_local $$215 + (call $_i64Add + (get_local $$213) + (get_local $$214) + (get_local $$carry$0544$i) + (i32.const 0) + ) + ) + (set_local $$216 + (i32.load + (i32.const 168) + ) + ) + (set_local $$217 + (call $___uremdi3 + (get_local $$215) + (get_local $$216) + (i32.const 1000000000) + (i32.const 0) + ) + ) + (set_local $$218 + (i32.load + (i32.const 168) + ) + ) + (i32.store + (get_local $$d$0545$i) + (get_local $$217) + ) + (set_local $$219 + (call $___udivdi3 + (get_local $$215) + (get_local $$216) + (i32.const 1000000000) + (i32.const 0) + ) + ) + (set_local $$220 + (i32.load + (i32.const 168) + ) + ) + (set_local $$d$0$i + (i32.add + (get_local $$d$0545$i) + (i32.const -4) + ) + ) + (set_local $$cmp235$i + (i32.lt_u + (get_local $$d$0$i) + (get_local $$a$1549$i) + ) + ) + (if + (get_local $$cmp235$i) + (block + (set_local $$conv242$i$lcssa + (get_local $$219) + ) + (br $while-out$72) + ) + (block + (set_local $$carry$0544$i + (get_local $$219) + ) + (set_local $$d$0545$i + (get_local $$d$0$i) + ) + ) + ) + (br $while-in$73) ) ) - (set_local $$cmp403$i + (set_local $$tobool244$i (i32.eq - (i32.shr_s - (i32.shl - (get_local $$232) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.const 45) + (get_local $$conv242$i$lcssa) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp403$i) - ) + (get_local $$tobool244$i) (block - (set_local $$round377$1$i - (get_local $$$396$i) - ) - (set_local $$small$1$i - (get_local $$small$0$i) + (set_local $$a$2$ph$i + (get_local $$a$1549$i) ) - (br $do-once$90) + (br $do-once$70) ) ) - (set_local $$mul406$i - (f64.neg - (get_local $$$396$i) + (set_local $$incdec$ptr246$i + (i32.add + (get_local $$a$1549$i) + (i32.const -4) ) ) - (set_local $$mul407$i - (f64.neg - (get_local $$small$0$i) + (i32.store + (get_local $$incdec$ptr246$i) + (get_local $$conv242$i$lcssa) + ) + (set_local $$a$2$ph$i + (get_local $$incdec$ptr246$i) + ) + ) + ) + ) + (set_local $$z$2$i + (get_local $$z$1548$i) + ) + (loop $while-in$75 + (block $while-out$74 + (set_local $$cmp249$i + (i32.gt_u + (get_local $$z$2$i) + (get_local $$a$2$ph$i) + ) + ) + (if + (i32.eqz + (get_local $$cmp249$i) + ) + (block + (set_local $$z$2$i$lcssa + (get_local $$z$2$i) ) + (br $while-out$74) + ) + ) + (set_local $$arrayidx251$i + (i32.add + (get_local $$z$2$i) + (i32.const -4) + ) + ) + (set_local $$221 + (i32.load + (get_local $$arrayidx251$i) ) - (set_local $$round377$1$i - (get_local $$mul406$i) + ) + (set_local $$lnot$i + (i32.eq + (get_local $$221) + (i32.const 0) + ) + ) + (if + (get_local $$lnot$i) + (set_local $$z$2$i + (get_local $$arrayidx251$i) ) - (set_local $$small$1$i - (get_local $$mul407$i) + (block + (set_local $$z$2$i$lcssa + (get_local $$z$2$i) + ) + (br $while-out$74) ) ) + (br $while-in$75) ) ) - (set_local $$sub409$i + (set_local $$222 + (i32.load + (get_local $$e2$i) + ) + ) + (set_local $$sub256$i (i32.sub - (get_local $$231) - (get_local $$rem370$i) + (get_local $$222) + (get_local $$cond233$i) ) ) (i32.store - (get_local $$add$ptr358$i) - (get_local $$sub409$i) - ) - (set_local $$add410$i - (f64.add - (get_local $$round377$1$i) - (get_local $$small$1$i) - ) + (get_local $$e2$i) + (get_local $$sub256$i) ) - (set_local $$cmp411$i - (f64.ne - (get_local $$add410$i) - (get_local $$round377$1$i) + (set_local $$cmp225$i + (i32.gt_s + (get_local $$sub256$i) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp411$i) + (get_local $$cmp225$i) + (block + (set_local $$211 + (get_local $$sub256$i) + ) + (set_local $$a$1549$i + (get_local $$a$2$ph$i) + ) + (set_local $$z$1548$i + (get_local $$z$2$i$lcssa) + ) ) (block - (set_local $$a$8$i - (get_local $$a$3$lcssa$i) + (set_local $$$pr477$i + (get_local $$sub256$i) ) - (set_local $$d$4$i - (get_local $$add$ptr358$i) + (set_local $$a$1$lcssa$i + (get_local $$a$2$ph$i) ) - (set_local $$e$4$i - (get_local $$e$1$i) + (set_local $$z$1$lcssa$i + (get_local $$z$2$i$lcssa) ) - (br $do-once$88) + (br $while-out$68) ) ) - (set_local $$add414$i - (i32.add - (get_local $$sub409$i) - (get_local $$i$1$lcssa$i) + (br $while-in$69) + ) + ) + ) + (block + (set_local $$$pr477$i + (get_local $$$pr$i) + ) + (set_local $$a$1$lcssa$i + (get_local $$arraydecay208$add$ptr213$i) + ) + (set_local $$z$1$lcssa$i + (get_local $$incdec$ptr217$i$lcssa) + ) + ) + ) + (set_local $$cmp259$537$i + (i32.lt_s + (get_local $$$pr477$i) + (i32.const 0) + ) + ) + (if + (get_local $$cmp259$537$i) + (block + (set_local $$add273$i + (i32.add + (get_local $$$p$i) + (i32.const 25) + ) + ) + (set_local $$div274$i + (i32.and + (call_import $i32s-div + (get_local $$add273$i) + (i32.const 9) + ) + (i32.const -1) + ) + ) + (set_local $$add275$i + (i32.add + (get_local $$div274$i) + (i32.const 1) + ) + ) + (set_local $$cmp299$i + (i32.eq + (get_local $$or$i$241) + (i32.const 102) + ) + ) + (set_local $$223 + (get_local $$$pr477$i) + ) + (set_local $$a$3539$i + (get_local $$a$1$lcssa$i) + ) + (set_local $$z$3538$i + (get_local $$z$1$lcssa$i) + ) + (loop $while-in$77 + (block $while-out$76 + (set_local $$sub264$i + (i32.sub + (i32.const 0) + (get_local $$223) ) ) - (i32.store - (get_local $$add$ptr358$i) - (get_local $$add414$i) + (set_local $$cmp265$i + (i32.gt_s + (get_local $$sub264$i) + (i32.const 9) + ) ) - (set_local $$cmp416$519$i - (i32.gt_u - (get_local $$add414$i) - (i32.const 999999999) + (set_local $$cond271$i + (if + (get_local $$cmp265$i) + (i32.const 9) + (get_local $$sub264$i) ) ) - (if - (get_local $$cmp416$519$i) - (block - (set_local $$a$5521$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$2520$i - (get_local $$add$ptr358$i) - ) - (loop $while-out$92 $while-in$93 - (set_local $$incdec$ptr419$i + (set_local $$cmp277$533$i + (i32.lt_u + (get_local $$a$3539$i) + (get_local $$z$3538$i) + ) + ) + (block $do-once$78 + (if + (get_local $$cmp277$533$i) + (block + (set_local $$shl280$i + (i32.shl + (i32.const 1) + (get_local $$cond271$i) + ) + ) + (set_local $$sub281$i (i32.add - (get_local $$d$2520$i) - (i32.const -4) + (get_local $$shl280$i) + (i32.const -1) ) ) - (i32.store - (get_local $$d$2520$i) + (set_local $$shr285$i + (i32.shr_u + (i32.const 1000000000) + (get_local $$cond271$i) + ) + ) + (set_local $$carry262$0535$i (i32.const 0) ) - (set_local $$cmp420$i - (i32.lt_u - (get_local $$incdec$ptr419$i) - (get_local $$a$5521$i) - ) + (set_local $$d$1534$i + (get_local $$a$3539$i) ) - (if - (get_local $$cmp420$i) - (block - (set_local $$incdec$ptr423$i + (loop $while-in$81 + (block $while-out$80 + (set_local $$225 + (i32.load + (get_local $$d$1534$i) + ) + ) + (set_local $$and282$i + (i32.and + (get_local $$225) + (get_local $$sub281$i) + ) + ) + (set_local $$shr283$i + (i32.shr_u + (get_local $$225) + (get_local $$cond271$i) + ) + ) + (set_local $$add284$i (i32.add - (get_local $$a$5521$i) - (i32.const -4) + (get_local $$shr283$i) + (get_local $$carry262$0535$i) ) ) (i32.store - (get_local $$incdec$ptr423$i) - (i32.const 0) + (get_local $$d$1534$i) + (get_local $$add284$i) ) - (set_local $$a$6$i - (get_local $$incdec$ptr423$i) + (set_local $$mul286$i + (i32.mul + (get_local $$and282$i) + (get_local $$shr285$i) + ) ) - ) - (set_local $$a$6$i - (get_local $$a$5521$i) + (set_local $$incdec$ptr288$i + (i32.add + (get_local $$d$1534$i) + (i32.const 4) + ) + ) + (set_local $$cmp277$i + (i32.lt_u + (get_local $$incdec$ptr288$i) + (get_local $$z$3538$i) + ) + ) + (if + (get_local $$cmp277$i) + (block + (set_local $$carry262$0535$i + (get_local $$mul286$i) + ) + (set_local $$d$1534$i + (get_local $$incdec$ptr288$i) + ) + ) + (block + (set_local $$mul286$i$lcssa + (get_local $$mul286$i) + ) + (br $while-out$80) + ) + ) + (br $while-in$81) ) ) - (set_local $$233 + (set_local $$226 (i32.load - (get_local $$incdec$ptr419$i) + (get_local $$a$3539$i) + ) + ) + (set_local $$tobool290$i + (i32.eq + (get_local $$226) + (i32.const 0) ) ) - (set_local $$inc425$i + (set_local $$incdec$ptr292$i (i32.add - (get_local $$233) - (i32.const 1) + (get_local $$a$3539$i) + (i32.const 4) ) ) - (i32.store - (get_local $$incdec$ptr419$i) - (get_local $$inc425$i) + (set_local $$incdec$ptr292$a$3$i + (if + (get_local $$tobool290$i) + (get_local $$incdec$ptr292$i) + (get_local $$a$3539$i) + ) ) - (set_local $$cmp416$i - (i32.gt_u - (get_local $$inc425$i) - (i32.const 999999999) + (set_local $$tobool294$i + (i32.eq + (get_local $$mul286$i$lcssa) + (i32.const 0) ) ) (if - (get_local $$cmp416$i) + (get_local $$tobool294$i) (block - (set_local $$a$5521$i - (get_local $$a$6$i) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$i) ) - (set_local $$d$2520$i - (get_local $$incdec$ptr419$i) + (set_local $$z$4$i + (get_local $$z$3538$i) ) + (br $do-once$78) ) - (block - (set_local $$a$5$lcssa$i - (get_local $$a$6$i) - ) - (set_local $$d$2$lcssa$i - (get_local $$incdec$ptr419$i) - ) - (br $while-out$92) + ) + (set_local $$incdec$ptr296$i + (i32.add + (get_local $$z$3538$i) + (i32.const 4) + ) + ) + (i32.store + (get_local $$z$3538$i) + (get_local $$mul286$i$lcssa) + ) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$i) + ) + (set_local $$z$4$i + (get_local $$incdec$ptr296$i) + ) + ) + (block + (set_local $$224 + (i32.load + (get_local $$a$3539$i) + ) + ) + (set_local $$tobool290$569$i + (i32.eq + (get_local $$224) + (i32.const 0) + ) + ) + (set_local $$incdec$ptr292$570$i + (i32.add + (get_local $$a$3539$i) + (i32.const 4) + ) + ) + (set_local $$incdec$ptr292$a$3$571$i + (if + (get_local $$tobool290$569$i) + (get_local $$incdec$ptr292$570$i) + (get_local $$a$3539$i) ) ) - (br $while-in$93) + (set_local $$incdec$ptr292$a$3573$i + (get_local $$incdec$ptr292$a$3$571$i) + ) + (set_local $$z$4$i + (get_local $$z$3538$i) + ) ) ) - (block - (set_local $$a$5$lcssa$i - (get_local $$a$3$lcssa$i) - ) - (set_local $$d$2$lcssa$i - (get_local $$add$ptr358$i) - ) + ) + (set_local $$cond304$i + (if + (get_local $$cmp299$i) + (get_local $$arraydecay208$add$ptr213$i) + (get_local $$incdec$ptr292$a$3573$i) ) ) - (set_local $$sub$ptr$rhs$cast428$i - (get_local $$a$5$lcssa$i) + (set_local $$sub$ptr$lhs$cast305$i + (get_local $$z$4$i) ) - (set_local $$sub$ptr$sub429$i + (set_local $$sub$ptr$rhs$cast306$i + (get_local $$cond304$i) + ) + (set_local $$sub$ptr$sub307$i (i32.sub - (get_local $$sub$ptr$rhs$cast345$i) - (get_local $$sub$ptr$rhs$cast428$i) + (get_local $$sub$ptr$lhs$cast305$i) + (get_local $$sub$ptr$rhs$cast306$i) ) ) - (set_local $$sub$ptr$div430$i + (set_local $$sub$ptr$div$i (i32.shr_s - (get_local $$sub$ptr$sub429$i) + (get_local $$sub$ptr$sub307$i) (i32.const 2) ) ) - (set_local $$mul431$i - (i32.mul - (get_local $$sub$ptr$div430$i) - (i32.const 9) + (set_local $$cmp308$i + (i32.gt_s + (get_local $$sub$ptr$div$i) + (get_local $$add275$i) + ) + ) + (set_local $$add$ptr311$i + (i32.add + (get_local $$cond304$i) + (i32.shl + (get_local $$add275$i) + (i32.const 2) + ) ) ) - (set_local $$234 + (set_local $$add$ptr311$z$4$i + (if + (get_local $$cmp308$i) + (get_local $$add$ptr311$i) + (get_local $$z$4$i) + ) + ) + (set_local $$227 (i32.load - (get_local $$a$5$lcssa$i) + (get_local $$e2$i) ) ) - (set_local $$cmp433$515$i - (i32.lt_u - (get_local $$234) - (i32.const 10) + (set_local $$add313$i + (i32.add + (get_local $$227) + (get_local $$cond271$i) + ) + ) + (i32.store + (get_local $$e2$i) + (get_local $$add313$i) + ) + (set_local $$cmp259$i + (i32.lt_s + (get_local $$add313$i) + (i32.const 0) ) ) (if - (get_local $$cmp433$515$i) + (get_local $$cmp259$i) (block - (set_local $$a$8$i - (get_local $$a$5$lcssa$i) + (set_local $$223 + (get_local $$add313$i) ) - (set_local $$d$4$i - (get_local $$d$2$lcssa$i) + (set_local $$a$3539$i + (get_local $$incdec$ptr292$a$3573$i) ) - (set_local $$e$4$i - (get_local $$mul431$i) + (set_local $$z$3538$i + (get_local $$add$ptr311$z$4$i) ) - (br $do-once$88) ) (block - (set_local $$e$2517$i - (get_local $$mul431$i) + (set_local $$a$3$lcssa$i + (get_local $$incdec$ptr292$a$3573$i) ) - (set_local $$i$2516$i - (i32.const 10) + (set_local $$z$3$lcssa$i + (get_local $$add$ptr311$z$4$i) ) + (br $while-out$76) + ) + ) + (br $while-in$77) + ) + ) + ) + (block + (set_local $$a$3$lcssa$i + (get_local $$a$1$lcssa$i) + ) + (set_local $$z$3$lcssa$i + (get_local $$z$1$lcssa$i) + ) + ) + ) + (set_local $$cmp315$i + (i32.lt_u + (get_local $$a$3$lcssa$i) + (get_local $$z$3$lcssa$i) + ) + ) + (block $do-once$82 + (if + (get_local $$cmp315$i) + (block + (set_local $$sub$ptr$rhs$cast319$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$sub$ptr$sub320$i + (i32.sub + (get_local $$sub$ptr$rhs$cast345$i) + (get_local $$sub$ptr$rhs$cast319$i) + ) + ) + (set_local $$sub$ptr$div321$i + (i32.shr_s + (get_local $$sub$ptr$sub320$i) + (i32.const 2) + ) + ) + (set_local $$mul322$i + (i32.mul + (get_local $$sub$ptr$div321$i) + (i32.const 9) + ) + ) + (set_local $$228 + (i32.load + (get_local $$a$3$lcssa$i) + ) + ) + (set_local $$cmp324$529$i + (i32.lt_u + (get_local $$228) + (i32.const 10) + ) + ) + (if + (get_local $$cmp324$529$i) + (block + (set_local $$e$1$i + (get_local $$mul322$i) + ) + (br $do-once$82) + ) + (block + (set_local $$e$0531$i + (get_local $$mul322$i) + ) + (set_local $$i$0530$i + (i32.const 10) ) ) - (loop $while-out$94 $while-in$95 - (set_local $$mul437$i + ) + (loop $while-in$85 + (block $while-out$84 + (set_local $$mul328$i (i32.mul - (get_local $$i$2516$i) + (get_local $$i$0530$i) (i32.const 10) ) ) - (set_local $$inc438$i + (set_local $$inc$i (i32.add - (get_local $$e$2517$i) + (get_local $$e$0531$i) (i32.const 1) ) ) - (set_local $$cmp433$i + (set_local $$cmp324$i (i32.lt_u - (get_local $$234) - (get_local $$mul437$i) + (get_local $$228) + (get_local $$mul328$i) ) ) (if - (get_local $$cmp433$i) + (get_local $$cmp324$i) (block - (set_local $$a$8$i - (get_local $$a$5$lcssa$i) - ) - (set_local $$d$4$i - (get_local $$d$2$lcssa$i) - ) - (set_local $$e$4$i - (get_local $$inc438$i) + (set_local $$e$1$i + (get_local $$inc$i) ) - (br $while-out$94) + (br $while-out$84) ) (block - (set_local $$e$2517$i - (get_local $$inc438$i) + (set_local $$e$0531$i + (get_local $$inc$i) ) - (set_local $$i$2516$i - (get_local $$mul437$i) + (set_local $$i$0530$i + (get_local $$mul328$i) ) ) ) - (br $while-in$95) + (br $while-in$85) ) ) ) - ) - (set_local $$add$ptr442$i - (i32.add - (get_local $$d$4$i) - (i32.const 4) - ) - ) - (set_local $$cmp443$i - (i32.gt_u - (get_local $$z$3$lcssa$i) - (get_local $$add$ptr442$i) - ) - ) - (set_local $$add$ptr442$z$3$i - (if - (get_local $$cmp443$i) - (get_local $$add$ptr442$i) - (get_local $$z$3$lcssa$i) + (set_local $$e$1$i + (i32.const 0) ) ) - (set_local $$a$9$ph$i - (get_local $$a$8$i) - ) - (set_local $$e$5$ph$i - (get_local $$e$4$i) - ) - (set_local $$z$7$ph$i - (get_local $$add$ptr442$z$3$i) - ) ) - (block - (set_local $$a$9$ph$i - (get_local $$a$3$lcssa$i) + (set_local $$cmp333$i + (i32.ne + (get_local $$or$i$241) + (i32.const 102) ) - (set_local $$e$5$ph$i + ) + (set_local $$mul335$i + (if + (get_local $$cmp333$i) (get_local $$e$1$i) + (i32.const 0) ) - (set_local $$z$7$ph$i - (get_local $$z$3$lcssa$i) + ) + (set_local $$sub336$i + (i32.sub + (get_local $$$p$i) + (get_local $$mul335$i) ) ) - ) - (set_local $$sub626$le$i - (i32.sub - (i32.const 0) - (get_local $$e$5$ph$i) + (set_local $$cmp338$i + (i32.eq + (get_local $$or$i$241) + (i32.const 103) + ) ) - ) - (set_local $$z$7$i - (get_local $$z$7$ph$i) - ) - (loop $while-out$96 $while-in$97 - (set_local $$cmp450$i - (i32.gt_u - (get_local $$z$7$i) - (get_local $$a$9$ph$i) + (set_local $$tobool341$i + (i32.ne + (get_local $$$p$i) + (i32.const 0) ) ) - (if - (i32.eqz - (get_local $$cmp450$i) + (set_local $$229 + (i32.and + (get_local $$tobool341$i) + (get_local $$cmp338$i) ) - (block - (set_local $$cmp450$lcssa$i - (i32.const 0) - ) - (set_local $$z$7$i$lcssa - (get_local $$z$7$i) + ) + (set_local $$land$ext$neg$i + (i32.shr_s + (i32.shl + (get_local $$229) + (i32.const 31) ) - (br $while-out$96) + (i32.const 31) ) ) - (set_local $$arrayidx453$i + (set_local $$sub343$i (i32.add - (get_local $$z$7$i) - (i32.const -4) + (get_local $$sub336$i) + (get_local $$land$ext$neg$i) ) ) - (set_local $$235 - (i32.load - (get_local $$arrayidx453$i) + (set_local $$sub$ptr$lhs$cast344$i + (get_local $$z$3$lcssa$i) + ) + (set_local $$sub$ptr$sub346$i + (i32.sub + (get_local $$sub$ptr$lhs$cast344$i) + (get_local $$sub$ptr$rhs$cast345$i) ) ) - (set_local $$lnot455$i - (i32.eq - (get_local $$235) - (i32.const 0) + (set_local $$sub$ptr$div347$i + (i32.shr_s + (get_local $$sub$ptr$sub346$i) + (i32.const 2) ) ) - (if - (get_local $$lnot455$i) - (set_local $$z$7$i - (get_local $$arrayidx453$i) + (set_local $$230 + (i32.mul + (get_local $$sub$ptr$div347$i) + (i32.const 9) ) - (block - (set_local $$cmp450$lcssa$i - (i32.const 1) - ) - (set_local $$z$7$i$lcssa - (get_local $$z$7$i) - ) - (br $while-out$96) + ) + (set_local $$mul349$i + (i32.add + (get_local $$230) + (i32.const -9) + ) + ) + (set_local $$cmp350$i + (i32.lt_s + (get_local $$sub343$i) + (get_local $$mul349$i) ) ) - (br $while-in$97) - ) - (block $do-once$98 (if - (get_local $$cmp338$i) + (get_local $$cmp350$i) (block - (set_local $$236 + (set_local $$add$ptr354$i + (i32.add + (get_local $$arraydecay208$add$ptr213$i) + (i32.const 4) + ) + ) + (set_local $$add355$i + (i32.add + (get_local $$sub343$i) + (i32.const 9216) + ) + ) + (set_local $$div356$i (i32.and - (get_local $$tobool341$i) - (i32.const 1) + (call_import $i32s-div + (get_local $$add355$i) + (i32.const 9) + ) + (i32.const -1) ) ) - (set_local $$inc468$i - (i32.xor - (get_local $$236) - (i32.const 1) + (set_local $$sub357$i + (i32.add + (get_local $$div356$i) + (i32.const -1024) ) ) - (set_local $$$p$inc468$i + (set_local $$add$ptr358$i (i32.add - (get_local $$inc468$i) - (get_local $$$p$i) + (get_local $$add$ptr354$i) + (i32.shl + (get_local $$sub357$i) + (i32.const 2) + ) ) ) - (set_local $$cmp470$i - (i32.gt_s - (get_local $$$p$inc468$i) - (get_local $$e$5$ph$i) + (set_local $$rem360$i + (i32.and + (call_import $i32s-rem + (get_local $$add355$i) + (i32.const 9) + ) + (i32.const -1) ) ) - (set_local $$cmp473$i - (i32.gt_s - (get_local $$e$5$ph$i) - (i32.const -5) + (set_local $$j$0$524$i + (i32.add + (get_local $$rem360$i) + (i32.const 1) ) ) - (set_local $$or$cond2$i - (i32.and - (get_local $$cmp470$i) - (get_local $$cmp473$i) + (set_local $$cmp363$525$i + (i32.lt_s + (get_local $$j$0$524$i) + (i32.const 9) ) ) (if - (get_local $$or$cond2$i) + (get_local $$cmp363$525$i) (block - (set_local $$dec476$i - (i32.add - (get_local $$t$0) - (i32.const -1) - ) + (set_local $$i$1526$i + (i32.const 10) ) - (set_local $$add477$neg$i - (i32.add - (get_local $$$p$inc468$i) - (i32.const -1) - ) + (set_local $$j$0527$i + (get_local $$j$0$524$i) ) - (set_local $$sub478$i - (i32.sub - (get_local $$add477$neg$i) - (get_local $$e$5$ph$i) + (loop $while-in$87 + (block $while-out$86 + (set_local $$mul367$i + (i32.mul + (get_local $$i$1526$i) + (i32.const 10) + ) + ) + (set_local $$j$0$i + (i32.add + (get_local $$j$0527$i) + (i32.const 1) + ) + ) + (set_local $$exitcond$i + (i32.eq + (get_local $$j$0$i) + (i32.const 9) + ) + ) + (if + (get_local $$exitcond$i) + (block + (set_local $$i$1$lcssa$i + (get_local $$mul367$i) + ) + (br $while-out$86) + ) + (block + (set_local $$i$1526$i + (get_local $$mul367$i) + ) + (set_local $$j$0527$i + (get_local $$j$0$i) + ) + ) + ) + (br $while-in$87) ) ) - (set_local $$p$addr$2$i - (get_local $$sub478$i) - ) - (set_local $$t$addr$0$i - (get_local $$dec476$i) - ) ) - (block - (set_local $$sub480$i - (i32.add - (get_local $$t$0) - (i32.const -2) - ) - ) - (set_local $$dec481$i - (i32.add - (get_local $$$p$inc468$i) - (i32.const -1) - ) - ) - (set_local $$p$addr$2$i - (get_local $$dec481$i) - ) - (set_local $$t$addr$0$i - (get_local $$sub480$i) - ) + (set_local $$i$1$lcssa$i + (i32.const 10) + ) + ) + (set_local $$231 + (i32.load + (get_local $$add$ptr358$i) ) ) - (set_local $$and483$i + (set_local $$rem370$i (i32.and - (get_local $$fl$1$and219) - (i32.const 8) + (call_import $i32u-rem + (get_local $$231) + (get_local $$i$1$lcssa$i) + ) + (i32.const -1) ) ) - (set_local $$tobool484$i + (set_local $$tobool371$i (i32.eq - (get_local $$and483$i) + (get_local $$rem370$i) (i32.const 0) ) ) - (if - (i32.eqz - (get_local $$tobool484$i) + (set_local $$add$ptr373$i + (i32.add + (get_local $$add$ptr358$i) + (i32.const 4) ) - (block - (set_local $$and610$pre$phi$iZ2D - (get_local $$and483$i) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) + ) + (set_local $$cmp374$i + (i32.eq + (get_local $$add$ptr373$i) + (get_local $$z$3$lcssa$i) + ) + ) + (set_local $$or$cond395$i + (i32.and + (get_local $$cmp374$i) + (get_local $$tobool371$i) ) ) - (block $do-once$100 + (block $do-once$88 (if - (get_local $$cmp450$lcssa$i) + (get_local $$or$cond395$i) + (block + (set_local $$a$8$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$add$ptr358$i) + ) + (set_local $$e$4$i + (get_local $$e$1$i) + ) + ) (block - (set_local $$arrayidx489$i - (i32.add - (get_local $$z$7$i$lcssa) - (i32.const -4) + (set_local $$div378$i + (i32.and + (call_import $i32u-div + (get_local $$231) + (get_local $$i$1$lcssa$i) + ) + (i32.const -1) ) ) - (set_local $$237 - (i32.load - (get_local $$arrayidx489$i) + (set_local $$and379$i + (i32.and + (get_local $$div378$i) + (i32.const 1) ) ) - (set_local $$tobool490$i + (set_local $$tobool380$i (i32.eq - (get_local $$237) + (get_local $$and379$i) (i32.const 0) ) ) - (if - (get_local $$tobool490$i) - (block - (set_local $$j$2$i - (i32.const 9) - ) - (br $do-once$100) + (set_local $$$396$i + (if + (get_local $$tobool380$i) + (f64.const 9007199254740992) + (f64.const 9007199254740994) ) ) - (set_local $$rem494$510$i + (set_local $$div384$i (i32.and - (call_import $i32u-rem - (get_local $$237) - (i32.const 10) + (call_import $i32s-div + (get_local $$i$1$lcssa$i) + (i32.const 2) ) (i32.const -1) ) ) - (set_local $$cmp495$511$i - (i32.eq - (get_local $$rem494$510$i) - (i32.const 0) + (set_local $$cmp385$i + (i32.lt_u + (get_local $$rem370$i) + (get_local $$div384$i) ) ) (if - (get_local $$cmp495$511$i) - (block - (set_local $$i$3512$i - (i32.const 10) - ) - (set_local $$j$1513$i - (i32.const 0) - ) + (get_local $$cmp385$i) + (set_local $$small$0$i + (f64.const 0.5) ) (block - (set_local $$j$2$i - (i32.const 0) - ) - (br $do-once$100) - ) - ) - (loop $while-out$102 $while-in$103 - (set_local $$mul499$i - (i32.mul - (get_local $$i$3512$i) - (i32.const 10) + (set_local $$cmp390$i + (i32.eq + (get_local $$rem370$i) + (get_local $$div384$i) + ) ) - ) - (set_local $$inc500$i - (i32.add - (get_local $$j$1513$i) - (i32.const 1) + (set_local $$or$cond397$i + (i32.and + (get_local $$cmp374$i) + (get_local $$cmp390$i) + ) ) - ) - (set_local $$rem494$i - (i32.and - (call_import $i32u-rem - (get_local $$237) - (get_local $$mul499$i) + (set_local $$$404$i + (if + (get_local $$or$cond397$i) + (f64.const 1) + (f64.const 1.5) ) - (i32.const -1) ) - ) - (set_local $$cmp495$i - (i32.eq - (get_local $$rem494$i) - (i32.const 0) + (set_local $$small$0$i + (get_local $$$404$i) ) ) + ) + (set_local $$tobool400$i + (i32.eq + (get_local $$pl$0$i) + (i32.const 0) + ) + ) + (block $do-once$90 (if - (get_local $$cmp495$i) + (get_local $$tobool400$i) (block - (set_local $$i$3512$i - (get_local $$mul499$i) + (set_local $$round377$1$i + (get_local $$$396$i) ) - (set_local $$j$1513$i - (get_local $$inc500$i) + (set_local $$small$1$i + (get_local $$small$0$i) ) ) (block - (set_local $$j$2$i - (get_local $$inc500$i) + (set_local $$232 + (i32.load8_s + (get_local $$prefix$0$i) + ) + ) + (set_local $$cmp403$i + (i32.eq + (i32.shr_s + (i32.shl + (get_local $$232) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 45) + ) + ) + (if + (i32.eqz + (get_local $$cmp403$i) + ) + (block + (set_local $$round377$1$i + (get_local $$$396$i) + ) + (set_local $$small$1$i + (get_local $$small$0$i) + ) + (br $do-once$90) + ) + ) + (set_local $$mul406$i + (f64.neg + (get_local $$$396$i) + ) + ) + (set_local $$mul407$i + (f64.neg + (get_local $$small$0$i) + ) + ) + (set_local $$round377$1$i + (get_local $$mul406$i) + ) + (set_local $$small$1$i + (get_local $$mul407$i) ) - (br $while-out$102) ) ) - (br $while-in$103) ) - ) - (set_local $$j$2$i - (i32.const 9) - ) - ) - ) - (set_local $$or504$i - (i32.or - (get_local $$t$addr$0$i) - (i32.const 32) - ) - ) - (set_local $$cmp505$i - (i32.eq - (get_local $$or504$i) - (i32.const 102) - ) - ) - (set_local $$sub$ptr$lhs$cast508$i - (get_local $$z$7$i$lcssa) - ) - (set_local $$sub$ptr$sub510$i - (i32.sub - (get_local $$sub$ptr$lhs$cast508$i) - (get_local $$sub$ptr$rhs$cast345$i) - ) - ) - (set_local $$sub$ptr$div511$i - (i32.shr_s - (get_local $$sub$ptr$sub510$i) - (i32.const 2) - ) - ) - (set_local $$238 - (i32.mul - (get_local $$sub$ptr$div511$i) - (i32.const 9) - ) - ) - (set_local $$mul513$i - (i32.add - (get_local $$238) - (i32.const -9) - ) - ) - (if - (get_local $$cmp505$i) - (block - (set_local $$sub514$i - (i32.sub - (get_local $$mul513$i) - (get_local $$j$2$i) + (set_local $$sub409$i + (i32.sub + (get_local $$231) + (get_local $$rem370$i) + ) ) - ) - (set_local $$cmp515$i - (i32.lt_s - (get_local $$sub514$i) - (i32.const 0) + (i32.store + (get_local $$add$ptr358$i) + (get_local $$sub409$i) ) - ) - (set_local $$$sub514$i - (if - (get_local $$cmp515$i) - (i32.const 0) - (get_local $$sub514$i) + (set_local $$add410$i + (f64.add + (get_local $$round377$1$i) + (get_local $$small$1$i) + ) ) - ) - (set_local $$cmp528$i - (i32.lt_s - (get_local $$p$addr$2$i) - (get_local $$$sub514$i) + (set_local $$cmp411$i + (f64.ne + (get_local $$add410$i) + (get_local $$round377$1$i) + ) ) - ) - (set_local $$p$addr$2$$sub514398$i (if - (get_local $$cmp528$i) - (get_local $$p$addr$2$i) - (get_local $$$sub514$i) + (i32.eqz + (get_local $$cmp411$i) + ) + (block + (set_local $$a$8$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$add$ptr358$i) + ) + (set_local $$e$4$i + (get_local $$e$1$i) + ) + (br $do-once$88) + ) ) - ) - (set_local $$and610$pre$phi$iZ2D - (i32.const 0) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$$sub514398$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) - ) - (block - (set_local $$add561$i - (i32.add - (get_local $$mul513$i) - (get_local $$e$5$ph$i) + (set_local $$add414$i + (i32.add + (get_local $$sub409$i) + (get_local $$i$1$lcssa$i) + ) ) - ) - (set_local $$sub562$i - (i32.sub - (get_local $$add561$i) - (get_local $$j$2$i) + (i32.store + (get_local $$add$ptr358$i) + (get_local $$add414$i) ) - ) - (set_local $$cmp563$i - (i32.lt_s - (get_local $$sub562$i) - (i32.const 0) + (set_local $$cmp416$519$i + (i32.gt_u + (get_local $$add414$i) + (i32.const 999999999) + ) ) - ) - (set_local $$$sub562$i (if - (get_local $$cmp563$i) - (i32.const 0) - (get_local $$sub562$i) + (get_local $$cmp416$519$i) + (block + (set_local $$a$5521$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$2520$i + (get_local $$add$ptr358$i) + ) + (loop $while-in$93 + (block $while-out$92 + (set_local $$incdec$ptr419$i + (i32.add + (get_local $$d$2520$i) + (i32.const -4) + ) + ) + (i32.store + (get_local $$d$2520$i) + (i32.const 0) + ) + (set_local $$cmp420$i + (i32.lt_u + (get_local $$incdec$ptr419$i) + (get_local $$a$5521$i) + ) + ) + (if + (get_local $$cmp420$i) + (block + (set_local $$incdec$ptr423$i + (i32.add + (get_local $$a$5521$i) + (i32.const -4) + ) + ) + (i32.store + (get_local $$incdec$ptr423$i) + (i32.const 0) + ) + (set_local $$a$6$i + (get_local $$incdec$ptr423$i) + ) + ) + (set_local $$a$6$i + (get_local $$a$5521$i) + ) + ) + (set_local $$233 + (i32.load + (get_local $$incdec$ptr419$i) + ) + ) + (set_local $$inc425$i + (i32.add + (get_local $$233) + (i32.const 1) + ) + ) + (i32.store + (get_local $$incdec$ptr419$i) + (get_local $$inc425$i) + ) + (set_local $$cmp416$i + (i32.gt_u + (get_local $$inc425$i) + (i32.const 999999999) + ) + ) + (if + (get_local $$cmp416$i) + (block + (set_local $$a$5521$i + (get_local $$a$6$i) + ) + (set_local $$d$2520$i + (get_local $$incdec$ptr419$i) + ) + ) + (block + (set_local $$a$5$lcssa$i + (get_local $$a$6$i) + ) + (set_local $$d$2$lcssa$i + (get_local $$incdec$ptr419$i) + ) + (br $while-out$92) + ) + ) + (br $while-in$93) + ) + ) + ) + (block + (set_local $$a$5$lcssa$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$d$2$lcssa$i + (get_local $$add$ptr358$i) + ) + ) ) - ) - (set_local $$cmp577$i - (i32.lt_s - (get_local $$p$addr$2$i) - (get_local $$$sub562$i) + (set_local $$sub$ptr$rhs$cast428$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$sub$ptr$sub429$i + (i32.sub + (get_local $$sub$ptr$rhs$cast345$i) + (get_local $$sub$ptr$rhs$cast428$i) + ) + ) + (set_local $$sub$ptr$div430$i + (i32.shr_s + (get_local $$sub$ptr$sub429$i) + (i32.const 2) + ) + ) + (set_local $$mul431$i + (i32.mul + (get_local $$sub$ptr$div430$i) + (i32.const 9) + ) + ) + (set_local $$234 + (i32.load + (get_local $$a$5$lcssa$i) + ) + ) + (set_local $$cmp433$515$i + (i32.lt_u + (get_local $$234) + (i32.const 10) + ) + ) + (if + (get_local $$cmp433$515$i) + (block + (set_local $$a$8$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$d$2$lcssa$i) + ) + (set_local $$e$4$i + (get_local $$mul431$i) + ) + (br $do-once$88) + ) + (block + (set_local $$e$2517$i + (get_local $$mul431$i) + ) + (set_local $$i$2516$i + (i32.const 10) + ) + ) ) - ) - (set_local $$p$addr$2$$sub562399$i - (if - (get_local $$cmp577$i) - (get_local $$p$addr$2$i) - (get_local $$$sub562$i) + (loop $while-in$95 + (block $while-out$94 + (set_local $$mul437$i + (i32.mul + (get_local $$i$2516$i) + (i32.const 10) + ) + ) + (set_local $$inc438$i + (i32.add + (get_local $$e$2517$i) + (i32.const 1) + ) + ) + (set_local $$cmp433$i + (i32.lt_u + (get_local $$234) + (get_local $$mul437$i) + ) + ) + (if + (get_local $$cmp433$i) + (block + (set_local $$a$8$i + (get_local $$a$5$lcssa$i) + ) + (set_local $$d$4$i + (get_local $$d$2$lcssa$i) + ) + (set_local $$e$4$i + (get_local $$inc438$i) + ) + (br $while-out$94) + ) + (block + (set_local $$e$2517$i + (get_local $$inc438$i) + ) + (set_local $$i$2516$i + (get_local $$mul437$i) + ) + ) + ) + (br $while-in$95) + ) ) ) - (set_local $$and610$pre$phi$iZ2D - (i32.const 0) - ) - (set_local $$p$addr$3$i - (get_local $$p$addr$2$$sub562399$i) - ) - (set_local $$t$addr$1$i - (get_local $$t$addr$0$i) - ) - (br $do-once$98) ) ) - ) - (block - (set_local $$$pre567$i - (i32.and - (get_local $$fl$1$and219) - (i32.const 8) + (set_local $$add$ptr442$i + (i32.add + (get_local $$d$4$i) + (i32.const 4) ) ) - (set_local $$and610$pre$phi$iZ2D - (get_local $$$pre567$i) + (set_local $$cmp443$i + (i32.gt_u + (get_local $$z$3$lcssa$i) + (get_local $$add$ptr442$i) + ) ) - (set_local $$p$addr$3$i - (get_local $$$p$i) + (set_local $$add$ptr442$z$3$i + (if + (get_local $$cmp443$i) + (get_local $$add$ptr442$i) + (get_local $$z$3$lcssa$i) + ) ) - (set_local $$t$addr$1$i - (get_local $$t$0) + (set_local $$a$9$ph$i + (get_local $$a$8$i) ) - ) - ) - ) - (set_local $$239 - (i32.or - (get_local $$p$addr$3$i) - (get_local $$and610$pre$phi$iZ2D) - ) - ) - (set_local $$240 - (i32.ne - (get_local $$239) - (i32.const 0) - ) - ) - (set_local $$lor$ext$i - (i32.and - (get_local $$240) - (i32.const 1) - ) - ) - (set_local $$or613$i - (i32.or - (get_local $$t$addr$1$i) - (i32.const 32) - ) - ) - (set_local $$cmp614$i - (i32.eq - (get_local $$or613$i) - (i32.const 102) - ) - ) - (if - (get_local $$cmp614$i) - (block - (set_local $$cmp617$i - (i32.gt_s - (get_local $$e$5$ph$i) - (i32.const 0) + (set_local $$e$5$ph$i + (get_local $$e$4$i) + ) + (set_local $$z$7$ph$i + (get_local $$add$ptr442$z$3$i) ) ) - (set_local $$add620$i - (if - (get_local $$cmp617$i) - (get_local $$e$5$ph$i) - (i32.const 0) + (block + (set_local $$a$9$ph$i + (get_local $$a$3$lcssa$i) + ) + (set_local $$e$5$ph$i + (get_local $$e$1$i) + ) + (set_local $$z$7$ph$i + (get_local $$z$3$lcssa$i) ) ) - (set_local $$estr$2$i + ) + (set_local $$sub626$le$i + (i32.sub (i32.const 0) - ) - (set_local $$sub$ptr$sub650$pn$i - (get_local $$add620$i) + (get_local $$e$5$ph$i) ) ) - (block - (set_local $$cmp623$i - (i32.lt_s - (get_local $$e$5$ph$i) - (i32.const 0) + (set_local $$z$7$i + (get_local $$z$7$ph$i) + ) + (loop $while-in$97 + (block $while-out$96 + (set_local $$cmp450$i + (i32.gt_u + (get_local $$z$7$i) + (get_local $$a$9$ph$i) + ) ) - ) - (set_local $$cond629$i (if - (get_local $$cmp623$i) - (get_local $$sub626$le$i) - (get_local $$e$5$ph$i) - ) - ) - (set_local $$241 - (i32.lt_s - (get_local $$cond629$i) - (i32.const 0) + (i32.eqz + (get_local $$cmp450$i) + ) + (block + (set_local $$cmp450$lcssa$i + (i32.const 0) + ) + (set_local $$z$7$i$lcssa + (get_local $$z$7$i) + ) + (br $while-out$96) + ) ) - ) - (set_local $$242 - (i32.shr_s - (i32.shl - (get_local $$241) - (i32.const 31) + (set_local $$arrayidx453$i + (i32.add + (get_local $$z$7$i) + (i32.const -4) ) - (i32.const 31) ) - ) - (set_local $$243 - (call $_fmt_u - (get_local $$cond629$i) - (get_local $$242) - (get_local $$arrayidx$i$236) + (set_local $$235 + (i32.load + (get_local $$arrayidx453$i) + ) ) - ) - (set_local $$sub$ptr$rhs$cast634$504$i - (get_local $$243) - ) - (set_local $$sub$ptr$sub635$505$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast634$504$i) + (set_local $$lnot455$i + (i32.eq + (get_local $$235) + (i32.const 0) + ) ) - ) - (set_local $$cmp636$506$i - (i32.lt_s - (get_local $$sub$ptr$sub635$505$i) - (i32.const 2) + (if + (get_local $$lnot455$i) + (set_local $$z$7$i + (get_local $$arrayidx453$i) + ) + (block + (set_local $$cmp450$lcssa$i + (i32.const 1) + ) + (set_local $$z$7$i$lcssa + (get_local $$z$7$i) + ) + (br $while-out$96) + ) ) + (br $while-in$97) ) + ) + (block $do-once$98 (if - (get_local $$cmp636$506$i) + (get_local $$cmp338$i) (block - (set_local $$estr$1507$i - (get_local $$243) + (set_local $$236 + (i32.and + (get_local $$tobool341$i) + (i32.const 1) + ) ) - (loop $while-out$104 $while-in$105 - (set_local $$incdec$ptr639$i - (i32.add - (get_local $$estr$1507$i) - (i32.const -1) - ) + (set_local $$inc468$i + (i32.xor + (get_local $$236) + (i32.const 1) ) - (i32.store8 - (get_local $$incdec$ptr639$i) - (i32.const 48) + ) + (set_local $$$p$inc468$i + (i32.add + (get_local $$inc468$i) + (get_local $$$p$i) ) - (set_local $$sub$ptr$rhs$cast634$i - (get_local $$incdec$ptr639$i) + ) + (set_local $$cmp470$i + (i32.gt_s + (get_local $$$p$inc468$i) + (get_local $$e$5$ph$i) ) - (set_local $$sub$ptr$sub635$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast634$i) - ) + ) + (set_local $$cmp473$i + (i32.gt_s + (get_local $$e$5$ph$i) + (i32.const -5) ) - (set_local $$cmp636$i - (i32.lt_s - (get_local $$sub$ptr$sub635$i) - (i32.const 2) + ) + (set_local $$or$cond2$i + (i32.and + (get_local $$cmp470$i) + (get_local $$cmp473$i) + ) + ) + (if + (get_local $$or$cond2$i) + (block + (set_local $$dec476$i + (i32.add + (get_local $$t$0) + (i32.const -1) + ) + ) + (set_local $$add477$neg$i + (i32.add + (get_local $$$p$inc468$i) + (i32.const -1) + ) + ) + (set_local $$sub478$i + (i32.sub + (get_local $$add477$neg$i) + (get_local $$e$5$ph$i) + ) + ) + (set_local $$p$addr$2$i + (get_local $$sub478$i) + ) + (set_local $$t$addr$0$i + (get_local $$dec476$i) ) ) - (if - (get_local $$cmp636$i) - (set_local $$estr$1507$i - (get_local $$incdec$ptr639$i) + (block + (set_local $$sub480$i + (i32.add + (get_local $$t$0) + (i32.const -2) + ) ) - (block - (set_local $$estr$1$lcssa$i - (get_local $$incdec$ptr639$i) + (set_local $$dec481$i + (i32.add + (get_local $$$p$inc468$i) + (i32.const -1) ) - (br $while-out$104) + ) + (set_local $$p$addr$2$i + (get_local $$dec481$i) + ) + (set_local $$t$addr$0$i + (get_local $$sub480$i) ) ) - (br $while-in$105) - ) - ) - (set_local $$estr$1$lcssa$i - (get_local $$243) - ) - ) - (set_local $$244 - (i32.shr_s - (get_local $$e$5$ph$i) - (i32.const 31) - ) - ) - (set_local $$245 - (i32.and - (get_local $$244) - (i32.const 2) - ) - ) - (set_local $$246 - (i32.add - (get_local $$245) - (i32.const 43) - ) - ) - (set_local $$conv644$i - (i32.and - (get_local $$246) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr645$i - (i32.add - (get_local $$estr$1$lcssa$i) - (i32.const -1) - ) - ) - (i32.store8 - (get_local $$incdec$ptr645$i) - (get_local $$conv644$i) - ) - (set_local $$conv646$i - (i32.and - (get_local $$t$addr$1$i) - (i32.const 255) - ) - ) - (set_local $$incdec$ptr647$i - (i32.add - (get_local $$estr$1$lcssa$i) - (i32.const -2) - ) - ) - (i32.store8 - (get_local $$incdec$ptr647$i) - (get_local $$conv646$i) - ) - (set_local $$sub$ptr$rhs$cast649$i - (get_local $$incdec$ptr647$i) - ) - (set_local $$sub$ptr$sub650$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast649$i) - ) - ) - (set_local $$estr$2$i - (get_local $$incdec$ptr647$i) - ) - (set_local $$sub$ptr$sub650$pn$i - (get_local $$sub$ptr$sub650$i) - ) - ) - ) - (set_local $$add608$i - (i32.add - (get_local $$pl$0$i) - (i32.const 1) - ) - ) - (set_local $$add612$i - (i32.add - (get_local $$add608$i) - (get_local $$p$addr$3$i) - ) - ) - (set_local $$l$1$i - (i32.add - (get_local $$add612$i) - (get_local $$lor$ext$i) - ) - ) - (set_local $$add653$i - (i32.add - (get_local $$l$1$i) - (get_local $$sub$ptr$sub650$pn$i) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$fl$1$and219) - ) - (set_local $$247 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$436$i - (i32.and - (get_local $$247) - (i32.const 32) - ) - ) - (set_local $$tobool$i$437$i - (i32.eq - (get_local $$and$i$436$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$437$i) - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$0$i) - (get_local $$f) - ) - ) - (set_local $$xor655$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 65536) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$xor655$i) - ) - (block $do-once$106 - (if - (get_local $$cmp614$i) - (block - (set_local $$cmp660$i - (i32.gt_u - (get_local $$a$9$ph$i) - (get_local $$arraydecay208$add$ptr213$i) - ) - ) - (set_local $$r$0$a$9$i - (if - (get_local $$cmp660$i) - (get_local $$arraydecay208$add$ptr213$i) - (get_local $$a$9$ph$i) ) - ) - (set_local $$d$5494$i - (get_local $$r$0$a$9$i) - ) - (loop $while-out$114 $while-in$115 - (set_local $$248 - (i32.load - (get_local $$d$5494$i) + (set_local $$and483$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) ) ) - (set_local $$249 - (call $_fmt_u - (get_local $$248) + (set_local $$tobool484$i + (i32.eq + (get_local $$and483$i) (i32.const 0) - (get_local $$add$ptr671$i) ) ) - (set_local $$cmp673$i - (i32.eq - (get_local $$d$5494$i) - (get_local $$r$0$a$9$i) + (if + (i32.eqz + (get_local $$tobool484$i) + ) + (block + (set_local $$and610$pre$phi$iZ2D + (get_local $$and483$i) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$i) + ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) ) ) - (block $do-once$116 + (block $do-once$100 (if - (get_local $$cmp673$i) + (get_local $$cmp450$lcssa$i) (block - (set_local $$cmp686$i + (set_local $$arrayidx489$i + (i32.add + (get_local $$z$7$i$lcssa) + (i32.const -4) + ) + ) + (set_local $$237 + (i32.load + (get_local $$arrayidx489$i) + ) + ) + (set_local $$tobool490$i (i32.eq - (get_local $$249) - (get_local $$add$ptr671$i) + (get_local $$237) + (i32.const 0) ) ) (if - (i32.eqz - (get_local $$cmp686$i) - ) + (get_local $$tobool490$i) (block - (set_local $$s668$1$i - (get_local $$249) + (set_local $$j$2$i + (i32.const 9) ) - (br $do-once$116) + (br $do-once$100) ) ) - (i32.store8 - (get_local $$incdec$ptr689$i) - (i32.const 48) - ) - (set_local $$s668$1$i - (get_local $$incdec$ptr689$i) + (set_local $$rem494$510$i + (i32.and + (call_import $i32u-rem + (get_local $$237) + (i32.const 10) + ) + (i32.const -1) + ) ) - ) - (block - (set_local $$cmp678$491$i - (i32.gt_u - (get_local $$249) - (get_local $$buf$i) + (set_local $$cmp495$511$i + (i32.eq + (get_local $$rem494$510$i) + (i32.const 0) ) ) (if - (get_local $$cmp678$491$i) - (set_local $$s668$0492$i - (get_local $$249) + (get_local $$cmp495$511$i) + (block + (set_local $$i$3512$i + (i32.const 10) + ) + (set_local $$j$1513$i + (i32.const 0) + ) ) (block - (set_local $$s668$1$i - (get_local $$249) + (set_local $$j$2$i + (i32.const 0) ) - (br $do-once$116) + (br $do-once$100) ) ) - (loop $while-out$118 $while-in$119 - (set_local $$incdec$ptr681$i - (i32.add - (get_local $$s668$0492$i) - (i32.const -1) + (loop $while-in$103 + (block $while-out$102 + (set_local $$mul499$i + (i32.mul + (get_local $$i$3512$i) + (i32.const 10) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr681$i) - (i32.const 48) - ) - (set_local $$cmp678$i - (i32.gt_u - (get_local $$incdec$ptr681$i) - (get_local $$buf$i) + (set_local $$inc500$i + (i32.add + (get_local $$j$1513$i) + (i32.const 1) + ) ) - ) - (if - (get_local $$cmp678$i) - (set_local $$s668$0492$i - (get_local $$incdec$ptr681$i) + (set_local $$rem494$i + (i32.and + (call_import $i32u-rem + (get_local $$237) + (get_local $$mul499$i) + ) + (i32.const -1) + ) ) - (block - (set_local $$s668$1$i - (get_local $$incdec$ptr681$i) + (set_local $$cmp495$i + (i32.eq + (get_local $$rem494$i) + (i32.const 0) + ) + ) + (if + (get_local $$cmp495$i) + (block + (set_local $$i$3512$i + (get_local $$mul499$i) + ) + (set_local $$j$1513$i + (get_local $$inc500$i) + ) + ) + (block + (set_local $$j$2$i + (get_local $$inc500$i) + ) + (br $while-out$102) ) - (br $while-out$118) ) + (br $while-in$103) ) - (br $while-in$119) ) ) + (set_local $$j$2$i + (i32.const 9) + ) ) ) - (set_local $$250 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$442$i - (i32.and - (get_local $$250) + (set_local $$or504$i + (i32.or + (get_local $$t$addr$0$i) (i32.const 32) ) ) - (set_local $$tobool$i$443$i + (set_local $$cmp505$i (i32.eq - (get_local $$and$i$442$i) - (i32.const 0) + (get_local $$or504$i) + (i32.const 102) + ) + ) + (set_local $$sub$ptr$lhs$cast508$i + (get_local $$z$7$i$lcssa) + ) + (set_local $$sub$ptr$sub510$i + (i32.sub + (get_local $$sub$ptr$lhs$cast508$i) + (get_local $$sub$ptr$rhs$cast345$i) + ) + ) + (set_local $$sub$ptr$div511$i + (i32.shr_s + (get_local $$sub$ptr$sub510$i) + (i32.const 2) + ) + ) + (set_local $$238 + (i32.mul + (get_local $$sub$ptr$div511$i) + (i32.const 9) + ) + ) + (set_local $$mul513$i + (i32.add + (get_local $$238) + (i32.const -9) ) ) (if - (get_local $$tobool$i$443$i) + (get_local $$cmp505$i) + (block + (set_local $$sub514$i + (i32.sub + (get_local $$mul513$i) + (get_local $$j$2$i) + ) + ) + (set_local $$cmp515$i + (i32.lt_s + (get_local $$sub514$i) + (i32.const 0) + ) + ) + (set_local $$$sub514$i + (if + (get_local $$cmp515$i) + (i32.const 0) + (get_local $$sub514$i) + ) + ) + (set_local $$cmp528$i + (i32.lt_s + (get_local $$p$addr$2$i) + (get_local $$$sub514$i) + ) + ) + (set_local $$p$addr$2$$sub514398$i + (if + (get_local $$cmp528$i) + (get_local $$p$addr$2$i) + (get_local $$$sub514$i) + ) + ) + (set_local $$and610$pre$phi$iZ2D + (i32.const 0) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$$sub514398$i) + ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) + ) (block - (set_local $$sub$ptr$rhs$cast695$i - (get_local $$s668$1$i) + (set_local $$add561$i + (i32.add + (get_local $$mul513$i) + (get_local $$e$5$ph$i) + ) ) - (set_local $$sub$ptr$sub696$i + (set_local $$sub562$i (i32.sub - (get_local $$sub$ptr$lhs$cast694$i) - (get_local $$sub$ptr$rhs$cast695$i) + (get_local $$add561$i) + (get_local $$j$2$i) + ) + ) + (set_local $$cmp563$i + (i32.lt_s + (get_local $$sub562$i) + (i32.const 0) + ) + ) + (set_local $$$sub562$i + (if + (get_local $$cmp563$i) + (i32.const 0) + (get_local $$sub562$i) + ) + ) + (set_local $$cmp577$i + (i32.lt_s + (get_local $$p$addr$2$i) + (get_local $$$sub562$i) + ) + ) + (set_local $$p$addr$2$$sub562399$i + (if + (get_local $$cmp577$i) + (get_local $$p$addr$2$i) + (get_local $$$sub562$i) ) ) - (call $___fwritex - (get_local $$s668$1$i) - (get_local $$sub$ptr$sub696$i) - (get_local $$f) + (set_local $$and610$pre$phi$iZ2D + (i32.const 0) + ) + (set_local $$p$addr$3$i + (get_local $$p$addr$2$$sub562399$i) ) + (set_local $$t$addr$1$i + (get_local $$t$addr$0$i) + ) + (br $do-once$98) ) ) - (set_local $$incdec$ptr698$i - (i32.add - (get_local $$d$5494$i) - (i32.const 4) + ) + (block + (set_local $$$pre567$i + (i32.and + (get_local $$fl$1$and219) + (i32.const 8) ) ) - (set_local $$cmp665$i - (i32.gt_u - (get_local $$incdec$ptr698$i) - (get_local $$arraydecay208$add$ptr213$i) - ) + (set_local $$and610$pre$phi$iZ2D + (get_local $$$pre567$i) + ) + (set_local $$p$addr$3$i + (get_local $$$p$i) ) + (set_local $$t$addr$1$i + (get_local $$t$0) + ) + ) + ) + ) + (set_local $$239 + (i32.or + (get_local $$p$addr$3$i) + (get_local $$and610$pre$phi$iZ2D) + ) + ) + (set_local $$240 + (i32.ne + (get_local $$239) + (i32.const 0) + ) + ) + (set_local $$lor$ext$i + (i32.and + (get_local $$240) + (i32.const 1) + ) + ) + (set_local $$or613$i + (i32.or + (get_local $$t$addr$1$i) + (i32.const 32) + ) + ) + (set_local $$cmp614$i + (i32.eq + (get_local $$or613$i) + (i32.const 102) + ) + ) + (if + (get_local $$cmp614$i) + (block + (set_local $$cmp617$i + (i32.gt_s + (get_local $$e$5$ph$i) + (i32.const 0) + ) + ) + (set_local $$add620$i (if - (get_local $$cmp665$i) - (block - (set_local $$incdec$ptr698$i$lcssa - (get_local $$incdec$ptr698$i) - ) - (br $while-out$114) - ) - (set_local $$d$5494$i - (get_local $$incdec$ptr698$i) - ) + (get_local $$cmp617$i) + (get_local $$e$5$ph$i) + (i32.const 0) ) - (br $while-in$115) ) - (set_local $$251 - (i32.eq - (get_local $$239) + (set_local $$estr$2$i + (i32.const 0) + ) + (set_local $$sub$ptr$sub650$pn$i + (get_local $$add620$i) + ) + ) + (block + (set_local $$cmp623$i + (i32.lt_s + (get_local $$e$5$ph$i) (i32.const 0) ) ) - (block $do-once$120 + (set_local $$cond629$i (if - (i32.eqz - (get_local $$251) + (get_local $$cmp623$i) + (get_local $$sub626$le$i) + (get_local $$e$5$ph$i) + ) + ) + (set_local $$241 + (i32.lt_s + (get_local $$cond629$i) + (i32.const 0) + ) + ) + (set_local $$242 + (i32.shr_s + (i32.shl + (get_local $$241) + (i32.const 31) ) - (block - (set_local $$252 - (i32.load - (get_local $$f) + (i32.const 31) + ) + ) + (set_local $$243 + (call $_fmt_u + (get_local $$cond629$i) + (get_local $$242) + (get_local $$arrayidx$i$236) + ) + ) + (set_local $$sub$ptr$rhs$cast634$504$i + (get_local $$243) + ) + (set_local $$sub$ptr$sub635$505$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast634$504$i) + ) + ) + (set_local $$cmp636$506$i + (i32.lt_s + (get_local $$sub$ptr$sub635$505$i) + (i32.const 2) + ) + ) + (if + (get_local $$cmp636$506$i) + (block + (set_local $$estr$1507$i + (get_local $$243) + ) + (loop $while-in$105 + (block $while-out$104 + (set_local $$incdec$ptr639$i + (i32.add + (get_local $$estr$1507$i) + (i32.const -1) + ) ) - ) - (set_local $$and$i$448$i - (i32.and - (get_local $$252) - (i32.const 32) + (i32.store8 + (get_local $$incdec$ptr639$i) + (i32.const 48) ) - ) - (set_local $$tobool$i$449$i - (i32.eq - (get_local $$and$i$448$i) - (i32.const 0) + (set_local $$sub$ptr$rhs$cast634$i + (get_local $$incdec$ptr639$i) ) - ) - (if - (i32.eqz - (get_local $$tobool$i$449$i) + (set_local $$sub$ptr$sub635$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast634$i) + ) + ) + (set_local $$cmp636$i + (i32.lt_s + (get_local $$sub$ptr$sub635$i) + (i32.const 2) + ) + ) + (if + (get_local $$cmp636$i) + (set_local $$estr$1507$i + (get_local $$incdec$ptr639$i) + ) + (block + (set_local $$estr$1$lcssa$i + (get_local $$incdec$ptr639$i) + ) + (br $while-out$104) + ) ) - (br $do-once$120) - ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (br $while-in$105) ) ) ) + (set_local $$estr$1$lcssa$i + (get_local $$243) + ) ) - (set_local $$cmp707$486$i - (i32.lt_u - (get_local $$incdec$ptr698$i$lcssa) - (get_local $$z$7$i$lcssa) + (set_local $$244 + (i32.shr_s + (get_local $$e$5$ph$i) + (i32.const 31) ) ) - (set_local $$cmp710$487$i - (i32.gt_s - (get_local $$p$addr$3$i) - (i32.const 0) + (set_local $$245 + (i32.and + (get_local $$244) + (i32.const 2) + ) + ) + (set_local $$246 + (i32.add + (get_local $$245) + (i32.const 43) ) ) - (set_local $$253 + (set_local $$conv644$i (i32.and - (get_local $$cmp710$487$i) - (get_local $$cmp707$486$i) + (get_local $$246) + (i32.const 255) ) ) - (if - (get_local $$253) - (block - (set_local $$d$6488$i - (get_local $$incdec$ptr698$i$lcssa) + (set_local $$incdec$ptr645$i + (i32.add + (get_local $$estr$1$lcssa$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr645$i) + (get_local $$conv644$i) + ) + (set_local $$conv646$i + (i32.and + (get_local $$t$addr$1$i) + (i32.const 255) + ) + ) + (set_local $$incdec$ptr647$i + (i32.add + (get_local $$estr$1$lcssa$i) + (i32.const -2) + ) + ) + (i32.store8 + (get_local $$incdec$ptr647$i) + (get_local $$conv646$i) + ) + (set_local $$sub$ptr$rhs$cast649$i + (get_local $$incdec$ptr647$i) + ) + (set_local $$sub$ptr$sub650$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast649$i) + ) + ) + (set_local $$estr$2$i + (get_local $$incdec$ptr647$i) + ) + (set_local $$sub$ptr$sub650$pn$i + (get_local $$sub$ptr$sub650$i) + ) + ) + ) + (set_local $$add608$i + (i32.add + (get_local $$pl$0$i) + (i32.const 1) + ) + ) + (set_local $$add612$i + (i32.add + (get_local $$add608$i) + (get_local $$p$addr$3$i) + ) + ) + (set_local $$l$1$i + (i32.add + (get_local $$add612$i) + (get_local $$lor$ext$i) + ) + ) + (set_local $$add653$i + (i32.add + (get_local $$l$1$i) + (get_local $$sub$ptr$sub650$pn$i) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$add653$i) + (get_local $$fl$1$and219) + ) + (set_local $$247 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$436$i + (i32.and + (get_local $$247) + (i32.const 32) + ) + ) + (set_local $$tobool$i$437$i + (i32.eq + (get_local $$and$i$436$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$437$i) + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$0$i) + (get_local $$f) + ) + ) + (set_local $$xor655$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$1) + (get_local $$add653$i) + (get_local $$xor655$i) + ) + (block $do-once$106 + (if + (get_local $$cmp614$i) + (block + (set_local $$cmp660$i + (i32.gt_u + (get_local $$a$9$ph$i) + (get_local $$arraydecay208$add$ptr213$i) ) - (set_local $$p$addr$4489$i - (get_local $$p$addr$3$i) + ) + (set_local $$r$0$a$9$i + (if + (get_local $$cmp660$i) + (get_local $$arraydecay208$add$ptr213$i) + (get_local $$a$9$ph$i) ) - (loop $while-out$122 $while-in$123 - (set_local $$254 + ) + (set_local $$d$5494$i + (get_local $$r$0$a$9$i) + ) + (loop $while-in$115 + (block $while-out$114 + (set_local $$248 (i32.load - (get_local $$d$6488$i) + (get_local $$d$5494$i) ) ) - (set_local $$255 + (set_local $$249 (call $_fmt_u - (get_local $$254) + (get_local $$248) (i32.const 0) (get_local $$add$ptr671$i) ) ) - (set_local $$cmp722$483$i - (i32.gt_u - (get_local $$255) - (get_local $$buf$i) + (set_local $$cmp673$i + (i32.eq + (get_local $$d$5494$i) + (get_local $$r$0$a$9$i) ) ) - (if - (get_local $$cmp722$483$i) - (block - (set_local $$s715$0484$i - (get_local $$255) - ) - (loop $while-out$124 $while-in$125 - (set_local $$incdec$ptr725$i - (i32.add - (get_local $$s715$0484$i) - (i32.const -1) + (block $do-once$116 + (if + (get_local $$cmp673$i) + (block + (set_local $$cmp686$i + (i32.eq + (get_local $$249) + (get_local $$add$ptr671$i) + ) + ) + (if + (i32.eqz + (get_local $$cmp686$i) + ) + (block + (set_local $$s668$1$i + (get_local $$249) + ) + (br $do-once$116) ) ) (i32.store8 - (get_local $$incdec$ptr725$i) + (get_local $$incdec$ptr689$i) (i32.const 48) ) - (set_local $$cmp722$i + (set_local $$s668$1$i + (get_local $$incdec$ptr689$i) + ) + ) + (block + (set_local $$cmp678$491$i (i32.gt_u - (get_local $$incdec$ptr725$i) + (get_local $$249) (get_local $$buf$i) ) ) (if - (get_local $$cmp722$i) - (set_local $$s715$0484$i - (get_local $$incdec$ptr725$i) + (get_local $$cmp678$491$i) + (set_local $$s668$0492$i + (get_local $$249) ) (block - (set_local $$s715$0$lcssa$i - (get_local $$incdec$ptr725$i) + (set_local $$s668$1$i + (get_local $$249) + ) + (br $do-once$116) + ) + ) + (loop $while-in$119 + (block $while-out$118 + (set_local $$incdec$ptr681$i + (i32.add + (get_local $$s668$0492$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr681$i) + (i32.const 48) + ) + (set_local $$cmp678$i + (i32.gt_u + (get_local $$incdec$ptr681$i) + (get_local $$buf$i) + ) ) - (br $while-out$124) + (if + (get_local $$cmp678$i) + (set_local $$s668$0492$i + (get_local $$incdec$ptr681$i) + ) + (block + (set_local $$s668$1$i + (get_local $$incdec$ptr681$i) + ) + (br $while-out$118) + ) + ) + (br $while-in$119) ) ) - (br $while-in$125) ) ) - (set_local $$s715$0$lcssa$i - (get_local $$255) - ) ) - (set_local $$256 + (set_local $$250 (i32.load (get_local $$f) ) ) - (set_local $$and$i$454$i + (set_local $$and$i$442$i (i32.and - (get_local $$256) + (get_local $$250) (i32.const 32) ) ) - (set_local $$tobool$i$455$i + (set_local $$tobool$i$443$i (i32.eq - (get_local $$and$i$454$i) + (get_local $$and$i$442$i) (i32.const 0) ) ) (if - (get_local $$tobool$i$455$i) + (get_local $$tobool$i$443$i) (block - (set_local $$cmp727$i - (i32.gt_s - (get_local $$p$addr$4489$i) - (i32.const 9) - ) + (set_local $$sub$ptr$rhs$cast695$i + (get_local $$s668$1$i) ) - (set_local $$cond732$i - (if - (get_local $$cmp727$i) - (i32.const 9) - (get_local $$p$addr$4489$i) + (set_local $$sub$ptr$sub696$i + (i32.sub + (get_local $$sub$ptr$lhs$cast694$i) + (get_local $$sub$ptr$rhs$cast695$i) ) ) (call $___fwritex - (get_local $$s715$0$lcssa$i) - (get_local $$cond732$i) + (get_local $$s668$1$i) + (get_local $$sub$ptr$sub696$i) (get_local $$f) ) ) ) - (set_local $$incdec$ptr734$i + (set_local $$incdec$ptr698$i (i32.add - (get_local $$d$6488$i) + (get_local $$d$5494$i) (i32.const 4) ) ) - (set_local $$sub735$i - (i32.add - (get_local $$p$addr$4489$i) - (i32.const -9) + (set_local $$cmp665$i + (i32.gt_u + (get_local $$incdec$ptr698$i) + (get_local $$arraydecay208$add$ptr213$i) ) ) - (set_local $$cmp707$i - (i32.lt_u - (get_local $$incdec$ptr734$i) - (get_local $$z$7$i$lcssa) + (if + (get_local $$cmp665$i) + (block + (set_local $$incdec$ptr698$i$lcssa + (get_local $$incdec$ptr698$i) + ) + (br $while-out$114) ) - ) - (set_local $$cmp710$i - (i32.gt_s - (get_local $$p$addr$4489$i) - (i32.const 9) + (set_local $$d$5494$i + (get_local $$incdec$ptr698$i) ) ) - (set_local $$257 - (i32.and - (get_local $$cmp710$i) - (get_local $$cmp707$i) + (br $while-in$115) + ) + ) + (set_local $$251 + (i32.eq + (get_local $$239) + (i32.const 0) + ) + ) + (block $do-once$120 + (if + (i32.eqz + (get_local $$251) + ) + (block + (set_local $$252 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$448$i + (i32.and + (get_local $$252) + (i32.const 32) + ) + ) + (set_local $$tobool$i$449$i + (i32.eq + (get_local $$and$i$448$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $$tobool$i$449$i) + ) + (br $do-once$120) + ) + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) ) ) - (if - (get_local $$257) - (block - (set_local $$d$6488$i - (get_local $$incdec$ptr734$i) + ) + ) + (set_local $$cmp707$486$i + (i32.lt_u + (get_local $$incdec$ptr698$i$lcssa) + (get_local $$z$7$i$lcssa) + ) + ) + (set_local $$cmp710$487$i + (i32.gt_s + (get_local $$p$addr$3$i) + (i32.const 0) + ) + ) + (set_local $$253 + (i32.and + (get_local $$cmp710$487$i) + (get_local $$cmp707$486$i) + ) + ) + (if + (get_local $$253) + (block + (set_local $$d$6488$i + (get_local $$incdec$ptr698$i$lcssa) + ) + (set_local $$p$addr$4489$i + (get_local $$p$addr$3$i) + ) + (loop $while-in$123 + (block $while-out$122 + (set_local $$254 + (i32.load + (get_local $$d$6488$i) + ) + ) + (set_local $$255 + (call $_fmt_u + (get_local $$254) + (i32.const 0) + (get_local $$add$ptr671$i) + ) + ) + (set_local $$cmp722$483$i + (i32.gt_u + (get_local $$255) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp722$483$i) + (block + (set_local $$s715$0484$i + (get_local $$255) + ) + (loop $while-in$125 + (block $while-out$124 + (set_local $$incdec$ptr725$i + (i32.add + (get_local $$s715$0484$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr725$i) + (i32.const 48) + ) + (set_local $$cmp722$i + (i32.gt_u + (get_local $$incdec$ptr725$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp722$i) + (set_local $$s715$0484$i + (get_local $$incdec$ptr725$i) + ) + (block + (set_local $$s715$0$lcssa$i + (get_local $$incdec$ptr725$i) + ) + (br $while-out$124) + ) + ) + (br $while-in$125) + ) + ) + ) + (set_local $$s715$0$lcssa$i + (get_local $$255) + ) + ) + (set_local $$256 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$454$i + (i32.and + (get_local $$256) + (i32.const 32) + ) + ) + (set_local $$tobool$i$455$i + (i32.eq + (get_local $$and$i$454$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$455$i) + (block + (set_local $$cmp727$i + (i32.gt_s + (get_local $$p$addr$4489$i) + (i32.const 9) + ) + ) + (set_local $$cond732$i + (if + (get_local $$cmp727$i) + (i32.const 9) + (get_local $$p$addr$4489$i) + ) + ) + (call $___fwritex + (get_local $$s715$0$lcssa$i) + (get_local $$cond732$i) + (get_local $$f) + ) + ) ) - (set_local $$p$addr$4489$i - (get_local $$sub735$i) + (set_local $$incdec$ptr734$i + (i32.add + (get_local $$d$6488$i) + (i32.const 4) + ) ) - ) - (block - (set_local $$p$addr$4$lcssa$i - (get_local $$sub735$i) + (set_local $$sub735$i + (i32.add + (get_local $$p$addr$4489$i) + (i32.const -9) + ) + ) + (set_local $$cmp707$i + (i32.lt_u + (get_local $$incdec$ptr734$i) + (get_local $$z$7$i$lcssa) + ) + ) + (set_local $$cmp710$i + (i32.gt_s + (get_local $$p$addr$4489$i) + (i32.const 9) + ) + ) + (set_local $$257 + (i32.and + (get_local $$cmp710$i) + (get_local $$cmp707$i) + ) + ) + (if + (get_local $$257) + (block + (set_local $$d$6488$i + (get_local $$incdec$ptr734$i) + ) + (set_local $$p$addr$4489$i + (get_local $$sub735$i) + ) + ) + (block + (set_local $$p$addr$4$lcssa$i + (get_local $$sub735$i) + ) + (br $while-out$122) + ) ) - (br $while-out$122) + (br $while-in$123) ) ) - (br $while-in$123) + ) + (set_local $$p$addr$4$lcssa$i + (get_local $$p$addr$3$i) ) ) - (set_local $$p$addr$4$lcssa$i - (get_local $$p$addr$3$i) + (set_local $$add737$i + (i32.add + (get_local $$p$addr$4$lcssa$i) + (i32.const 9) + ) ) - ) - (set_local $$add737$i - (i32.add - (get_local $$p$addr$4$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$add737$i) (i32.const 9) + (i32.const 0) ) ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$add737$i) - (i32.const 9) - (i32.const 0) - ) - ) - (block - (set_local $$add$ptr742$i - (i32.add - (get_local $$a$9$ph$i) - (i32.const 4) - ) - ) - (set_local $$z$7$add$ptr742$i - (if - (get_local $$cmp450$lcssa$i) - (get_local $$z$7$i$lcssa) - (get_local $$add$ptr742$i) - ) - ) - (set_local $$cmp748$499$i - (i32.gt_s - (get_local $$p$addr$3$i) - (i32.const -1) - ) - ) - (if - (get_local $$cmp748$499$i) - (block - (set_local $$tobool781$i - (i32.eq - (get_local $$and610$pre$phi$iZ2D) - (i32.const 0) - ) - ) - (set_local $$d$7500$i + (block + (set_local $$add$ptr742$i + (i32.add (get_local $$a$9$ph$i) + (i32.const 4) ) - (set_local $$p$addr$5501$i + ) + (set_local $$z$7$add$ptr742$i + (if + (get_local $$cmp450$lcssa$i) + (get_local $$z$7$i$lcssa) + (get_local $$add$ptr742$i) + ) + ) + (set_local $$cmp748$499$i + (i32.gt_s (get_local $$p$addr$3$i) + (i32.const -1) ) - (loop $while-out$108 $while-in$109 - (set_local $$258 - (i32.load - (get_local $$d$7500$i) - ) - ) - (set_local $$259 - (call $_fmt_u - (get_local $$258) - (i32.const 0) - (get_local $$add$ptr671$i) - ) - ) - (set_local $$cmp760$i + ) + (if + (get_local $$cmp748$499$i) + (block + (set_local $$tobool781$i (i32.eq - (get_local $$259) - (get_local $$add$ptr671$i) + (get_local $$and610$pre$phi$iZ2D) + (i32.const 0) ) ) - (if - (get_local $$cmp760$i) - (block - (i32.store8 - (get_local $$incdec$ptr689$i) - (i32.const 48) - ) - (set_local $$s753$0$i - (get_local $$incdec$ptr689$i) - ) - ) - (set_local $$s753$0$i - (get_local $$259) - ) + (set_local $$d$7500$i + (get_local $$a$9$ph$i) ) - (set_local $$cmp765$i - (i32.eq - (get_local $$d$7500$i) - (get_local $$a$9$ph$i) - ) + (set_local $$p$addr$5501$i + (get_local $$p$addr$3$i) ) - (block $do-once$110 - (if - (get_local $$cmp765$i) - (block - (set_local $$incdec$ptr776$i - (i32.add - (get_local $$s753$0$i) - (i32.const 1) - ) + (loop $while-in$109 + (block $while-out$108 + (set_local $$258 + (i32.load + (get_local $$d$7500$i) ) - (set_local $$260 - (i32.load - (get_local $$f) - ) + ) + (set_local $$259 + (call $_fmt_u + (get_local $$258) + (i32.const 0) + (get_local $$add$ptr671$i) ) - (set_local $$and$i$460$i - (i32.and - (get_local $$260) - (i32.const 32) - ) + ) + (set_local $$cmp760$i + (i32.eq + (get_local $$259) + (get_local $$add$ptr671$i) ) - (set_local $$tobool$i$461$i - (i32.eq - (get_local $$and$i$460$i) - (i32.const 0) + ) + (if + (get_local $$cmp760$i) + (block + (i32.store8 + (get_local $$incdec$ptr689$i) + (i32.const 48) ) - ) - (if - (get_local $$tobool$i$461$i) - (call $___fwritex - (get_local $$s753$0$i) - (i32.const 1) - (get_local $$f) + (set_local $$s753$0$i + (get_local $$incdec$ptr689$i) ) ) - (set_local $$cmp777$i - (i32.lt_s - (get_local $$p$addr$5501$i) - (i32.const 1) - ) + (set_local $$s753$0$i + (get_local $$259) ) - (set_local $$or$cond401$i - (i32.and - (get_local $$tobool781$i) - (get_local $$cmp777$i) - ) + ) + (set_local $$cmp765$i + (i32.eq + (get_local $$d$7500$i) + (get_local $$a$9$ph$i) ) + ) + (block $do-once$110 (if - (get_local $$or$cond401$i) + (get_local $$cmp765$i) (block + (set_local $$incdec$ptr776$i + (i32.add + (get_local $$s753$0$i) + (i32.const 1) + ) + ) + (set_local $$260 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$460$i + (i32.and + (get_local $$260) + (i32.const 32) + ) + ) + (set_local $$tobool$i$461$i + (i32.eq + (get_local $$and$i$460$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$461$i) + (call $___fwritex + (get_local $$s753$0$i) + (i32.const 1) + (get_local $$f) + ) + ) + (set_local $$cmp777$i + (i32.lt_s + (get_local $$p$addr$5501$i) + (i32.const 1) + ) + ) + (set_local $$or$cond401$i + (i32.and + (get_local $$tobool781$i) + (get_local $$cmp777$i) + ) + ) + (if + (get_local $$or$cond401$i) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr776$i) + ) + (br $do-once$110) + ) + ) + (set_local $$261 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$466$i + (i32.and + (get_local $$261) + (i32.const 32) + ) + ) + (set_local $$tobool$i$467$i + (i32.eq + (get_local $$and$i$466$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (get_local $$tobool$i$467$i) + ) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr776$i) + ) + (br $do-once$110) + ) + ) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) + ) (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) - ) - ) - (set_local $$261 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$466$i - (i32.and - (get_local $$261) - (i32.const 32) - ) - ) - (set_local $$tobool$i$467$i - (i32.eq - (get_local $$and$i$466$i) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$tobool$i$467$i) ) (block - (set_local $$s753$2$i - (get_local $$incdec$ptr776$i) + (set_local $$cmp770$495$i + (i32.gt_u + (get_local $$s753$0$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp770$495$i) + (set_local $$s753$1496$i + (get_local $$s753$0$i) + ) + (block + (set_local $$s753$2$i + (get_local $$s753$0$i) + ) + (br $do-once$110) + ) + ) + (loop $while-in$113 + (block $while-out$112 + (set_local $$incdec$ptr773$i + (i32.add + (get_local $$s753$1496$i) + (i32.const -1) + ) + ) + (i32.store8 + (get_local $$incdec$ptr773$i) + (i32.const 48) + ) + (set_local $$cmp770$i + (i32.gt_u + (get_local $$incdec$ptr773$i) + (get_local $$buf$i) + ) + ) + (if + (get_local $$cmp770$i) + (set_local $$s753$1496$i + (get_local $$incdec$ptr773$i) + ) + (block + (set_local $$s753$2$i + (get_local $$incdec$ptr773$i) + ) + (br $while-out$112) + ) + ) + (br $while-in$113) + ) ) - (br $do-once$110) ) ) - (drop - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) - ) + ) + (set_local $$sub$ptr$rhs$cast788$i + (get_local $$s753$2$i) + ) + (set_local $$sub$ptr$sub789$i + (i32.sub + (get_local $$sub$ptr$lhs$cast694$i) + (get_local $$sub$ptr$rhs$cast788$i) ) - (set_local $$s753$2$i - (get_local $$incdec$ptr776$i) + ) + (set_local $$262 + (i32.load + (get_local $$f) ) ) - (block - (set_local $$cmp770$495$i - (i32.gt_u - (get_local $$s753$0$i) - (get_local $$buf$i) - ) + (set_local $$and$i$472$i + (i32.and + (get_local $$262) + (i32.const 32) ) - (if - (get_local $$cmp770$495$i) - (set_local $$s753$1496$i - (get_local $$s753$0$i) - ) - (block - (set_local $$s753$2$i - (get_local $$s753$0$i) - ) - (br $do-once$110) - ) + ) + (set_local $$tobool$i$473$i + (i32.eq + (get_local $$and$i$472$i) + (i32.const 0) ) - (loop $while-out$112 $while-in$113 - (set_local $$incdec$ptr773$i - (i32.add - (get_local $$s753$1496$i) - (i32.const -1) + ) + (if + (get_local $$tobool$i$473$i) + (block + (set_local $$cmp790$i + (i32.gt_s + (get_local $$p$addr$5501$i) + (get_local $$sub$ptr$sub789$i) ) ) - (i32.store8 - (get_local $$incdec$ptr773$i) - (i32.const 48) - ) - (set_local $$cmp770$i - (i32.gt_u - (get_local $$incdec$ptr773$i) - (get_local $$buf$i) + (set_local $$cond800$i + (if + (get_local $$cmp790$i) + (get_local $$sub$ptr$sub789$i) + (get_local $$p$addr$5501$i) ) ) - (if - (get_local $$cmp770$i) - (set_local $$s753$1496$i - (get_local $$incdec$ptr773$i) - ) - (block - (set_local $$s753$2$i - (get_local $$incdec$ptr773$i) - ) - (br $while-out$112) - ) + (call $___fwritex + (get_local $$s753$2$i) + (get_local $$cond800$i) + (get_local $$f) ) - (br $while-in$113) ) ) - ) - ) - (set_local $$sub$ptr$rhs$cast788$i - (get_local $$s753$2$i) - ) - (set_local $$sub$ptr$sub789$i - (i32.sub - (get_local $$sub$ptr$lhs$cast694$i) - (get_local $$sub$ptr$rhs$cast788$i) - ) - ) - (set_local $$262 - (i32.load - (get_local $$f) - ) - ) - (set_local $$and$i$472$i - (i32.and - (get_local $$262) - (i32.const 32) - ) - ) - (set_local $$tobool$i$473$i - (i32.eq - (get_local $$and$i$472$i) - (i32.const 0) - ) - ) - (if - (get_local $$tobool$i$473$i) - (block - (set_local $$cmp790$i - (i32.gt_s + (set_local $$sub806$i + (i32.sub (get_local $$p$addr$5501$i) (get_local $$sub$ptr$sub789$i) ) ) - (set_local $$cond800$i - (if - (get_local $$cmp790$i) - (get_local $$sub$ptr$sub789$i) - (get_local $$p$addr$5501$i) + (set_local $$incdec$ptr808$i + (i32.add + (get_local $$d$7500$i) + (i32.const 4) ) ) - (call $___fwritex - (get_local $$s753$2$i) - (get_local $$cond800$i) - (get_local $$f) + (set_local $$cmp745$i + (i32.lt_u + (get_local $$incdec$ptr808$i) + (get_local $$z$7$add$ptr742$i) + ) ) - ) - ) - (set_local $$sub806$i - (i32.sub - (get_local $$p$addr$5501$i) - (get_local $$sub$ptr$sub789$i) - ) - ) - (set_local $$incdec$ptr808$i - (i32.add - (get_local $$d$7500$i) - (i32.const 4) - ) - ) - (set_local $$cmp745$i - (i32.lt_u - (get_local $$incdec$ptr808$i) - (get_local $$z$7$add$ptr742$i) - ) - ) - (set_local $$cmp748$i - (i32.gt_s - (get_local $$sub806$i) - (i32.const -1) - ) - ) - (set_local $$263 - (i32.and - (get_local $$cmp745$i) - (get_local $$cmp748$i) - ) - ) - (if - (get_local $$263) - (block - (set_local $$d$7500$i - (get_local $$incdec$ptr808$i) + (set_local $$cmp748$i + (i32.gt_s + (get_local $$sub806$i) + (i32.const -1) + ) ) - (set_local $$p$addr$5501$i - (get_local $$sub806$i) + (set_local $$263 + (i32.and + (get_local $$cmp745$i) + (get_local $$cmp748$i) + ) ) - ) - (block - (set_local $$p$addr$5$lcssa$i - (get_local $$sub806$i) + (if + (get_local $$263) + (block + (set_local $$d$7500$i + (get_local $$incdec$ptr808$i) + ) + (set_local $$p$addr$5501$i + (get_local $$sub806$i) + ) + ) + (block + (set_local $$p$addr$5$lcssa$i + (get_local $$sub806$i) + ) + (br $while-out$108) + ) ) - (br $while-out$108) + (br $while-in$109) ) ) - (br $while-in$109) + ) + (set_local $$p$addr$5$lcssa$i + (get_local $$p$addr$3$i) ) ) - (set_local $$p$addr$5$lcssa$i - (get_local $$p$addr$3$i) + (set_local $$add810$i + (i32.add + (get_local $$p$addr$5$lcssa$i) + (i32.const 18) + ) ) - ) - (set_local $$add810$i - (i32.add - (get_local $$p$addr$5$lcssa$i) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$add810$i) (i32.const 18) + (i32.const 0) ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$add810$i) - (i32.const 18) - (i32.const 0) - ) - (set_local $$264 - (i32.load - (get_local $$f) + (set_local $$264 + (i32.load + (get_local $$f) + ) ) - ) - (set_local $$and$i$i - (i32.and - (get_local $$264) - (i32.const 32) + (set_local $$and$i$i + (i32.and + (get_local $$264) + (i32.const 32) + ) ) - ) - (set_local $$tobool$i$i - (i32.eq - (get_local $$and$i$i) - (i32.const 0) + (set_local $$tobool$i$i + (i32.eq + (get_local $$and$i$i) + (i32.const 0) + ) ) - ) - (if - (i32.eqz - (get_local $$tobool$i$i) + (if + (i32.eqz + (get_local $$tobool$i$i) + ) + (br $do-once$106) ) - (br $do-once$106) - ) - (set_local $$sub$ptr$rhs$cast812$i - (get_local $$estr$2$i) - ) - (set_local $$sub$ptr$sub813$i - (i32.sub - (get_local $$sub$ptr$lhs$cast160$i) - (get_local $$sub$ptr$rhs$cast812$i) + (set_local $$sub$ptr$rhs$cast812$i + (get_local $$estr$2$i) + ) + (set_local $$sub$ptr$sub813$i + (i32.sub + (get_local $$sub$ptr$lhs$cast160$i) + (get_local $$sub$ptr$rhs$cast812$i) + ) + ) + (call $___fwritex + (get_local $$estr$2$i) + (get_local $$sub$ptr$sub813$i) + (get_local $$f) ) - ) - (call $___fwritex - (get_local $$estr$2$i) - (get_local $$sub$ptr$sub813$i) - (get_local $$f) ) ) ) - ) - (set_local $$xor816$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) - ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add653$i) - (get_local $$xor816$i) - ) - (set_local $$cmp818$i - (i32.lt_s - (get_local $$add653$i) - (get_local $$w$1) + (set_local $$xor816$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$w$add653$i - (if - (get_local $$cmp818$i) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$add653$i) + (get_local $$xor816$i) ) - ) - (set_local $$retval$0$i - (get_local $$w$add653$i) - ) - ) - (block - (set_local $$and36$i - (i32.and - (get_local $$t$0) - (i32.const 32) + (set_local $$cmp818$i + (i32.lt_s + (get_local $$add653$i) + (get_local $$w$1) + ) ) - ) - (set_local $$tobool37$i - (i32.ne - (get_local $$and36$i) - (i32.const 0) + (set_local $$w$add653$i + (if + (get_local $$cmp818$i) + (get_local $$w$1) + (get_local $$add653$i) + ) ) - ) - (set_local $$cond$i - (if - (get_local $$tobool37$i) - (i32.const 4127) - (i32.const 4131) + (set_local $$retval$0$i + (get_local $$w$add653$i) ) ) - (set_local $$cmp38$i - (i32.or - (f64.ne - (get_local $$y$addr$0$i) - (get_local $$y$addr$0$i) + (block + (set_local $$and36$i + (i32.and + (get_local $$t$0) + (i32.const 32) ) - (f64.ne - (f64.const 0) - (f64.const 0) + ) + (set_local $$tobool37$i + (i32.ne + (get_local $$and36$i) + (i32.const 0) ) ) - ) - (set_local $$cond43$i - (if - (get_local $$tobool37$i) - (i32.const 4135) - (i32.const 4139) + (set_local $$cond$i + (if + (get_local $$tobool37$i) + (i32.const 4127) + (i32.const 4131) + ) ) - ) - (set_local $$pl$1$i - (if - (get_local $$cmp38$i) - (i32.const 0) - (get_local $$pl$0$i) + (set_local $$cmp38$i + (i32.or + (f64.ne + (get_local $$y$addr$0$i) + (get_local $$y$addr$0$i) + ) + (f64.ne + (f64.const 0) + (f64.const 0) + ) + ) ) - ) - (set_local $$s35$0$i - (if - (get_local $$cmp38$i) - (get_local $$cond43$i) - (get_local $$cond$i) + (set_local $$cond43$i + (if + (get_local $$tobool37$i) + (i32.const 4135) + (i32.const 4139) + ) ) - ) - (set_local $$add$i$239 - (i32.add - (get_local $$pl$1$i) - (i32.const 3) + (set_local $$pl$1$i + (if + (get_local $$cmp38$i) + (i32.const 0) + (get_local $$pl$0$i) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add$i$239) - (get_local $$and219) - ) - (set_local $$193 - (i32.load - (get_local $$f) + (set_local $$s35$0$i + (if + (get_local $$cmp38$i) + (get_local $$cond43$i) + (get_local $$cond$i) + ) ) - ) - (set_local $$and$i$406$i - (i32.and - (get_local $$193) + (set_local $$add$i$239 + (i32.add + (get_local $$pl$1$i) + (i32.const 3) + ) + ) + (call $_pad + (get_local $$f) (i32.const 32) + (get_local $$w$1) + (get_local $$add$i$239) + (get_local $$and219) ) - ) - (set_local $$tobool$i$407$i - (i32.eq - (get_local $$and$i$406$i) - (i32.const 0) + (set_local $$193 + (i32.load + (get_local $$f) + ) ) - ) - (if - (get_local $$tobool$i$407$i) - (block - (drop - (call $___fwritex - (get_local $$prefix$0$i) - (get_local $$pl$1$i) - (get_local $$f) - ) + (set_local $$and$i$406$i + (i32.and + (get_local $$193) + (i32.const 32) ) - (set_local $$$pre$i - (i32.load - (get_local $$f) + ) + (set_local $$tobool$i$407$i + (i32.eq + (get_local $$and$i$406$i) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$407$i) + (block + (drop + (call $___fwritex + (get_local $$prefix$0$i) + (get_local $$pl$1$i) + (get_local $$f) + ) + ) + (set_local $$$pre$i + (i32.load + (get_local $$f) + ) + ) + (set_local $$194 + (get_local $$$pre$i) ) ) (set_local $$194 - (get_local $$$pre$i) + (get_local $$193) ) ) - (set_local $$194 - (get_local $$193) - ) - ) - (set_local $$and$i$412$i - (i32.and - (get_local $$194) - (i32.const 32) - ) - ) - (set_local $$tobool$i$413$i - (i32.eq - (get_local $$and$i$412$i) - (i32.const 0) + (set_local $$and$i$412$i + (i32.and + (get_local $$194) + (i32.const 32) + ) ) - ) - (if - (get_local $$tobool$i$413$i) - (call $___fwritex - (get_local $$s35$0$i) - (i32.const 3) - (get_local $$f) + (set_local $$tobool$i$413$i + (i32.eq + (get_local $$and$i$412$i) + (i32.const 0) + ) ) - ) - (set_local $$xor$i - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) + (if + (get_local $$tobool$i$413$i) + (call $___fwritex + (get_local $$s35$0$i) + (i32.const 3) + (get_local $$f) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$add$i$239) - (get_local $$xor$i) - ) - (set_local $$cmp48$i - (i32.lt_s - (get_local $$add$i$239) - (get_local $$w$1) + (set_local $$xor$i + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$cond53$i - (if - (get_local $$cmp48$i) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$add$i$239) + (get_local $$xor$i) + ) + (set_local $$cmp48$i + (i32.lt_s + (get_local $$add$i$239) + (get_local $$w$1) + ) + ) + (set_local $$cond53$i + (if + (get_local $$cmp48$i) + (get_local $$w$1) + (get_local $$add$i$239) + ) + ) + (set_local $$retval$0$i + (get_local $$cond53$i) ) - ) - (set_local $$retval$0$i - (get_local $$cond53$i) ) ) ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$retval$0$i) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + (br $switch$24) ) - (set_local $$cnt$0 - (get_local $$cnt$1) + ) + (block + (set_local $$a$2 + (get_local $$incdec$ptr169275) ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) + (set_local $$fl$6 + (get_local $$fl$1$and219) ) - (set_local $$l$0 - (get_local $$retval$0$i) + (set_local $$p$5 + (get_local $$p$0) ) - (set_local $$l10n$0 - (get_local $$l10n$3) + (set_local $$pl$2 + (i32.const 0) + ) + (set_local $$prefix$2 + (i32.const 4091) + ) + (set_local $$z$2 + (get_local $$add$ptr205) ) - (br $label$continue$L1) - (br $switch$24) - ) - ) - (block - (set_local $$a$2 - (get_local $$incdec$ptr169275) - ) - (set_local $$fl$6 - (get_local $$fl$1$and219) - ) - (set_local $$p$5 - (get_local $$p$0) - ) - (set_local $$pl$2 - (i32.const 0) - ) - (set_local $$prefix$2 - (i32.const 4091) - ) - (set_local $$z$2 - (get_local $$add$ptr205) ) ) ) ) - ) - (block $label$break$L308 - (if - (i32.eq - (get_local $label) - (i32.const 64) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$90 - (get_local $$arg) - ) - (set_local $$91 - (get_local $$90) - ) - (set_local $$92 - (i32.load - (get_local $$91) - ) + (block $label$break$L308 + (if + (i32.eq + (get_local $label) + (i32.const 64) ) - (set_local $$93 - (i32.add - (get_local $$90) - (i32.const 4) + (block + (set_local $label + (i32.const 0) ) - ) - (set_local $$94 - (get_local $$93) - ) - (set_local $$95 - (i32.load - (get_local $$94) + (set_local $$90 + (get_local $$arg) ) - ) - (set_local $$and249 - (i32.and - (get_local $$t$1) - (i32.const 32) + (set_local $$91 + (get_local $$90) ) - ) - (set_local $$96 - (i32.eq - (get_local $$92) - (i32.const 0) + (set_local $$92 + (i32.load + (get_local $$91) + ) ) - ) - (set_local $$97 - (i32.eq - (get_local $$95) - (i32.const 0) + (set_local $$93 + (i32.add + (get_local $$90) + (i32.const 4) + ) ) - ) - (set_local $$98 - (i32.and - (get_local $$96) - (get_local $$97) + (set_local $$94 + (get_local $$93) ) - ) - (if - (get_local $$98) - (block - (set_local $$a$0 - (get_local $$add$ptr205) - ) - (set_local $$fl$4 - (get_local $$fl$3) + (set_local $$95 + (i32.load + (get_local $$94) ) - (set_local $$p$2 - (get_local $$p$1) + ) + (set_local $$and249 + (i32.and + (get_local $$t$1) + (i32.const 32) ) - (set_local $$pl$1 + ) + (set_local $$96 + (i32.eq + (get_local $$92) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) - ) ) - (block - (set_local $$101 + (set_local $$97 + (i32.eq (get_local $$95) + (i32.const 0) ) - (set_local $$99 - (get_local $$92) - ) - (set_local $$s$addr$06$i - (get_local $$add$ptr205) + ) + (set_local $$98 + (i32.and + (get_local $$96) + (get_local $$97) ) - (loop $while-out$133 $while-in$134 - (set_local $$idxprom$i - (i32.and - (get_local $$99) - (i32.const 15) - ) - ) - (set_local $$arrayidx$i - (i32.add - (i32.const 4075) - (get_local $$idxprom$i) - ) - ) - (set_local $$100 - (i32.load8_s - (get_local $$arrayidx$i) - ) - ) - (set_local $$conv$4$i$211 - (i32.and - (get_local $$100) - (i32.const 255) - ) - ) - (set_local $$or$i - (i32.or - (get_local $$conv$4$i$211) - (get_local $$and249) - ) + ) + (if + (get_local $$98) + (block + (set_local $$a$0 + (get_local $$add$ptr205) ) - (set_local $$conv1$i - (i32.and - (get_local $$or$i) - (i32.const 255) - ) + (set_local $$fl$4 + (get_local $$fl$3) ) - (set_local $$incdec$ptr$i$212 - (i32.add - (get_local $$s$addr$06$i) - (i32.const -1) - ) + (set_local $$p$2 + (get_local $$p$1) ) - (i32.store8 - (get_local $$incdec$ptr$i$212) - (get_local $$conv1$i) + (set_local $$pl$1 + (i32.const 0) ) - (set_local $$102 - (call $_bitshift64Lshr - (get_local $$99) - (get_local $$101) - (i32.const 4) - ) + (set_local $$prefix$1 + (i32.const 4091) ) - (set_local $$103 - (i32.load - (i32.const 168) - ) + (set_local $label + (i32.const 77) ) - (set_local $$104 - (i32.eq - (get_local $$102) - (i32.const 0) - ) + ) + (block + (set_local $$101 + (get_local $$95) ) - (set_local $$105 - (i32.eq - (get_local $$103) - (i32.const 0) - ) + (set_local $$99 + (get_local $$92) ) - (set_local $$106 - (i32.and - (get_local $$104) - (get_local $$105) - ) + (set_local $$s$addr$06$i + (get_local $$add$ptr205) ) - (if - (get_local $$106) - (block - (set_local $$incdec$ptr$i$212$lcssa - (get_local $$incdec$ptr$i$212) + (loop $while-in$134 + (block $while-out$133 + (set_local $$idxprom$i + (i32.and + (get_local $$99) + (i32.const 15) + ) ) - (br $while-out$133) - ) - (block - (set_local $$101 - (get_local $$103) + (set_local $$arrayidx$i + (i32.add + (i32.const 4075) + (get_local $$idxprom$i) + ) ) - (set_local $$99 - (get_local $$102) + (set_local $$100 + (i32.load8_s + (get_local $$arrayidx$i) + ) + ) + (set_local $$conv$4$i$211 + (i32.and + (get_local $$100) + (i32.const 255) + ) + ) + (set_local $$or$i + (i32.or + (get_local $$conv$4$i$211) + (get_local $$and249) + ) ) - (set_local $$s$addr$06$i + (set_local $$conv1$i + (i32.and + (get_local $$or$i) + (i32.const 255) + ) + ) + (set_local $$incdec$ptr$i$212 + (i32.add + (get_local $$s$addr$06$i) + (i32.const -1) + ) + ) + (i32.store8 (get_local $$incdec$ptr$i$212) + (get_local $$conv1$i) + ) + (set_local $$102 + (call $_bitshift64Lshr + (get_local $$99) + (get_local $$101) + (i32.const 4) + ) + ) + (set_local $$103 + (i32.load + (i32.const 168) + ) + ) + (set_local $$104 + (i32.eq + (get_local $$102) + (i32.const 0) + ) + ) + (set_local $$105 + (i32.eq + (get_local $$103) + (i32.const 0) + ) + ) + (set_local $$106 + (i32.and + (get_local $$104) + (get_local $$105) + ) + ) + (if + (get_local $$106) + (block + (set_local $$incdec$ptr$i$212$lcssa + (get_local $$incdec$ptr$i$212) + ) + (br $while-out$133) + ) + (block + (set_local $$101 + (get_local $$103) + ) + (set_local $$99 + (get_local $$102) + ) + (set_local $$s$addr$06$i + (get_local $$incdec$ptr$i$212) + ) + ) ) + (br $while-in$134) ) ) - (br $while-in$134) - ) - (set_local $$107 - (get_local $$arg) - ) - (set_local $$108 - (get_local $$107) - ) - (set_local $$109 - (i32.load - (get_local $$108) - ) - ) - (set_local $$110 - (i32.add - (get_local $$107) - (i32.const 4) + (set_local $$107 + (get_local $$arg) ) - ) - (set_local $$111 - (get_local $$110) - ) - (set_local $$112 - (i32.load - (get_local $$111) + (set_local $$108 + (get_local $$107) ) - ) - (set_local $$113 - (i32.eq - (get_local $$109) - (i32.const 0) + (set_local $$109 + (i32.load + (get_local $$108) + ) ) - ) - (set_local $$114 - (i32.eq - (get_local $$112) - (i32.const 0) + (set_local $$110 + (i32.add + (get_local $$107) + (i32.const 4) + ) ) - ) - (set_local $$115 - (i32.and - (get_local $$113) - (get_local $$114) + (set_local $$111 + (get_local $$110) ) - ) - (set_local $$and254 - (i32.and - (get_local $$fl$3) - (i32.const 8) + (set_local $$112 + (i32.load + (get_local $$111) + ) ) - ) - (set_local $$tobool255 - (i32.eq - (get_local $$and254) - (i32.const 0) + (set_local $$113 + (i32.eq + (get_local $$109) + (i32.const 0) + ) ) - ) - (set_local $$or$cond193 - (i32.or - (get_local $$tobool255) - (get_local $$115) + (set_local $$114 + (i32.eq + (get_local $$112) + (i32.const 0) + ) ) - ) - (if - (get_local $$or$cond193) - (block - (set_local $$a$0 - (get_local $$incdec$ptr$i$212$lcssa) + (set_local $$115 + (i32.and + (get_local $$113) + (get_local $$114) ) - (set_local $$fl$4 + ) + (set_local $$and254 + (i32.and (get_local $$fl$3) + (i32.const 8) ) - (set_local $$p$2 - (get_local $$p$1) - ) - (set_local $$pl$1 + ) + (set_local $$tobool255 + (i32.eq + (get_local $$and254) (i32.const 0) ) - (set_local $$prefix$1 - (i32.const 4091) - ) - (set_local $label - (i32.const 77) + ) + (set_local $$or$cond193 + (i32.or + (get_local $$tobool255) + (get_local $$115) ) ) - (block - (set_local $$shr - (i32.shr_s - (get_local $$t$1) - (i32.const 4) + (if + (get_local $$or$cond193) + (block + (set_local $$a$0 + (get_local $$incdec$ptr$i$212$lcssa) ) - ) - (set_local $$add$ptr257 - (i32.add + (set_local $$fl$4 + (get_local $$fl$3) + ) + (set_local $$p$2 + (get_local $$p$1) + ) + (set_local $$pl$1 + (i32.const 0) + ) + (set_local $$prefix$1 (i32.const 4091) - (get_local $$shr) + ) + (set_local $label + (i32.const 77) ) ) - (set_local $$a$0 - (get_local $$incdec$ptr$i$212$lcssa) - ) - (set_local $$fl$4 - (get_local $$fl$3) - ) - (set_local $$p$2 - (get_local $$p$1) - ) - (set_local $$pl$1 - (i32.const 2) - ) - (set_local $$prefix$1 - (get_local $$add$ptr257) - ) - (set_local $label - (i32.const 77) + (block + (set_local $$shr + (i32.shr_s + (get_local $$t$1) + (i32.const 4) + ) + ) + (set_local $$add$ptr257 + (i32.add + (i32.const 4091) + (get_local $$shr) + ) + ) + (set_local $$a$0 + (get_local $$incdec$ptr$i$212$lcssa) + ) + (set_local $$fl$4 + (get_local $$fl$3) + ) + (set_local $$p$2 + (get_local $$p$1) + ) + (set_local $$pl$1 + (i32.const 2) + ) + (set_local $$prefix$1 + (get_local $$add$ptr257) + ) + (set_local $label + (i32.const 77) + ) ) ) ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 76) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$150 - (call $_fmt_u - (get_local $$148) - (get_local $$149) - (get_local $$add$ptr205) - ) - ) - (set_local $$a$0 - (get_local $$150) - ) - (set_local $$fl$4 - (get_local $$fl$1$and219) - ) - (set_local $$p$2 - (get_local $$p$0) - ) - (set_local $$pl$1 - (get_local $$pl$0) - ) - (set_local $$prefix$1 - (get_local $$prefix$0) - ) - (set_local $label - (i32.const 77) - ) - ) (if (i32.eq (get_local $label) - (i32.const 82) + (i32.const 76) ) (block (set_local $label (i32.const 0) ) - (set_local $$call356 - (call $_memchr - (get_local $$a$1) - (i32.const 0) - (get_local $$p$0) - ) - ) - (set_local $$tobool357 - (i32.eq - (get_local $$call356) - (i32.const 0) - ) - ) - (set_local $$sub$ptr$lhs$cast361 - (get_local $$call356) - ) - (set_local $$sub$ptr$rhs$cast362 - (get_local $$a$1) - ) - (set_local $$sub$ptr$sub363 - (i32.sub - (get_local $$sub$ptr$lhs$cast361) - (get_local $$sub$ptr$rhs$cast362) - ) - ) - (set_local $$add$ptr359 - (i32.add - (get_local $$a$1) - (get_local $$p$0) - ) - ) - (set_local $$z$1 - (if - (get_local $$tobool357) - (get_local $$add$ptr359) - (get_local $$call356) - ) - ) - (set_local $$p$3 - (if - (get_local $$tobool357) - (get_local $$p$0) - (get_local $$sub$ptr$sub363) + (set_local $$150 + (call $_fmt_u + (get_local $$148) + (get_local $$149) + (get_local $$add$ptr205) ) ) - (set_local $$a$2 - (get_local $$a$1) + (set_local $$a$0 + (get_local $$150) ) - (set_local $$fl$6 - (get_local $$and219) + (set_local $$fl$4 + (get_local $$fl$1$and219) ) - (set_local $$p$5 - (get_local $$p$3) + (set_local $$p$2 + (get_local $$p$0) ) - (set_local $$pl$2 - (i32.const 0) + (set_local $$pl$1 + (get_local $$pl$0) ) - (set_local $$prefix$2 - (i32.const 4091) + (set_local $$prefix$1 + (get_local $$prefix$0) ) - (set_local $$z$2 - (get_local $$z$1) + (set_local $label + (i32.const 77) ) ) (if (i32.eq (get_local $label) - (i32.const 86) + (i32.const 82) ) (block (set_local $label (i32.const 0) ) - (set_local $$176 - (i32.load - (get_local $$arg) + (set_local $$call356 + (call $_memchr + (get_local $$a$1) + (i32.const 0) + (get_local $$p$0) ) ) - (set_local $$i$0316 - (i32.const 0) + (set_local $$tobool357 + (i32.eq + (get_local $$call356) + (i32.const 0) + ) ) - (set_local $$l$1315 - (i32.const 0) + (set_local $$sub$ptr$lhs$cast361 + (get_local $$call356) ) - (set_local $$ws$0317 - (get_local $$176) + (set_local $$sub$ptr$rhs$cast362 + (get_local $$a$1) ) - (loop $while-out$129 $while-in$130 - (set_local $$177 - (i32.load - (get_local $$ws$0317) - ) - ) - (set_local $$tobool380 - (i32.eq - (get_local $$177) - (i32.const 0) - ) - ) - (if - (get_local $$tobool380) - (block - (set_local $$i$0$lcssa - (get_local $$i$0316) - ) - (set_local $$l$2 - (get_local $$l$1315) - ) - (br $while-out$129) - ) - ) - (set_local $$call384 - (call $_wctomb - (get_local $$mb) - (get_local $$177) - ) - ) - (set_local $$cmp385 - (i32.lt_s - (get_local $$call384) - (i32.const 0) - ) - ) - (set_local $$sub389 - (i32.sub - (get_local $$p$4365) - (get_local $$i$0316) - ) - ) - (set_local $$cmp390 - (i32.gt_u - (get_local $$call384) - (get_local $$sub389) - ) + (set_local $$sub$ptr$sub363 + (i32.sub + (get_local $$sub$ptr$lhs$cast361) + (get_local $$sub$ptr$rhs$cast362) ) - (set_local $$or$cond195 - (i32.or - (get_local $$cmp385) - (get_local $$cmp390) - ) + ) + (set_local $$add$ptr359 + (i32.add + (get_local $$a$1) + (get_local $$p$0) ) + ) + (set_local $$z$1 (if - (get_local $$or$cond195) - (block - (set_local $$i$0$lcssa - (get_local $$i$0316) - ) - (set_local $$l$2 - (get_local $$call384) - ) - (br $while-out$129) - ) - ) - (set_local $$incdec$ptr383 - (i32.add - (get_local $$ws$0317) - (i32.const 4) - ) - ) - (set_local $$add395 - (i32.add - (get_local $$call384) - (get_local $$i$0316) - ) - ) - (set_local $$cmp377 - (i32.gt_u - (get_local $$p$4365) - (get_local $$add395) - ) + (get_local $$tobool357) + (get_local $$add$ptr359) + (get_local $$call356) ) + ) + (set_local $$p$3 (if - (get_local $$cmp377) - (block - (set_local $$i$0316 - (get_local $$add395) - ) - (set_local $$l$1315 - (get_local $$call384) - ) - (set_local $$ws$0317 - (get_local $$incdec$ptr383) - ) - ) - (block - (set_local $$i$0$lcssa - (get_local $$add395) - ) - (set_local $$l$2 - (get_local $$call384) - ) - (br $while-out$129) - ) + (get_local $$tobool357) + (get_local $$p$0) + (get_local $$sub$ptr$sub363) ) - (br $while-in$130) ) - (set_local $$cmp397 - (i32.lt_s - (get_local $$l$2) - (i32.const 0) - ) + (set_local $$a$2 + (get_local $$a$1) ) - (if - (get_local $$cmp397) - (block - (set_local $$retval$0 - (i32.const -1) - ) - (br $label$break$L1) - ) + (set_local $$fl$6 + (get_local $$and219) ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$i$0$lcssa) - (get_local $$fl$1$and219) + (set_local $$p$5 + (get_local $$p$3) ) - (set_local $$cmp404$324 - (i32.eq - (get_local $$i$0$lcssa) + (set_local $$pl$2 + (i32.const 0) + ) + (set_local $$prefix$2 + (i32.const 4091) + ) + (set_local $$z$2 + (get_local $$z$1) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 86) + ) + (block + (set_local $label (i32.const 0) ) - ) - (if - (get_local $$cmp404$324) - (block - (set_local $$i$0$lcssa368 - (i32.const 0) - ) - (set_local $label - (i32.const 98) + (set_local $$176 + (i32.load + (get_local $$arg) ) ) - (block - (set_local $$178 - (i32.load - (get_local $$arg) - ) - ) - (set_local $$i$1325 - (i32.const 0) - ) - (set_local $$ws$1326 - (get_local $$178) - ) - (loop $while-out$131 $while-in$132 - (set_local $$179 + (set_local $$i$0316 + (i32.const 0) + ) + (set_local $$l$1315 + (i32.const 0) + ) + (set_local $$ws$0317 + (get_local $$176) + ) + (loop $while-in$130 + (block $while-out$129 + (set_local $$177 (i32.load - (get_local $$ws$1326) + (get_local $$ws$0317) ) ) - (set_local $$tobool407 + (set_local $$tobool380 (i32.eq - (get_local $$179) + (get_local $$177) (i32.const 0) ) ) (if - (get_local $$tobool407) + (get_local $$tobool380) (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (set_local $$i$0$lcssa + (get_local $$i$0316) ) - (set_local $label - (i32.const 98) + (set_local $$l$2 + (get_local $$l$1315) ) - (br $label$break$L308) - ) - ) - (set_local $$incdec$ptr410 - (i32.add - (get_local $$ws$1326) - (i32.const 4) + (br $while-out$129) ) ) - (set_local $$call411 + (set_local $$call384 (call $_wctomb (get_local $$mb) - (get_local $$179) + (get_local $$177) ) ) - (set_local $$add412 - (i32.add - (get_local $$call411) - (get_local $$i$1325) + (set_local $$cmp385 + (i32.lt_s + (get_local $$call384) + (i32.const 0) ) ) - (set_local $$cmp413 - (i32.gt_s - (get_local $$add412) - (get_local $$i$0$lcssa) + (set_local $$sub389 + (i32.sub + (get_local $$p$4365) + (get_local $$i$0316) + ) + ) + (set_local $$cmp390 + (i32.gt_u + (get_local $$call384) + (get_local $$sub389) + ) + ) + (set_local $$or$cond195 + (i32.or + (get_local $$cmp385) + (get_local $$cmp390) ) ) (if - (get_local $$cmp413) + (get_local $$or$cond195) (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (set_local $$i$0$lcssa + (get_local $$i$0316) ) - (set_local $label - (i32.const 98) + (set_local $$l$2 + (get_local $$call384) ) - (br $label$break$L308) + (br $while-out$129) ) ) - (set_local $$180 - (i32.load - (get_local $$f) + (set_local $$incdec$ptr383 + (i32.add + (get_local $$ws$0317) + (i32.const 4) ) ) - (set_local $$and$i$231 - (i32.and - (get_local $$180) - (i32.const 32) + (set_local $$add395 + (i32.add + (get_local $$call384) + (get_local $$i$0316) ) ) - (set_local $$tobool$i$232 - (i32.eq - (get_local $$and$i$231) - (i32.const 0) + (set_local $$cmp377 + (i32.gt_u + (get_local $$p$4365) + (get_local $$add395) ) ) (if - (get_local $$tobool$i$232) - (call $___fwritex - (get_local $$mb) - (get_local $$call411) - (get_local $$f) + (get_local $$cmp377) + (block + (set_local $$i$0316 + (get_local $$add395) + ) + (set_local $$l$1315 + (get_local $$call384) + ) + (set_local $$ws$0317 + (get_local $$incdec$ptr383) + ) + ) + (block + (set_local $$i$0$lcssa + (get_local $$add395) + ) + (set_local $$l$2 + (get_local $$call384) + ) + (br $while-out$129) ) ) - (set_local $$cmp404 - (i32.lt_u - (get_local $$add412) - (get_local $$i$0$lcssa) + (br $while-in$130) + ) + ) + (set_local $$cmp397 + (i32.lt_s + (get_local $$l$2) + (i32.const 0) + ) + ) + (if + (get_local $$cmp397) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$1) + (get_local $$i$0$lcssa) + (get_local $$fl$1$and219) + ) + (set_local $$cmp404$324 + (i32.eq + (get_local $$i$0$lcssa) + (i32.const 0) + ) + ) + (if + (get_local $$cmp404$324) + (block + (set_local $$i$0$lcssa368 + (i32.const 0) + ) + (set_local $label + (i32.const 98) + ) + ) + (block + (set_local $$178 + (i32.load + (get_local $$arg) ) ) - (if - (get_local $$cmp404) - (block - (set_local $$i$1325 - (get_local $$add412) + (set_local $$i$1325 + (i32.const 0) + ) + (set_local $$ws$1326 + (get_local $$178) + ) + (loop $while-in$132 + (block $while-out$131 + (set_local $$179 + (i32.load + (get_local $$ws$1326) + ) ) - (set_local $$ws$1326 - (get_local $$incdec$ptr410) + (set_local $$tobool407 + (i32.eq + (get_local $$179) + (i32.const 0) + ) ) - ) - (block - (set_local $$i$0$lcssa368 - (get_local $$i$0$lcssa) + (if + (get_local $$tobool407) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $label$break$L308) + ) ) - (set_local $label - (i32.const 98) + (set_local $$incdec$ptr410 + (i32.add + (get_local $$ws$1326) + (i32.const 4) + ) + ) + (set_local $$call411 + (call $_wctomb + (get_local $$mb) + (get_local $$179) + ) + ) + (set_local $$add412 + (i32.add + (get_local $$call411) + (get_local $$i$1325) + ) + ) + (set_local $$cmp413 + (i32.gt_s + (get_local $$add412) + (get_local $$i$0$lcssa) + ) + ) + (if + (get_local $$cmp413) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $label$break$L308) + ) + ) + (set_local $$180 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$231 + (i32.and + (get_local $$180) + (i32.const 32) + ) + ) + (set_local $$tobool$i$232 + (i32.eq + (get_local $$and$i$231) + (i32.const 0) + ) + ) + (if + (get_local $$tobool$i$232) + (call $___fwritex + (get_local $$mb) + (get_local $$call411) + (get_local $$f) + ) + ) + (set_local $$cmp404 + (i32.lt_u + (get_local $$add412) + (get_local $$i$0$lcssa) + ) + ) + (if + (get_local $$cmp404) + (block + (set_local $$i$1325 + (get_local $$add412) + ) + (set_local $$ws$1326 + (get_local $$incdec$ptr410) + ) + ) + (block + (set_local $$i$0$lcssa368 + (get_local $$i$0$lcssa) + ) + (set_local $label + (i32.const 98) + ) + (br $while-out$131) + ) ) - (br $while-out$131) + (br $while-in$132) ) ) - (br $while-in$132) ) ) ) @@ -13955,372 +14039,372 @@ ) ) ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 98) - ) - (block - (set_local $label - (i32.const 0) + (if + (i32.eq + (get_local $label) + (i32.const 98) ) - (set_local $$xor - (i32.xor - (get_local $$fl$1$and219) - (i32.const 8192) + (block + (set_local $label + (i32.const 0) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$1) - (get_local $$i$0$lcssa368) - (get_local $$xor) - ) - (set_local $$cmp421 - (i32.gt_s - (get_local $$w$1) - (get_local $$i$0$lcssa368) + (set_local $$xor + (i32.xor + (get_local $$fl$1$and219) + (i32.const 8192) + ) ) - ) - (set_local $$cond426 - (if - (get_local $$cmp421) + (call $_pad + (get_local $$f) + (i32.const 32) (get_local $$w$1) (get_local $$i$0$lcssa368) + (get_local $$xor) ) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$cond426) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) - ) - ) - (if - (i32.eq - (get_local $label) - (i32.const 77) - ) - (block - (set_local $label - (i32.const 0) - ) - (set_local $$cmp306 - (i32.gt_s - (get_local $$p$2) - (i32.const -1) - ) - ) - (set_local $$and309 - (i32.and - (get_local $$fl$4) - (i32.const -65537) - ) - ) - (set_local $$and309$fl$4 - (if - (get_local $$cmp306) - (get_local $$and309) - (get_local $$fl$4) - ) - ) - (set_local $$151 - (get_local $$arg) - ) - (set_local $$152 - (get_local $$151) - ) - (set_local $$153 - (i32.load - (get_local $$152) - ) - ) - (set_local $$154 - (i32.add - (get_local $$151) - (i32.const 4) - ) - ) - (set_local $$155 - (get_local $$154) - ) - (set_local $$156 - (i32.load - (get_local $$155) - ) - ) - (set_local $$157 - (i32.ne - (get_local $$153) - (i32.const 0) - ) - ) - (set_local $$158 - (i32.ne - (get_local $$156) - (i32.const 0) - ) - ) - (set_local $$159 - (i32.or - (get_local $$157) - (get_local $$158) - ) - ) - (set_local $$tobool314 - (i32.ne - (get_local $$p$2) - (i32.const 0) - ) - ) - (set_local $$or$cond - (i32.or - (get_local $$tobool314) - (get_local $$159) - ) - ) - (if - (get_local $$or$cond) - (block - (set_local $$sub$ptr$rhs$cast318 - (get_local $$a$0) - ) - (set_local $$sub$ptr$sub319 - (i32.sub - (get_local $$sub$ptr$lhs$cast317) - (get_local $$sub$ptr$rhs$cast318) - ) - ) - (set_local $$160 - (i32.and - (get_local $$159) - (i32.const 1) - ) - ) - (set_local $$lnot$ext - (i32.xor - (get_local $$160) - (i32.const 1) - ) - ) - (set_local $$add322 - (i32.add - (get_local $$lnot$ext) - (get_local $$sub$ptr$sub319) - ) + (set_local $$cmp421 + (i32.gt_s + (get_local $$w$1) + (get_local $$i$0$lcssa368) ) - (set_local $$cmp323 - (i32.gt_s - (get_local $$p$2) - (get_local $$add322) - ) + ) + (set_local $$cond426 + (if + (get_local $$cmp421) + (get_local $$w$1) + (get_local $$i$0$lcssa368) ) - (set_local $$p$2$add322 - (if - (get_local $$cmp323) - (get_local $$p$2) - (get_local $$add322) - ) + ) + (set_local $$cnt$0 + (get_local $$cnt$1) + ) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) + ) + (set_local $$l$0 + (get_local $$cond426) + ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 77) + ) + (block + (set_local $label + (i32.const 0) + ) + (set_local $$cmp306 + (i32.gt_s + (get_local $$p$2) + (i32.const -1) ) - (set_local $$a$2 - (get_local $$a$0) + ) + (set_local $$and309 + (i32.and + (get_local $$fl$4) + (i32.const -65537) ) - (set_local $$fl$6 - (get_local $$and309$fl$4) + ) + (set_local $$and309$fl$4 + (if + (get_local $$cmp306) + (get_local $$and309) + (get_local $$fl$4) ) - (set_local $$p$5 - (get_local $$p$2$add322) + ) + (set_local $$151 + (get_local $$arg) + ) + (set_local $$152 + (get_local $$151) + ) + (set_local $$153 + (i32.load + (get_local $$152) ) - (set_local $$pl$2 - (get_local $$pl$1) + ) + (set_local $$154 + (i32.add + (get_local $$151) + (i32.const 4) ) - (set_local $$prefix$2 - (get_local $$prefix$1) + ) + (set_local $$155 + (get_local $$154) + ) + (set_local $$156 + (i32.load + (get_local $$155) ) - (set_local $$z$2 - (get_local $$add$ptr205) + ) + (set_local $$157 + (i32.ne + (get_local $$153) + (i32.const 0) ) ) - (block - (set_local $$a$2 - (get_local $$add$ptr205) + (set_local $$158 + (i32.ne + (get_local $$156) + (i32.const 0) ) - (set_local $$fl$6 - (get_local $$and309$fl$4) + ) + (set_local $$159 + (i32.or + (get_local $$157) + (get_local $$158) ) - (set_local $$p$5 + ) + (set_local $$tobool314 + (i32.ne + (get_local $$p$2) (i32.const 0) ) - (set_local $$pl$2 - (get_local $$pl$1) + ) + (set_local $$or$cond + (i32.or + (get_local $$tobool314) + (get_local $$159) ) - (set_local $$prefix$2 - (get_local $$prefix$1) + ) + (if + (get_local $$or$cond) + (block + (set_local $$sub$ptr$rhs$cast318 + (get_local $$a$0) + ) + (set_local $$sub$ptr$sub319 + (i32.sub + (get_local $$sub$ptr$lhs$cast317) + (get_local $$sub$ptr$rhs$cast318) + ) + ) + (set_local $$160 + (i32.and + (get_local $$159) + (i32.const 1) + ) + ) + (set_local $$lnot$ext + (i32.xor + (get_local $$160) + (i32.const 1) + ) + ) + (set_local $$add322 + (i32.add + (get_local $$lnot$ext) + (get_local $$sub$ptr$sub319) + ) + ) + (set_local $$cmp323 + (i32.gt_s + (get_local $$p$2) + (get_local $$add322) + ) + ) + (set_local $$p$2$add322 + (if + (get_local $$cmp323) + (get_local $$p$2) + (get_local $$add322) + ) + ) + (set_local $$a$2 + (get_local $$a$0) + ) + (set_local $$fl$6 + (get_local $$and309$fl$4) + ) + (set_local $$p$5 + (get_local $$p$2$add322) + ) + (set_local $$pl$2 + (get_local $$pl$1) + ) + (set_local $$prefix$2 + (get_local $$prefix$1) + ) + (set_local $$z$2 + (get_local $$add$ptr205) + ) ) - (set_local $$z$2 - (get_local $$add$ptr205) + (block + (set_local $$a$2 + (get_local $$add$ptr205) + ) + (set_local $$fl$6 + (get_local $$and309$fl$4) + ) + (set_local $$p$5 + (i32.const 0) + ) + (set_local $$pl$2 + (get_local $$pl$1) + ) + (set_local $$prefix$2 + (get_local $$prefix$1) + ) + (set_local $$z$2 + (get_local $$add$ptr205) + ) ) ) ) ) - ) - (set_local $$sub$ptr$lhs$cast431 - (get_local $$z$2) - ) - (set_local $$sub$ptr$rhs$cast432 - (get_local $$a$2) - ) - (set_local $$sub$ptr$sub433 - (i32.sub - (get_local $$sub$ptr$lhs$cast431) - (get_local $$sub$ptr$rhs$cast432) + (set_local $$sub$ptr$lhs$cast431 + (get_local $$z$2) ) - ) - (set_local $$cmp434 - (i32.lt_s - (get_local $$p$5) - (get_local $$sub$ptr$sub433) + (set_local $$sub$ptr$rhs$cast432 + (get_local $$a$2) ) - ) - (set_local $$sub$ptr$sub433$p$5 - (if - (get_local $$cmp434) - (get_local $$sub$ptr$sub433) - (get_local $$p$5) + (set_local $$sub$ptr$sub433 + (i32.sub + (get_local $$sub$ptr$lhs$cast431) + (get_local $$sub$ptr$rhs$cast432) + ) ) - ) - (set_local $$add441 - (i32.add - (get_local $$pl$2) - (get_local $$sub$ptr$sub433$p$5) + (set_local $$cmp434 + (i32.lt_s + (get_local $$p$5) + (get_local $$sub$ptr$sub433) + ) ) - ) - (set_local $$cmp442 - (i32.lt_s - (get_local $$w$1) + (set_local $$sub$ptr$sub433$p$5 + (if + (get_local $$cmp434) + (get_local $$sub$ptr$sub433) + (get_local $$p$5) + ) + ) + (set_local $$add441 + (i32.add + (get_local $$pl$2) + (get_local $$sub$ptr$sub433$p$5) + ) + ) + (set_local $$cmp442 + (i32.lt_s + (get_local $$w$1) + (get_local $$add441) + ) + ) + (set_local $$w$2 + (if + (get_local $$cmp442) + (get_local $$add441) + (get_local $$w$1) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 32) + (get_local $$w$2) (get_local $$add441) + (get_local $$fl$6) + ) + (set_local $$265 + (i32.load + (get_local $$f) + ) + ) + (set_local $$and$i$244 + (i32.and + (get_local $$265) + (i32.const 32) + ) + ) + (set_local $$tobool$i$245 + (i32.eq + (get_local $$and$i$244) + (i32.const 0) + ) ) - ) - (set_local $$w$2 (if - (get_local $$cmp442) + (get_local $$tobool$i$245) + (call $___fwritex + (get_local $$prefix$2) + (get_local $$pl$2) + (get_local $$f) + ) + ) + (set_local $$xor449 + (i32.xor + (get_local $$fl$6) + (i32.const 65536) + ) + ) + (call $_pad + (get_local $$f) + (i32.const 48) + (get_local $$w$2) (get_local $$add441) - (get_local $$w$1) + (get_local $$xor449) ) - ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$2) - (get_local $$add441) - (get_local $$fl$6) - ) - (set_local $$265 - (i32.load + (call $_pad (get_local $$f) + (i32.const 48) + (get_local $$sub$ptr$sub433$p$5) + (get_local $$sub$ptr$sub433) + (i32.const 0) ) - ) - (set_local $$and$i$244 - (i32.and - (get_local $$265) - (i32.const 32) + (set_local $$266 + (i32.load + (get_local $$f) + ) ) - ) - (set_local $$tobool$i$245 - (i32.eq - (get_local $$and$i$244) - (i32.const 0) + (set_local $$and$i$216 + (i32.and + (get_local $$266) + (i32.const 32) + ) ) - ) - (if - (get_local $$tobool$i$245) - (call $___fwritex - (get_local $$prefix$2) - (get_local $$pl$2) - (get_local $$f) + (set_local $$tobool$i$217 + (i32.eq + (get_local $$and$i$216) + (i32.const 0) + ) ) - ) - (set_local $$xor449 - (i32.xor - (get_local $$fl$6) - (i32.const 65536) + (if + (get_local $$tobool$i$217) + (call $___fwritex + (get_local $$a$2) + (get_local $$sub$ptr$sub433) + (get_local $$f) + ) ) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$w$2) - (get_local $$add441) - (get_local $$xor449) - ) - (call $_pad - (get_local $$f) - (i32.const 48) - (get_local $$sub$ptr$sub433$p$5) - (get_local $$sub$ptr$sub433) - (i32.const 0) - ) - (set_local $$266 - (i32.load - (get_local $$f) + (set_local $$xor457 + (i32.xor + (get_local $$fl$6) + (i32.const 8192) + ) ) - ) - (set_local $$and$i$216 - (i32.and - (get_local $$266) + (call $_pad + (get_local $$f) (i32.const 32) + (get_local $$w$2) + (get_local $$add441) + (get_local $$xor457) ) - ) - (set_local $$tobool$i$217 - (i32.eq - (get_local $$and$i$216) - (i32.const 0) + (set_local $$cnt$0 + (get_local $$cnt$1) ) - ) - (if - (get_local $$tobool$i$217) - (call $___fwritex - (get_local $$a$2) - (get_local $$sub$ptr$sub433) - (get_local $$f) + (set_local $$incdec$ptr169275 + (get_local $$incdec$ptr169$lcssa) ) - ) - (set_local $$xor457 - (i32.xor - (get_local $$fl$6) - (i32.const 8192) + (set_local $$l$0 + (get_local $$w$2) ) + (set_local $$l10n$0 + (get_local $$l10n$3) + ) + (br $label$continue$L1) ) - (call $_pad - (get_local $$f) - (i32.const 32) - (get_local $$w$2) - (get_local $$add441) - (get_local $$xor457) - ) - (set_local $$cnt$0 - (get_local $$cnt$1) - ) - (set_local $$incdec$ptr169275 - (get_local $$incdec$ptr169$lcssa) - ) - (set_local $$l$0 - (get_local $$w$2) - ) - (set_local $$l10n$0 - (get_local $$l10n$3) - ) - (br $label$continue$L1) ) (block $label$break$L343 (if @@ -14353,75 +14437,77 @@ (set_local $$i$2299 (i32.const 1) ) - (loop $while-out$136 $while-in$137 - (set_local $$arrayidx469 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$i$2299) - (i32.const 2) + (loop $while-in$137 + (block $while-out$136 + (set_local $$arrayidx469 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$i$2299) + (i32.const 2) + ) + ) + ) + (set_local $$267 + (i32.load + (get_local $$arrayidx469) + ) + ) + (set_local $$tobool470 + (i32.eq + (get_local $$267) + (i32.const 0) + ) + ) + (if + (get_local $$tobool470) + (block + (set_local $$i$2299$lcssa + (get_local $$i$2299) + ) + (br $while-out$136) + ) + ) + (set_local $$add$ptr473 + (i32.add + (get_local $$nl_arg) + (i32.shl + (get_local $$i$2299) + (i32.const 3) + ) ) ) - ) - (set_local $$267 - (i32.load - (get_local $$arrayidx469) - ) - ) - (set_local $$tobool470 - (i32.eq + (call $_pop_arg_336 + (get_local $$add$ptr473) (get_local $$267) - (i32.const 0) + (get_local $$ap) ) - ) - (if - (get_local $$tobool470) - (block - (set_local $$i$2299$lcssa + (set_local $$inc + (i32.add (get_local $$i$2299) + (i32.const 1) ) - (br $while-out$136) ) - ) - (set_local $$add$ptr473 - (i32.add - (get_local $$nl_arg) - (i32.shl - (get_local $$i$2299) - (i32.const 3) + (set_local $$cmp466 + (i32.lt_s + (get_local $$inc) + (i32.const 10) ) ) - ) - (call $_pop_arg_336 - (get_local $$add$ptr473) - (get_local $$267) - (get_local $$ap) - ) - (set_local $$inc - (i32.add - (get_local $$i$2299) - (i32.const 1) - ) - ) - (set_local $$cmp466 - (i32.lt_s - (get_local $$inc) - (i32.const 10) - ) - ) - (if - (get_local $$cmp466) - (set_local $$i$2299 - (get_local $$inc) - ) - (block - (set_local $$retval$0 - (i32.const 1) + (if + (get_local $$cmp466) + (set_local $$i$2299 + (get_local $$inc) + ) + (block + (set_local $$retval$0 + (i32.const 1) + ) + (br $label$break$L343) ) - (br $label$break$L343) ) + (br $while-in$137) ) - (br $while-in$137) ) (set_local $$cmp478$295 (i32.lt_s @@ -14435,63 +14521,65 @@ (set_local $$i$3296 (get_local $$i$2299$lcssa) ) - (loop $while-out$138 $while-in$139 - (set_local $$arrayidx481 - (i32.add - (get_local $$nl_type) - (i32.shl - (get_local $$i$3296) - (i32.const 2) + (loop $while-in$139 + (block $while-out$138 + (set_local $$arrayidx481 + (i32.add + (get_local $$nl_type) + (i32.shl + (get_local $$i$3296) + (i32.const 2) + ) ) ) - ) - (set_local $$268 - (i32.load - (get_local $$arrayidx481) - ) - ) - (set_local $$lnot483 - (i32.eq - (get_local $$268) - (i32.const 0) - ) - ) - (set_local $$inc488 - (i32.add - (get_local $$i$3296) - (i32.const 1) + (set_local $$268 + (i32.load + (get_local $$arrayidx481) + ) ) - ) - (if - (i32.eqz - (get_local $$lnot483) + (set_local $$lnot483 + (i32.eq + (get_local $$268) + (i32.const 0) + ) ) - (block - (set_local $$retval$0 - (i32.const -1) + (set_local $$inc488 + (i32.add + (get_local $$i$3296) + (i32.const 1) ) - (br $label$break$L343) ) - ) - (set_local $$cmp478 - (i32.lt_s - (get_local $$inc488) - (i32.const 10) + (if + (i32.eqz + (get_local $$lnot483) + ) + (block + (set_local $$retval$0 + (i32.const -1) + ) + (br $label$break$L343) + ) ) - ) - (if - (get_local $$cmp478) - (set_local $$i$3296 - (get_local $$inc488) + (set_local $$cmp478 + (i32.lt_s + (get_local $$inc488) + (i32.const 10) + ) ) - (block - (set_local $$retval$0 - (i32.const 1) + (if + (get_local $$cmp478) + (set_local $$i$3296 + (get_local $$inc488) + ) + (block + (set_local $$retval$0 + (i32.const 1) + ) + (br $while-out$138) ) - (br $while-out$138) ) + (br $while-in$139) ) - (br $while-in$139) ) ) (set_local $$retval$0 @@ -15905,112 +15993,114 @@ (set_local $$s$addr$013 (get_local $$s) ) - (loop $while-out$0 $while-in$1 - (set_local $$9 - (call $___uremdi3 - (get_local $$7) - (get_local $$8) - (i32.const 10) - (i32.const 0) - ) - ) - (set_local $$10 - (i32.load - (i32.const 168) - ) - ) - (set_local $$11 - (i32.or - (get_local $$9) - (i32.const 48) - ) - ) - (set_local $$12 - (i32.and - (get_local $$11) - (i32.const 255) + (loop $while-in$1 + (block $while-out$0 + (set_local $$9 + (call $___uremdi3 + (get_local $$7) + (get_local $$8) + (i32.const 10) + (i32.const 0) + ) ) - ) - (set_local $$incdec$ptr - (i32.add - (get_local $$s$addr$013) - (i32.const -1) + (set_local $$10 + (i32.load + (i32.const 168) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr) - (get_local $$12) - ) - (set_local $$13 - (call $___udivdi3 - (get_local $$7) - (get_local $$8) - (i32.const 10) - (i32.const 0) + (set_local $$11 + (i32.or + (get_local $$9) + (i32.const 48) + ) ) - ) - (set_local $$14 - (i32.load - (i32.const 168) + (set_local $$12 + (i32.and + (get_local $$11) + (i32.const 255) + ) ) - ) - (set_local $$15 - (i32.gt_u - (get_local $$8) - (i32.const 9) + (set_local $$incdec$ptr + (i32.add + (get_local $$s$addr$013) + (i32.const -1) + ) ) - ) - (set_local $$16 - (i32.gt_u - (get_local $$7) - (i32.const -1) + (i32.store8 + (get_local $$incdec$ptr) + (get_local $$12) ) - ) - (set_local $$17 - (i32.eq - (get_local $$8) - (i32.const 9) + (set_local $$13 + (call $___udivdi3 + (get_local $$7) + (get_local $$8) + (i32.const 10) + (i32.const 0) + ) ) - ) - (set_local $$18 - (i32.and - (get_local $$17) - (get_local $$16) + (set_local $$14 + (i32.load + (i32.const 168) + ) ) - ) - (set_local $$19 - (i32.or - (get_local $$15) - (get_local $$18) + (set_local $$15 + (i32.gt_u + (get_local $$8) + (i32.const 9) + ) ) - ) - (if - (get_local $$19) - (block - (set_local $$7 - (get_local $$13) + (set_local $$16 + (i32.gt_u + (get_local $$7) + (i32.const -1) ) - (set_local $$8 - (get_local $$14) + ) + (set_local $$17 + (i32.eq + (get_local $$8) + (i32.const 9) ) - (set_local $$s$addr$013 - (get_local $$incdec$ptr) + ) + (set_local $$18 + (i32.and + (get_local $$17) + (get_local $$16) ) ) - (block - (set_local $$21 - (get_local $$13) + (set_local $$19 + (i32.or + (get_local $$15) + (get_local $$18) ) - (set_local $$22 - (get_local $$14) + ) + (if + (get_local $$19) + (block + (set_local $$7 + (get_local $$13) + ) + (set_local $$8 + (get_local $$14) + ) + (set_local $$s$addr$013 + (get_local $$incdec$ptr) + ) ) - (set_local $$incdec$ptr$lcssa - (get_local $$incdec$ptr) + (block + (set_local $$21 + (get_local $$13) + ) + (set_local $$22 + (get_local $$14) + ) + (set_local $$incdec$ptr$lcssa + (get_local $$incdec$ptr) + ) + (br $while-out$0) ) - (br $while-out$0) ) + (br $while-in$1) ) - (br $while-in$1) ) (set_local $$s$addr$0$lcssa (get_local $$incdec$ptr$lcssa) @@ -16046,71 +16136,73 @@ (set_local $$y$010 (get_local $$x$addr$0$lcssa$off0) ) - (loop $while-out$2 $while-in$3 - (set_local $$rem4 - (i32.and - (call_import $i32u-rem - (get_local $$y$010) - (i32.const 10) + (loop $while-in$3 + (block $while-out$2 + (set_local $$rem4 + (i32.and + (call_import $i32u-rem + (get_local $$y$010) + (i32.const 10) + ) + (i32.const -1) ) - (i32.const -1) - ) - ) - (set_local $$add5 - (i32.or - (get_local $$rem4) - (i32.const 48) ) - ) - (set_local $$conv6 - (i32.and - (get_local $$add5) - (i32.const 255) + (set_local $$add5 + (i32.or + (get_local $$rem4) + (i32.const 48) + ) ) - ) - (set_local $$incdec$ptr7 - (i32.add - (get_local $$s$addr$19) - (i32.const -1) + (set_local $$conv6 + (i32.and + (get_local $$add5) + (i32.const 255) + ) ) - ) - (i32.store8 - (get_local $$incdec$ptr7) - (get_local $$conv6) - ) - (set_local $$div9 - (i32.and - (call_import $i32u-div - (get_local $$y$010) - (i32.const 10) + (set_local $$incdec$ptr7 + (i32.add + (get_local $$s$addr$19) + (i32.const -1) ) - (i32.const -1) ) - ) - (set_local $$20 - (i32.lt_u - (get_local $$y$010) - (i32.const 10) + (i32.store8 + (get_local $$incdec$ptr7) + (get_local $$conv6) ) - ) - (if - (get_local $$20) - (block - (set_local $$s$addr$1$lcssa - (get_local $$incdec$ptr7) + (set_local $$div9 + (i32.and + (call_import $i32u-div + (get_local $$y$010) + (i32.const 10) + ) + (i32.const -1) ) - (br $while-out$2) ) - (block - (set_local $$s$addr$19 - (get_local $$incdec$ptr7) + (set_local $$20 + (i32.lt_u + (get_local $$y$010) + (i32.const 10) ) - (set_local $$y$010 - (get_local $$div9) + ) + (if + (get_local $$20) + (block + (set_local $$s$addr$1$lcssa + (get_local $$incdec$ptr7) + ) + (br $while-out$2) + ) + (block + (set_local $$s$addr$19 + (get_local $$incdec$ptr7) + ) + (set_local $$y$010 + (get_local $$div9) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -16268,70 +16360,72 @@ (set_local $$tobool$i18 (get_local $$tobool$i$16) ) - (loop $while-out$2 $while-in$3 - (if - (get_local $$tobool$i18) - (block - (drop - (call $___fwritex - (get_local $$pad) - (i32.const 256) - (get_local $$f) + (loop $while-in$3 + (block $while-out$2 + (if + (get_local $$tobool$i18) + (block + (drop + (call $___fwritex + (get_local $$pad) + (i32.const 256) + (get_local $$f) + ) ) - ) - (set_local $$$pre - (i32.load - (get_local $$f) + (set_local $$$pre + (i32.load + (get_local $$f) + ) + ) + (set_local $$2 + (get_local $$$pre) ) ) (set_local $$2 - (get_local $$$pre) + (get_local $$4) ) ) - (set_local $$2 - (get_local $$4) - ) - ) - (set_local $$sub5 - (i32.add - (get_local $$l$addr$017) - (i32.const -256) - ) - ) - (set_local $$cmp3 - (i32.gt_u - (get_local $$sub5) - (i32.const 255) - ) - ) - (set_local $$and$i - (i32.and - (get_local $$2) - (i32.const 32) + (set_local $$sub5 + (i32.add + (get_local $$l$addr$017) + (i32.const -256) + ) ) - ) - (set_local $$tobool$i - (i32.eq - (get_local $$and$i) - (i32.const 0) + (set_local $$cmp3 + (i32.gt_u + (get_local $$sub5) + (i32.const 255) + ) ) - ) - (if - (get_local $$cmp3) - (block - (set_local $$4 + (set_local $$and$i + (i32.and (get_local $$2) + (i32.const 32) ) - (set_local $$l$addr$017 - (get_local $$sub5) + ) + (set_local $$tobool$i + (i32.eq + (get_local $$and$i) + (i32.const 0) ) - (set_local $$tobool$i18 - (get_local $$tobool$i) + ) + (if + (get_local $$cmp3) + (block + (set_local $$4 + (get_local $$2) + ) + (set_local $$l$addr$017 + (get_local $$sub5) + ) + (set_local $$tobool$i18 + (get_local $$tobool$i) + ) ) + (br $while-out$2) ) - (br $while-out$2) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$3 (i32.and @@ -18590,117 +18684,119 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-out$23 $while-in$24 - (set_local $$arrayidx23$i - (i32.add - (get_local $$t$0$i) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $$arrayidx23$i + (i32.add + (get_local $$t$0$i) + (i32.const 16) + ) ) - ) - (set_local $$22 - (i32.load - (get_local $$arrayidx23$i) + (set_local $$22 + (i32.load + (get_local $$arrayidx23$i) + ) ) - ) - (set_local $$cmp$i - (i32.eq - (get_local $$22) - (i32.const 0) + (set_local $$cmp$i + (i32.eq + (get_local $$22) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp$i) - (block - (set_local $$arrayidx27$i - (i32.add - (get_local $$t$0$i) - (i32.const 20) + (if + (get_local $$cmp$i) + (block + (set_local $$arrayidx27$i + (i32.add + (get_local $$t$0$i) + (i32.const 20) + ) ) - ) - (set_local $$23 - (i32.load - (get_local $$arrayidx27$i) + (set_local $$23 + (i32.load + (get_local $$arrayidx27$i) + ) ) - ) - (set_local $$cmp28$i - (i32.eq - (get_local $$23) - (i32.const 0) + (set_local $$cmp28$i + (i32.eq + (get_local $$23) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp28$i) - (block - (set_local $$rsize$0$i$lcssa - (get_local $$rsize$0$i) + (if + (get_local $$cmp28$i) + (block + (set_local $$rsize$0$i$lcssa + (get_local $$rsize$0$i) + ) + (set_local $$v$0$i$lcssa + (get_local $$v$0$i) + ) + (br $while-out$23) ) - (set_local $$v$0$i$lcssa - (get_local $$v$0$i) + (set_local $$cond4$i + (get_local $$23) ) - (br $while-out$23) - ) - (set_local $$cond4$i - (get_local $$23) ) ) + (set_local $$cond4$i + (get_local $$22) + ) ) - (set_local $$cond4$i - (get_local $$22) + (set_local $$head29$i + (i32.add + (get_local $$cond4$i) + (i32.const 4) + ) ) - ) - (set_local $$head29$i - (i32.add - (get_local $$cond4$i) - (i32.const 4) + (set_local $$24 + (i32.load + (get_local $$head29$i) + ) ) - ) - (set_local $$24 - (i32.load - (get_local $$head29$i) + (set_local $$and30$i + (i32.and + (get_local $$24) + (i32.const -8) + ) ) - ) - (set_local $$and30$i - (i32.and - (get_local $$24) - (i32.const -8) + (set_local $$sub31$i + (i32.sub + (get_local $$and30$i) + (get_local $$cond) + ) ) - ) - (set_local $$sub31$i - (i32.sub - (get_local $$and30$i) - (get_local $$cond) + (set_local $$cmp32$i + (i32.lt_u + (get_local $$sub31$i) + (get_local $$rsize$0$i) + ) ) - ) - (set_local $$cmp32$i - (i32.lt_u - (get_local $$sub31$i) - (get_local $$rsize$0$i) + (set_local $$sub31$rsize$0$i + (if + (get_local $$cmp32$i) + (get_local $$sub31$i) + (get_local $$rsize$0$i) + ) ) - ) - (set_local $$sub31$rsize$0$i - (if - (get_local $$cmp32$i) - (get_local $$sub31$i) - (get_local $$rsize$0$i) + (set_local $$cond$v$0$i + (if + (get_local $$cmp32$i) + (get_local $$cond4$i) + (get_local $$v$0$i) + ) ) - ) - (set_local $$cond$v$0$i - (if - (get_local $$cmp32$i) + (set_local $$rsize$0$i + (get_local $$sub31$rsize$0$i) + ) + (set_local $$t$0$i (get_local $$cond4$i) - (get_local $$v$0$i) ) + (set_local $$v$0$i + (get_local $$cond$v$0$i) + ) + (br $while-in$24) ) - (set_local $$rsize$0$i - (get_local $$sub31$rsize$0$i) - ) - (set_local $$t$0$i - (get_local $$cond4$i) - ) - (set_local $$v$0$i - (get_local $$cond$v$0$i) - ) - (br $while-in$24) ) (set_local $$25 (i32.load @@ -18831,76 +18927,78 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $$arrayidx71$i - (i32.add - (get_local $$R$1$i) - (i32.const 20) - ) - ) - (set_local $$33 - (i32.load - (get_local $$arrayidx71$i) - ) - ) - (set_local $$cmp72$i - (i32.eq - (get_local $$33) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp72$i) - ) - (block - (set_local $$R$1$i - (get_local $$33) + (loop $while-in$28 + (block $while-out$27 + (set_local $$arrayidx71$i + (i32.add + (get_local $$R$1$i) + (i32.const 20) ) - (set_local $$RP$1$i + ) + (set_local $$33 + (i32.load (get_local $$arrayidx71$i) ) - (br $while-in$28) - ) - ) - (set_local $$arrayidx75$i - (i32.add - (get_local $$R$1$i) - (i32.const 16) ) - ) - (set_local $$34 - (i32.load - (get_local $$arrayidx75$i) + (set_local $$cmp72$i + (i32.eq + (get_local $$33) + (i32.const 0) + ) ) - ) - (set_local $$cmp76$i - (i32.eq - (get_local $$34) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp72$i) + ) + (block + (set_local $$R$1$i + (get_local $$33) + ) + (set_local $$RP$1$i + (get_local $$arrayidx71$i) + ) + (br $while-in$28) + ) ) - ) - (if - (get_local $$cmp76$i) - (block - (set_local $$R$1$i$lcssa + (set_local $$arrayidx75$i + (i32.add (get_local $$R$1$i) + (i32.const 16) ) - (set_local $$RP$1$i$lcssa - (get_local $$RP$1$i) + ) + (set_local $$34 + (i32.load + (get_local $$arrayidx75$i) ) - (br $while-out$27) ) - (block - (set_local $$R$1$i + (set_local $$cmp76$i + (i32.eq (get_local $$34) + (i32.const 0) ) - (set_local $$RP$1$i - (get_local $$arrayidx75$i) + ) + (if + (get_local $$cmp76$i) + (block + (set_local $$R$1$i$lcssa + (get_local $$R$1$i) + ) + (set_local $$RP$1$i$lcssa + (get_local $$RP$1$i) + ) + (br $while-out$27) + ) + (block + (set_local $$R$1$i + (get_local $$34) + ) + (set_local $$RP$1$i + (get_local $$arrayidx75$i) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (set_local $$cmp81$i (i32.lt_u @@ -19906,200 +20004,202 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $$head$i$154 - (i32.add - (get_local $$t$0$i$151) - (i32.const 4) - ) - ) - (set_local $$53 - (i32.load - (get_local $$head$i$154) + (loop $while-in$4 + (block $while-out$3 + (set_local $$head$i$154 + (i32.add + (get_local $$t$0$i$151) + (i32.const 4) + ) ) - ) - (set_local $$and32$i - (i32.and - (get_local $$53) - (i32.const -8) + (set_local $$53 + (i32.load + (get_local $$head$i$154) + ) ) - ) - (set_local $$sub33$i - (i32.sub - (get_local $$and32$i) - (get_local $$and145) + (set_local $$and32$i + (i32.and + (get_local $$53) + (i32.const -8) + ) ) - ) - (set_local $$cmp34$i - (i32.lt_u - (get_local $$sub33$i) - (get_local $$rsize$0$i$152) + (set_local $$sub33$i + (i32.sub + (get_local $$and32$i) + (get_local $$and145) + ) ) - ) - (if - (get_local $$cmp34$i) - (block - (set_local $$cmp36$i - (i32.eq - (get_local $$and32$i) - (get_local $$and145) - ) + (set_local $$cmp34$i + (i32.lt_u + (get_local $$sub33$i) + (get_local $$rsize$0$i$152) ) - (if - (get_local $$cmp36$i) - (block - (set_local $$rsize$49$i - (get_local $$sub33$i) - ) - (set_local $$t$48$i - (get_local $$t$0$i$151) - ) - (set_local $$v$410$i - (get_local $$t$0$i$151) - ) - (set_local $label - (i32.const 90) + ) + (if + (get_local $$cmp34$i) + (block + (set_local $$cmp36$i + (i32.eq + (get_local $$and32$i) + (get_local $$and145) ) - (br $label$break$L123) ) - (block - (set_local $$rsize$1$i - (get_local $$sub33$i) + (if + (get_local $$cmp36$i) + (block + (set_local $$rsize$49$i + (get_local $$sub33$i) + ) + (set_local $$t$48$i + (get_local $$t$0$i$151) + ) + (set_local $$v$410$i + (get_local $$t$0$i$151) + ) + (set_local $label + (i32.const 90) + ) + (br $label$break$L123) ) - (set_local $$v$1$i - (get_local $$t$0$i$151) + (block + (set_local $$rsize$1$i + (get_local $$sub33$i) + ) + (set_local $$v$1$i + (get_local $$t$0$i$151) + ) ) ) ) - ) - (block - (set_local $$rsize$1$i - (get_local $$rsize$0$i$152) - ) - (set_local $$v$1$i - (get_local $$v$0$i$153) + (block + (set_local $$rsize$1$i + (get_local $$rsize$0$i$152) + ) + (set_local $$v$1$i + (get_local $$v$0$i$153) + ) ) ) - ) - (set_local $$arrayidx40$i - (i32.add - (get_local $$t$0$i$151) - (i32.const 20) - ) - ) - (set_local $$54 - (i32.load - (get_local $$arrayidx40$i) - ) - ) - (set_local $$shr41$i - (i32.shr_u - (get_local $$sizebits$0$i) - (i32.const 31) - ) - ) - (set_local $$arrayidx44$i - (i32.add + (set_local $$arrayidx40$i (i32.add (get_local $$t$0$i$151) - (i32.const 16) + (i32.const 20) ) - (i32.shl - (get_local $$shr41$i) - (i32.const 2) - ) - ) - ) - (set_local $$55 - (i32.load - (get_local $$arrayidx44$i) - ) - ) - (set_local $$cmp45$i$155 - (i32.eq - (get_local $$54) - (i32.const 0) - ) - ) - (set_local $$cmp46$i - (i32.eq - (get_local $$54) - (get_local $$55) - ) - ) - (set_local $$or$cond1$i - (i32.or - (get_local $$cmp45$i$155) - (get_local $$cmp46$i) ) - ) - (set_local $$rst$1$i - (if - (get_local $$or$cond1$i) - (get_local $$rst$0$i) - (get_local $$54) + (set_local $$54 + (i32.load + (get_local $$arrayidx40$i) + ) ) - ) - (set_local $$cmp49$i - (i32.eq - (get_local $$55) - (i32.const 0) + (set_local $$shr41$i + (i32.shr_u + (get_local $$sizebits$0$i) + (i32.const 31) + ) ) - ) - (set_local $$56 - (i32.and - (get_local $$cmp49$i) - (i32.const 1) + (set_local $$arrayidx44$i + (i32.add + (i32.add + (get_local $$t$0$i$151) + (i32.const 16) + ) + (i32.shl + (get_local $$shr41$i) + (i32.const 2) + ) + ) ) - ) - (set_local $$shl52$i - (i32.xor - (get_local $$56) - (i32.const 1) + (set_local $$55 + (i32.load + (get_local $$arrayidx44$i) + ) ) - ) - (set_local $$sizebits$0$shl52$i - (i32.shl - (get_local $$sizebits$0$i) - (get_local $$shl52$i) + (set_local $$cmp45$i$155 + (i32.eq + (get_local $$54) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp49$i) - (block - (set_local $$rsize$3$i - (get_local $$rsize$1$i) + (set_local $$cmp46$i + (i32.eq + (get_local $$54) + (get_local $$55) ) - (set_local $$t$2$i - (get_local $$rst$1$i) + ) + (set_local $$or$cond1$i + (i32.or + (get_local $$cmp45$i$155) + (get_local $$cmp46$i) ) - (set_local $$v$3$i - (get_local $$v$1$i) + ) + (set_local $$rst$1$i + (if + (get_local $$or$cond1$i) + (get_local $$rst$0$i) + (get_local $$54) ) - (set_local $label - (i32.const 86) + ) + (set_local $$cmp49$i + (i32.eq + (get_local $$55) + (i32.const 0) ) - (br $while-out$3) ) - (block - (set_local $$rsize$0$i$152 - (get_local $$rsize$1$i) + (set_local $$56 + (i32.and + (get_local $$cmp49$i) + (i32.const 1) ) - (set_local $$rst$0$i - (get_local $$rst$1$i) + ) + (set_local $$shl52$i + (i32.xor + (get_local $$56) + (i32.const 1) ) - (set_local $$sizebits$0$i - (get_local $$sizebits$0$shl52$i) + ) + (set_local $$sizebits$0$shl52$i + (i32.shl + (get_local $$sizebits$0$i) + (get_local $$shl52$i) ) - (set_local $$t$0$i$151 - (get_local $$55) + ) + (if + (get_local $$cmp49$i) + (block + (set_local $$rsize$3$i + (get_local $$rsize$1$i) + ) + (set_local $$t$2$i + (get_local $$rst$1$i) + ) + (set_local $$v$3$i + (get_local $$v$1$i) + ) + (set_local $label + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $$v$0$i$153 - (get_local $$v$1$i) + (block + (set_local $$rsize$0$i$152 + (get_local $$rsize$1$i) + ) + (set_local $$rst$0$i + (get_local $$rst$1$i) + ) + (set_local $$sizebits$0$i + (get_local $$sizebits$0$shl52$i) + ) + (set_local $$t$0$i$151 + (get_local $$55) + ) + (set_local $$v$0$i$153 + (get_local $$v$1$i) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -20368,134 +20468,136 @@ (get_local $label) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $label - (i32.const 0) - ) - (set_local $$head99$i - (i32.add - (get_local $$t$48$i) - (i32.const 4) - ) - ) - (set_local $$58 - (i32.load - (get_local $$head99$i) - ) - ) - (set_local $$and100$i - (i32.and - (get_local $$58) - (i32.const -8) + (loop $while-in$6 + (block $while-out$5 + (set_local $label + (i32.const 0) ) - ) - (set_local $$sub101$i - (i32.sub - (get_local $$and100$i) - (get_local $$and145) + (set_local $$head99$i + (i32.add + (get_local $$t$48$i) + (i32.const 4) + ) ) - ) - (set_local $$cmp102$i - (i32.lt_u - (get_local $$sub101$i) - (get_local $$rsize$49$i) + (set_local $$58 + (i32.load + (get_local $$head99$i) + ) ) - ) - (set_local $$sub101$rsize$4$i - (if - (get_local $$cmp102$i) - (get_local $$sub101$i) - (get_local $$rsize$49$i) + (set_local $$and100$i + (i32.and + (get_local $$58) + (i32.const -8) + ) ) - ) - (set_local $$t$4$v$4$i - (if - (get_local $$cmp102$i) - (get_local $$t$48$i) - (get_local $$v$410$i) + (set_local $$sub101$i + (i32.sub + (get_local $$and100$i) + (get_local $$and145) + ) ) - ) - (set_local $$arrayidx106$i - (i32.add - (get_local $$t$48$i) - (i32.const 16) + (set_local $$cmp102$i + (i32.lt_u + (get_local $$sub101$i) + (get_local $$rsize$49$i) + ) ) - ) - (set_local $$59 - (i32.load - (get_local $$arrayidx106$i) + (set_local $$sub101$rsize$4$i + (if + (get_local $$cmp102$i) + (get_local $$sub101$i) + (get_local $$rsize$49$i) + ) ) - ) - (set_local $$cmp107$i$157 - (i32.eq - (get_local $$59) - (i32.const 0) + (set_local $$t$4$v$4$i + (if + (get_local $$cmp102$i) + (get_local $$t$48$i) + (get_local $$v$410$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp107$i$157) + (set_local $$arrayidx106$i + (i32.add + (get_local $$t$48$i) + (i32.const 16) + ) ) - (block - (set_local $$rsize$49$i - (get_local $$sub101$rsize$4$i) + (set_local $$59 + (i32.load + (get_local $$arrayidx106$i) ) - (set_local $$t$48$i + ) + (set_local $$cmp107$i$157 + (i32.eq (get_local $$59) + (i32.const 0) ) - (set_local $$v$410$i - (get_local $$t$4$v$4$i) + ) + (if + (i32.eqz + (get_local $$cmp107$i$157) ) - (set_local $label - (i32.const 90) + (block + (set_local $$rsize$49$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$t$48$i + (get_local $$59) + ) + (set_local $$v$410$i + (get_local $$t$4$v$4$i) + ) + (set_local $label + (i32.const 90) + ) + (br $while-in$6) ) - (br $while-in$6) - ) - ) - (set_local $$arrayidx113$i$159 - (i32.add - (get_local $$t$48$i) - (i32.const 20) - ) - ) - (set_local $$60 - (i32.load - (get_local $$arrayidx113$i$159) - ) - ) - (set_local $$cmp97$i - (i32.eq - (get_local $$60) - (i32.const 0) ) - ) - (if - (get_local $$cmp97$i) - (block - (set_local $$rsize$4$lcssa$i - (get_local $$sub101$rsize$4$i) - ) - (set_local $$v$4$lcssa$i - (get_local $$t$4$v$4$i) + (set_local $$arrayidx113$i$159 + (i32.add + (get_local $$t$48$i) + (i32.const 20) ) - (br $while-out$5) ) - (block - (set_local $$rsize$49$i - (get_local $$sub101$rsize$4$i) + (set_local $$60 + (i32.load + (get_local $$arrayidx113$i$159) ) - (set_local $$t$48$i + ) + (set_local $$cmp97$i + (i32.eq (get_local $$60) + (i32.const 0) ) - (set_local $$v$410$i - (get_local $$t$4$v$4$i) + ) + (if + (get_local $$cmp97$i) + (block + (set_local $$rsize$4$lcssa$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$v$4$lcssa$i + (get_local $$t$4$v$4$i) + ) + (br $while-out$5) ) - (set_local $label - (i32.const 90) + (block + (set_local $$rsize$49$i + (get_local $$sub101$rsize$4$i) + ) + (set_local $$t$48$i + (get_local $$60) + ) + (set_local $$v$410$i + (get_local $$t$4$v$4$i) + ) + (set_local $label + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (set_local $$cmp116$i @@ -20650,85 +20752,87 @@ ) ) ) - (block - (set_local $$R$1$i$168 - (get_local $$68) - ) - (set_local $$RP$1$i$167 - (get_local $$arrayidx151$i) - ) - ) - ) - (loop $while-out$9 $while-in$10 - (set_local $$arrayidx161$i - (i32.add - (get_local $$R$1$i$168) - (i32.const 20) - ) - ) - (set_local $$70 - (i32.load - (get_local $$arrayidx161$i) - ) - ) - (set_local $$cmp162$i - (i32.eq - (get_local $$70) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp162$i) + (block + (set_local $$R$1$i$168 + (get_local $$68) ) - (block - (set_local $$R$1$i$168 - (get_local $$70) + (set_local $$RP$1$i$167 + (get_local $$arrayidx151$i) + ) + ) + ) + (loop $while-in$10 + (block $while-out$9 + (set_local $$arrayidx161$i + (i32.add + (get_local $$R$1$i$168) + (i32.const 20) ) - (set_local $$RP$1$i$167 + ) + (set_local $$70 + (i32.load (get_local $$arrayidx161$i) ) - (br $while-in$10) ) - ) - (set_local $$arrayidx165$i$169 - (i32.add - (get_local $$R$1$i$168) - (i32.const 16) - ) - ) - (set_local $$71 - (i32.load - (get_local $$arrayidx165$i$169) + (set_local $$cmp162$i + (i32.eq + (get_local $$70) + (i32.const 0) + ) ) - ) - (set_local $$cmp166$i - (i32.eq - (get_local $$71) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp162$i) + ) + (block + (set_local $$R$1$i$168 + (get_local $$70) + ) + (set_local $$RP$1$i$167 + (get_local $$arrayidx161$i) + ) + (br $while-in$10) + ) ) - ) - (if - (get_local $$cmp166$i) - (block - (set_local $$R$1$i$168$lcssa + (set_local $$arrayidx165$i$169 + (i32.add (get_local $$R$1$i$168) + (i32.const 16) ) - (set_local $$RP$1$i$167$lcssa - (get_local $$RP$1$i$167) + ) + (set_local $$71 + (i32.load + (get_local $$arrayidx165$i$169) ) - (br $while-out$9) ) - (block - (set_local $$R$1$i$168 + (set_local $$cmp166$i + (i32.eq (get_local $$71) + (i32.const 0) ) - (set_local $$RP$1$i$167 - (get_local $$arrayidx165$i$169) + ) + (if + (get_local $$cmp166$i) + (block + (set_local $$R$1$i$168$lcssa + (get_local $$R$1$i$168) + ) + (set_local $$RP$1$i$167$lcssa + (get_local $$RP$1$i$167) + ) + (br $while-out$9) + ) + (block + (set_local $$R$1$i$168 + (get_local $$71) + ) + (set_local $$RP$1$i$167 + (get_local $$arrayidx165$i$169) + ) ) ) + (br $while-in$10) ) - (br $while-in$10) ) (set_local $$cmp171$i (i32.lt_u @@ -21716,101 +21820,103 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-out$17 $while-in$18 - (set_local $$head386$i - (i32.add - (get_local $$T$0$i) - (i32.const 4) - ) - ) - (set_local $$88 - (i32.load - (get_local $$head386$i) + (loop $while-in$18 + (block $while-out$17 + (set_local $$head386$i + (i32.add + (get_local $$T$0$i) + (i32.const 4) + ) ) - ) - (set_local $$and387$i - (i32.and - (get_local $$88) - (i32.const -8) + (set_local $$88 + (i32.load + (get_local $$head386$i) + ) ) - ) - (set_local $$cmp388$i - (i32.eq - (get_local $$and387$i) - (get_local $$rsize$4$lcssa$i) + (set_local $$and387$i + (i32.and + (get_local $$88) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp388$i) - (block - (set_local $$T$0$i$lcssa - (get_local $$T$0$i) + (set_local $$cmp388$i + (i32.eq + (get_local $$and387$i) + (get_local $$rsize$4$lcssa$i) ) - (set_local $label - (i32.const 148) + ) + (if + (get_local $$cmp388$i) + (block + (set_local $$T$0$i$lcssa + (get_local $$T$0$i) + ) + (set_local $label + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $$shr391$i - (i32.shr_u - (get_local $$K373$0$i) - (i32.const 31) + (set_local $$shr391$i + (i32.shr_u + (get_local $$K373$0$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx394$i - (i32.add + (set_local $$arrayidx394$i (i32.add - (get_local $$T$0$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr391$i) + (i32.const 2) + ) ) + ) + (set_local $$shl395$i (i32.shl - (get_local $$shr391$i) - (i32.const 2) + (get_local $$K373$0$i) + (i32.const 1) ) ) - ) - (set_local $$shl395$i - (i32.shl - (get_local $$K373$0$i) - (i32.const 1) - ) - ) - (set_local $$89 - (i32.load - (get_local $$arrayidx394$i) - ) - ) - (set_local $$cmp396$i - (i32.eq - (get_local $$89) - (i32.const 0) - ) - ) - (if - (get_local $$cmp396$i) - (block - (set_local $$T$0$i$lcssa293 - (get_local $$T$0$i) - ) - (set_local $$arrayidx394$i$lcssa + (set_local $$89 + (i32.load (get_local $$arrayidx394$i) ) - (set_local $label - (i32.const 145) + ) + (set_local $$cmp396$i + (i32.eq + (get_local $$89) + (i32.const 0) ) - (br $while-out$17) ) - (block - (set_local $$K373$0$i - (get_local $$shl395$i) + (if + (get_local $$cmp396$i) + (block + (set_local $$T$0$i$lcssa293 + (get_local $$T$0$i) + ) + (set_local $$arrayidx394$i$lcssa + (get_local $$arrayidx394$i) + ) + (set_local $label + (i32.const 145) + ) + (br $while-out$17) ) - (set_local $$T$0$i - (get_local $$89) + (block + (set_local $$K373$0$i + (get_local $$shl395$i) + ) + (set_local $$T$0$i + (get_local $$89) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -22487,90 +22593,92 @@ (set_local $$sp$0$i$i (i32.const 624) ) - (loop $while-out$37 $while-in$38 - (set_local $$105 - (i32.load - (get_local $$sp$0$i$i) - ) - ) - (set_local $$cmp$i$9$i - (i32.gt_u - (get_local $$105) - (get_local $$104) + (loop $while-in$38 + (block $while-out$37 + (set_local $$105 + (i32.load + (get_local $$sp$0$i$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp$i$9$i) + (set_local $$cmp$i$9$i + (i32.gt_u + (get_local $$105) + (get_local $$104) + ) ) - (block - (set_local $$size$i$i - (i32.add - (get_local $$sp$0$i$i) - (i32.const 4) - ) + (if + (i32.eqz + (get_local $$cmp$i$9$i) ) - (set_local $$106 - (i32.load - (get_local $$size$i$i) + (block + (set_local $$size$i$i + (i32.add + (get_local $$sp$0$i$i) + (i32.const 4) + ) ) - ) - (set_local $$add$ptr$i$i - (i32.add - (get_local $$105) - (get_local $$106) + (set_local $$106 + (i32.load + (get_local $$size$i$i) + ) ) - ) - (set_local $$cmp2$i$i - (i32.gt_u - (get_local $$add$ptr$i$i) - (get_local $$104) + (set_local $$add$ptr$i$i + (i32.add + (get_local $$105) + (get_local $$106) + ) ) - ) - (if - (get_local $$cmp2$i$i) - (block - (set_local $$base$i$i$lcssa - (get_local $$sp$0$i$i) + (set_local $$cmp2$i$i + (i32.gt_u + (get_local $$add$ptr$i$i) + (get_local $$104) ) - (set_local $$size$i$i$lcssa - (get_local $$size$i$i) + ) + (if + (get_local $$cmp2$i$i) + (block + (set_local $$base$i$i$lcssa + (get_local $$sp$0$i$i) + ) + (set_local $$size$i$i$lcssa + (get_local $$size$i$i) + ) + (br $while-out$37) ) - (br $while-out$37) ) ) ) - ) - (set_local $$next$i$i - (i32.add - (get_local $$sp$0$i$i) - (i32.const 8) - ) - ) - (set_local $$107 - (i32.load - (get_local $$next$i$i) + (set_local $$next$i$i + (i32.add + (get_local $$sp$0$i$i) + (i32.const 8) + ) ) - ) - (set_local $$cmp3$i$i - (i32.eq - (get_local $$107) - (i32.const 0) + (set_local $$107 + (i32.load + (get_local $$next$i$i) + ) ) - ) - (if - (get_local $$cmp3$i$i) - (block - (set_local $label - (i32.const 173) + (set_local $$cmp3$i$i + (i32.eq + (get_local $$107) + (i32.const 0) ) - (br $label$break$L259) ) - (set_local $$sp$0$i$i - (get_local $$107) + (if + (get_local $$cmp3$i$i) + (block + (set_local $label + (i32.const 173) + ) + (br $label$break$L259) + ) + (set_local $$sp$0$i$i + (get_local $$107) + ) ) + (br $while-in$38) ) - (br $while-in$38) ) (set_local $$112 (i32.load @@ -23269,62 +23377,64 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-out$77 $while-in$78 - (set_local $$shl$i$i - (i32.shl - (get_local $$i$01$i$i) - (i32.const 1) - ) - ) - (set_local $$arrayidx$i$i - (i32.add - (i32.const 216) + (loop $while-in$78 + (block $while-out$77 + (set_local $$shl$i$i (i32.shl - (get_local $$shl$i$i) - (i32.const 2) + (get_local $$i$01$i$i) + (i32.const 1) ) ) - ) - (set_local $$122 - (i32.add - (get_local $$arrayidx$i$i) - (i32.const 12) + (set_local $$arrayidx$i$i + (i32.add + (i32.const 216) + (i32.shl + (get_local $$shl$i$i) + (i32.const 2) + ) + ) ) - ) - (i32.store - (get_local $$122) - (get_local $$arrayidx$i$i) - ) - (set_local $$123 - (i32.add + (set_local $$122 + (i32.add + (get_local $$arrayidx$i$i) + (i32.const 12) + ) + ) + (i32.store + (get_local $$122) (get_local $$arrayidx$i$i) - (i32.const 8) ) - ) - (i32.store - (get_local $$123) - (get_local $$arrayidx$i$i) - ) - (set_local $$inc$i$i - (i32.add - (get_local $$i$01$i$i) - (i32.const 1) + (set_local $$123 + (i32.add + (get_local $$arrayidx$i$i) + (i32.const 8) + ) + ) + (i32.store + (get_local $$123) + (get_local $$arrayidx$i$i) ) - ) - (set_local $$exitcond$i$i - (i32.eq - (get_local $$inc$i$i) - (i32.const 32) + (set_local $$inc$i$i + (i32.add + (get_local $$i$01$i$i) + (i32.const 1) + ) ) - ) - (if - (get_local $$exitcond$i$i) - (br $while-out$77) - (set_local $$i$01$i$i - (get_local $$inc$i$i) + (set_local $$exitcond$i$i + (i32.eq + (get_local $$inc$i$i) + (i32.const 32) + ) + ) + (if + (get_local $$exitcond$i$i) + (br $while-out$77) + (set_local $$i$01$i$i + (get_local $$inc$i$i) + ) ) + (br $while-in$78) ) - (br $while-in$78) ) (set_local $$sub172$i (i32.add @@ -23438,81 +23548,83 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-out$46 $while-in$47 - (set_local $$127 - (i32.load - (get_local $$sp$0108$i) - ) - ) - (set_local $$size188$i - (i32.add - (get_local $$sp$0108$i) - (i32.const 4) - ) - ) - (set_local $$128 - (i32.load - (get_local $$size188$i) + (loop $while-in$47 + (block $while-out$46 + (set_local $$127 + (i32.load + (get_local $$sp$0108$i) + ) ) - ) - (set_local $$add$ptr189$i - (i32.add - (get_local $$127) - (get_local $$128) + (set_local $$size188$i + (i32.add + (get_local $$sp$0108$i) + (i32.const 4) + ) ) - ) - (set_local $$cmp190$i - (i32.eq - (get_local $$tbase$796$i) - (get_local $$add$ptr189$i) + (set_local $$128 + (i32.load + (get_local $$size188$i) + ) ) - ) - (if - (get_local $$cmp190$i) - (block - (set_local $$$lcssa + (set_local $$add$ptr189$i + (i32.add (get_local $$127) - ) - (set_local $$$lcssa290 (get_local $$128) ) - (set_local $$size188$i$lcssa - (get_local $$size188$i) - ) - (set_local $$sp$0108$i$lcssa - (get_local $$sp$0108$i) + ) + (set_local $$cmp190$i + (i32.eq + (get_local $$tbase$796$i) + (get_local $$add$ptr189$i) ) - (set_local $label - (i32.const 203) + ) + (if + (get_local $$cmp190$i) + (block + (set_local $$$lcssa + (get_local $$127) + ) + (set_local $$$lcssa290 + (get_local $$128) + ) + (set_local $$size188$i$lcssa + (get_local $$size188$i) + ) + (set_local $$sp$0108$i$lcssa + (get_local $$sp$0108$i) + ) + (set_local $label + (i32.const 203) + ) + (br $while-out$46) ) - (br $while-out$46) ) - ) - (set_local $$next$i - (i32.add - (get_local $$sp$0108$i) - (i32.const 8) + (set_local $$next$i + (i32.add + (get_local $$sp$0108$i) + (i32.const 8) + ) ) - ) - (set_local $$129 - (i32.load - (get_local $$next$i) + (set_local $$129 + (i32.load + (get_local $$next$i) + ) ) - ) - (set_local $$cmp186$i - (i32.eq - (get_local $$129) - (i32.const 0) + (set_local $$cmp186$i + (i32.eq + (get_local $$129) + (i32.const 0) + ) ) - ) - (if - (get_local $$cmp186$i) - (br $while-out$46) - (set_local $$sp$0108$i - (get_local $$129) + (if + (get_local $$cmp186$i) + (br $while-out$46) + (set_local $$sp$0108$i + (get_local $$129) + ) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -23731,63 +23843,65 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-out$48 $while-in$49 - (set_local $$136 - (i32.load - (get_local $$sp$1107$i) - ) - ) - (set_local $$cmp228$i - (i32.eq - (get_local $$136) - (get_local $$add$ptr227$i) - ) - ) - (if - (get_local $$cmp228$i) - (block - (set_local $$base226$i$lcssa - (get_local $$sp$1107$i) - ) - (set_local $$sp$1107$i$lcssa + (loop $while-in$49 + (block $while-out$48 + (set_local $$136 + (i32.load (get_local $$sp$1107$i) ) - (set_local $label - (i32.const 211) + ) + (set_local $$cmp228$i + (i32.eq + (get_local $$136) + (get_local $$add$ptr227$i) ) - (br $while-out$48) ) - ) - (set_local $$next231$i - (i32.add - (get_local $$sp$1107$i) - (i32.const 8) + (if + (get_local $$cmp228$i) + (block + (set_local $$base226$i$lcssa + (get_local $$sp$1107$i) + ) + (set_local $$sp$1107$i$lcssa + (get_local $$sp$1107$i) + ) + (set_local $label + (i32.const 211) + ) + (br $while-out$48) + ) ) - ) - (set_local $$137 - (i32.load - (get_local $$next231$i) + (set_local $$next231$i + (i32.add + (get_local $$sp$1107$i) + (i32.const 8) + ) ) - ) - (set_local $$cmp224$i - (i32.eq - (get_local $$137) - (i32.const 0) + (set_local $$137 + (i32.load + (get_local $$next231$i) + ) ) - ) - (if - (get_local $$cmp224$i) - (block - (set_local $$sp$0$i$i$i - (i32.const 624) + (set_local $$cmp224$i + (i32.eq + (get_local $$137) + (i32.const 0) ) - (br $while-out$48) ) - (set_local $$sp$1107$i - (get_local $$137) + (if + (get_local $$cmp224$i) + (block + (set_local $$sp$0$i$i$i + (i32.const 624) + ) + (br $while-out$48) + ) + (set_local $$sp$1107$i + (get_local $$137) + ) ) + (br $while-in$49) ) - (br $while-in$49) ) (if (i32.eq @@ -24431,76 +24545,78 @@ ) ) ) - (loop $while-out$55 $while-in$56 - (set_local $$arrayidx103$i$i - (i32.add - (get_local $$R$1$i$i) - (i32.const 20) - ) - ) - (set_local $$161 - (i32.load - (get_local $$arrayidx103$i$i) - ) - ) - (set_local $$cmp104$i$i - (i32.eq - (get_local $$161) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp104$i$i) - ) - (block - (set_local $$R$1$i$i - (get_local $$161) + (loop $while-in$56 + (block $while-out$55 + (set_local $$arrayidx103$i$i + (i32.add + (get_local $$R$1$i$i) + (i32.const 20) ) - (set_local $$RP$1$i$i + ) + (set_local $$161 + (i32.load (get_local $$arrayidx103$i$i) ) - (br $while-in$56) - ) - ) - (set_local $$arrayidx107$i$i - (i32.add - (get_local $$R$1$i$i) - (i32.const 16) ) - ) - (set_local $$162 - (i32.load - (get_local $$arrayidx107$i$i) + (set_local $$cmp104$i$i + (i32.eq + (get_local $$161) + (i32.const 0) + ) ) - ) - (set_local $$cmp108$i$i - (i32.eq - (get_local $$162) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp104$i$i) + ) + (block + (set_local $$R$1$i$i + (get_local $$161) + ) + (set_local $$RP$1$i$i + (get_local $$arrayidx103$i$i) + ) + (br $while-in$56) + ) ) - ) - (if - (get_local $$cmp108$i$i) - (block - (set_local $$R$1$i$i$lcssa + (set_local $$arrayidx107$i$i + (i32.add (get_local $$R$1$i$i) + (i32.const 16) ) - (set_local $$RP$1$i$i$lcssa - (get_local $$RP$1$i$i) + ) + (set_local $$162 + (i32.load + (get_local $$arrayidx107$i$i) ) - (br $while-out$55) ) - (block - (set_local $$R$1$i$i + (set_local $$cmp108$i$i + (i32.eq (get_local $$162) + (i32.const 0) ) - (set_local $$RP$1$i$i - (get_local $$arrayidx107$i$i) + ) + (if + (get_local $$cmp108$i$i) + (block + (set_local $$R$1$i$i$lcssa + (get_local $$R$1$i$i) + ) + (set_local $$RP$1$i$i$lcssa + (get_local $$RP$1$i$i) + ) + (br $while-out$55) + ) + (block + (set_local $$R$1$i$i + (get_local $$162) + ) + (set_local $$RP$1$i$i + (get_local $$arrayidx107$i$i) + ) ) ) + (br $while-in$56) ) - (br $while-in$56) ) (set_local $$cmp112$i$i (i32.lt_u @@ -25466,101 +25582,103 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-out$69 $while-in$70 - (set_local $$head317$i$i - (i32.add - (get_local $$T$0$i$58$i) - (i32.const 4) - ) - ) - (set_local $$179 - (i32.load - (get_local $$head317$i$i) + (loop $while-in$70 + (block $while-out$69 + (set_local $$head317$i$i + (i32.add + (get_local $$T$0$i$58$i) + (i32.const 4) + ) ) - ) - (set_local $$and318$i$i - (i32.and - (get_local $$179) - (i32.const -8) + (set_local $$179 + (i32.load + (get_local $$head317$i$i) + ) ) - ) - (set_local $$cmp319$i$i - (i32.eq - (get_local $$and318$i$i) - (get_local $$qsize$0$i$i) + (set_local $$and318$i$i + (i32.and + (get_local $$179) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp319$i$i) - (block - (set_local $$T$0$i$58$i$lcssa - (get_local $$T$0$i$58$i) + (set_local $$cmp319$i$i + (i32.eq + (get_local $$and318$i$i) + (get_local $$qsize$0$i$i) ) - (set_local $label - (i32.const 281) + ) + (if + (get_local $$cmp319$i$i) + (block + (set_local $$T$0$i$58$i$lcssa + (get_local $$T$0$i$58$i) + ) + (set_local $label + (i32.const 281) + ) + (br $while-out$69) ) - (br $while-out$69) ) - ) - (set_local $$shr322$i$i - (i32.shr_u - (get_local $$K305$0$i$i) - (i32.const 31) + (set_local $$shr322$i$i + (i32.shr_u + (get_local $$K305$0$i$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx325$i$i - (i32.add + (set_local $$arrayidx325$i$i (i32.add - (get_local $$T$0$i$58$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i$58$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr322$i$i) + (i32.const 2) + ) ) + ) + (set_local $$shl326$i$i (i32.shl - (get_local $$shr322$i$i) - (i32.const 2) + (get_local $$K305$0$i$i) + (i32.const 1) ) ) - ) - (set_local $$shl326$i$i - (i32.shl - (get_local $$K305$0$i$i) - (i32.const 1) - ) - ) - (set_local $$180 - (i32.load - (get_local $$arrayidx325$i$i) - ) - ) - (set_local $$cmp327$i$i - (i32.eq - (get_local $$180) - (i32.const 0) - ) - ) - (if - (get_local $$cmp327$i$i) - (block - (set_local $$T$0$i$58$i$lcssa283 - (get_local $$T$0$i$58$i) - ) - (set_local $$arrayidx325$i$i$lcssa + (set_local $$180 + (i32.load (get_local $$arrayidx325$i$i) ) - (set_local $label - (i32.const 278) + ) + (set_local $$cmp327$i$i + (i32.eq + (get_local $$180) + (i32.const 0) ) - (br $while-out$69) ) - (block - (set_local $$K305$0$i$i - (get_local $$shl326$i$i) + (if + (get_local $$cmp327$i$i) + (block + (set_local $$T$0$i$58$i$lcssa283 + (get_local $$T$0$i$58$i) + ) + (set_local $$arrayidx325$i$i$lcssa + (get_local $$arrayidx325$i$i) + ) + (set_local $label + (i32.const 278) + ) + (br $while-out$69) ) - (set_local $$T$0$i$58$i - (get_local $$180) + (block + (set_local $$K305$0$i$i + (get_local $$shl326$i$i) + ) + (set_local $$T$0$i$58$i + (get_local $$180) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (if (i32.eq @@ -25737,72 +25855,74 @@ ) ) ) - (loop $while-out$71 $while-in$72 - (set_local $$185 - (i32.load - (get_local $$sp$0$i$i$i) - ) - ) - (set_local $$cmp$i$i$i - (i32.gt_u - (get_local $$185) - (get_local $$119) + (loop $while-in$72 + (block $while-out$71 + (set_local $$185 + (i32.load + (get_local $$sp$0$i$i$i) + ) ) - ) - (if - (i32.eqz - (get_local $$cmp$i$i$i) + (set_local $$cmp$i$i$i + (i32.gt_u + (get_local $$185) + (get_local $$119) + ) ) - (block - (set_local $$size$i$i$i - (i32.add - (get_local $$sp$0$i$i$i) - (i32.const 4) - ) + (if + (i32.eqz + (get_local $$cmp$i$i$i) ) - (set_local $$186 - (i32.load - (get_local $$size$i$i$i) + (block + (set_local $$size$i$i$i + (i32.add + (get_local $$sp$0$i$i$i) + (i32.const 4) + ) ) - ) - (set_local $$add$ptr$i$i$i - (i32.add - (get_local $$185) - (get_local $$186) + (set_local $$186 + (i32.load + (get_local $$size$i$i$i) + ) ) - ) - (set_local $$cmp2$i$i$i - (i32.gt_u - (get_local $$add$ptr$i$i$i) - (get_local $$119) + (set_local $$add$ptr$i$i$i + (i32.add + (get_local $$185) + (get_local $$186) + ) ) - ) - (if - (get_local $$cmp2$i$i$i) - (block - (set_local $$add$ptr$i$i$i$lcssa + (set_local $$cmp2$i$i$i + (i32.gt_u (get_local $$add$ptr$i$i$i) + (get_local $$119) + ) + ) + (if + (get_local $$cmp2$i$i$i) + (block + (set_local $$add$ptr$i$i$i$lcssa + (get_local $$add$ptr$i$i$i) + ) + (br $while-out$71) ) - (br $while-out$71) ) ) ) - ) - (set_local $$next$i$i$i - (i32.add - (get_local $$sp$0$i$i$i) - (i32.const 8) + (set_local $$next$i$i$i + (i32.add + (get_local $$sp$0$i$i$i) + (i32.const 8) + ) ) - ) - (set_local $$187 - (i32.load - (get_local $$next$i$i$i) + (set_local $$187 + (i32.load + (get_local $$next$i$i$i) + ) ) + (set_local $$sp$0$i$i$i + (get_local $$187) + ) + (br $while-in$72) ) - (set_local $$sp$0$i$i$i - (get_local $$187) - ) - (br $while-in$72) ) (set_local $$add$ptr2$i$i (i32.add @@ -26065,37 +26185,39 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-out$73 $while-in$74 - (set_local $$add$ptr24$i$i - (i32.add - (get_local $$p$0$i$i) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (set_local $$add$ptr24$i$i + (i32.add + (get_local $$p$0$i$i) + (i32.const 4) + ) ) - ) - (i32.store - (get_local $$add$ptr24$i$i) - (i32.const 7) - ) - (set_local $$193 - (i32.add + (i32.store (get_local $$add$ptr24$i$i) - (i32.const 4) + (i32.const 7) ) - ) - (set_local $$cmp27$i$i - (i32.lt_u - (get_local $$193) - (get_local $$add$ptr$i$i$i$lcssa) + (set_local $$193 + (i32.add + (get_local $$add$ptr24$i$i) + (i32.const 4) + ) ) - ) - (if - (get_local $$cmp27$i$i) - (set_local $$p$0$i$i - (get_local $$add$ptr24$i$i) + (set_local $$cmp27$i$i + (i32.lt_u + (get_local $$193) + (get_local $$add$ptr$i$i$i$lcssa) + ) + ) + (if + (get_local $$cmp27$i$i) + (set_local $$p$0$i$i + (get_local $$add$ptr24$i$i) + ) + (br $while-out$73) ) - (br $while-out$73) + (br $while-in$74) ) - (br $while-in$74) ) (set_local $$cmp28$i$i (i32.eq @@ -26625,101 +26747,103 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-out$75 $while-in$76 - (set_local $$head118$i$i - (i32.add - (get_local $$T$0$i$i) - (i32.const 4) - ) - ) - (set_local $$201 - (i32.load - (get_local $$head118$i$i) + (loop $while-in$76 + (block $while-out$75 + (set_local $$head118$i$i + (i32.add + (get_local $$T$0$i$i) + (i32.const 4) + ) ) - ) - (set_local $$and119$i$i - (i32.and - (get_local $$201) - (i32.const -8) + (set_local $$201 + (i32.load + (get_local $$head118$i$i) + ) ) - ) - (set_local $$cmp120$i$i - (i32.eq - (get_local $$and119$i$i) - (get_local $$sub$ptr$sub$i$i) + (set_local $$and119$i$i + (i32.and + (get_local $$201) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp120$i$i) - (block - (set_local $$T$0$i$i$lcssa - (get_local $$T$0$i$i) + (set_local $$cmp120$i$i + (i32.eq + (get_local $$and119$i$i) + (get_local $$sub$ptr$sub$i$i) ) - (set_local $label - (i32.const 307) + ) + (if + (get_local $$cmp120$i$i) + (block + (set_local $$T$0$i$i$lcssa + (get_local $$T$0$i$i) + ) + (set_local $label + (i32.const 307) + ) + (br $while-out$75) ) - (br $while-out$75) ) - ) - (set_local $$shr123$i$i - (i32.shr_u - (get_local $$K105$0$i$i) - (i32.const 31) + (set_local $$shr123$i$i + (i32.shr_u + (get_local $$K105$0$i$i) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx126$i$i - (i32.add + (set_local $$arrayidx126$i$i (i32.add - (get_local $$T$0$i$i) - (i32.const 16) + (i32.add + (get_local $$T$0$i$i) + (i32.const 16) + ) + (i32.shl + (get_local $$shr123$i$i) + (i32.const 2) + ) ) + ) + (set_local $$shl127$i$i (i32.shl - (get_local $$shr123$i$i) - (i32.const 2) + (get_local $$K105$0$i$i) + (i32.const 1) ) ) - ) - (set_local $$shl127$i$i - (i32.shl - (get_local $$K105$0$i$i) - (i32.const 1) - ) - ) - (set_local $$202 - (i32.load - (get_local $$arrayidx126$i$i) - ) - ) - (set_local $$cmp128$i$i - (i32.eq - (get_local $$202) - (i32.const 0) - ) - ) - (if - (get_local $$cmp128$i$i) - (block - (set_local $$T$0$i$i$lcssa284 - (get_local $$T$0$i$i) - ) - (set_local $$arrayidx126$i$i$lcssa + (set_local $$202 + (i32.load (get_local $$arrayidx126$i$i) ) - (set_local $label - (i32.const 304) + ) + (set_local $$cmp128$i$i + (i32.eq + (get_local $$202) + (i32.const 0) ) - (br $while-out$75) ) - (block - (set_local $$K105$0$i$i - (get_local $$shl127$i$i) + (if + (get_local $$cmp128$i$i) + (block + (set_local $$T$0$i$i$lcssa284 + (get_local $$T$0$i$i) + ) + (set_local $$arrayidx126$i$i$lcssa + (get_local $$arrayidx126$i$i) + ) + (set_local $label + (i32.const 304) + ) + (br $while-out$75) ) - (set_local $$T$0$i$i - (get_local $$202) + (block + (set_local $$K105$0$i$i + (get_local $$shl127$i$i) + ) + (set_local $$T$0$i$i + (get_local $$202) + ) ) ) + (br $while-in$76) ) - (br $while-in$76) ) (if (i32.eq @@ -27880,76 +28004,78 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $$arrayidx108 - (i32.add - (get_local $$R$1) - (i32.const 20) - ) - ) - (set_local $$16 - (i32.load - (get_local $$arrayidx108) - ) - ) - (set_local $$cmp109 - (i32.eq - (get_local $$16) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp109) - ) - (block - (set_local $$R$1 - (get_local $$16) + (loop $while-in$5 + (block $while-out$4 + (set_local $$arrayidx108 + (i32.add + (get_local $$R$1) + (i32.const 20) ) - (set_local $$RP$1 + ) + (set_local $$16 + (i32.load (get_local $$arrayidx108) ) - (br $while-in$5) - ) - ) - (set_local $$arrayidx113 - (i32.add - (get_local $$R$1) - (i32.const 16) ) - ) - (set_local $$17 - (i32.load - (get_local $$arrayidx113) + (set_local $$cmp109 + (i32.eq + (get_local $$16) + (i32.const 0) + ) ) - ) - (set_local $$cmp114 - (i32.eq - (get_local $$17) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp109) + ) + (block + (set_local $$R$1 + (get_local $$16) + ) + (set_local $$RP$1 + (get_local $$arrayidx108) + ) + (br $while-in$5) + ) ) - ) - (if - (get_local $$cmp114) - (block - (set_local $$R$1$lcssa + (set_local $$arrayidx113 + (i32.add (get_local $$R$1) + (i32.const 16) ) - (set_local $$RP$1$lcssa - (get_local $$RP$1) + ) + (set_local $$17 + (i32.load + (get_local $$arrayidx113) ) - (br $while-out$4) ) - (block - (set_local $$R$1 + (set_local $$cmp114 + (i32.eq (get_local $$17) + (i32.const 0) ) - (set_local $$RP$1 - (get_local $$arrayidx113) + ) + (if + (get_local $$cmp114) + (block + (set_local $$R$1$lcssa + (get_local $$R$1) + ) + (set_local $$RP$1$lcssa + (get_local $$RP$1) + ) + (br $while-out$4) + ) + (block + (set_local $$R$1 + (get_local $$17) + ) + (set_local $$RP$1 + (get_local $$arrayidx113) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (set_local $$cmp118 (i32.lt_u @@ -28919,77 +29045,79 @@ (get_local $$arrayidx362) ) ) - ) - (loop $while-out$12 $while-in$13 - (set_local $$arrayidx374 - (i32.add - (get_local $$R332$1) - (i32.const 20) - ) - ) - (set_local $$49 - (i32.load - (get_local $$arrayidx374) - ) - ) - (set_local $$cmp375 - (i32.eq - (get_local $$49) - (i32.const 0) - ) - ) - (if - (i32.eqz - (get_local $$cmp375) - ) - (block - (set_local $$R332$1 - (get_local $$49) + ) + (loop $while-in$13 + (block $while-out$12 + (set_local $$arrayidx374 + (i32.add + (get_local $$R332$1) + (i32.const 20) ) - (set_local $$RP360$1 + ) + (set_local $$49 + (i32.load (get_local $$arrayidx374) ) - (br $while-in$13) - ) - ) - (set_local $$arrayidx379 - (i32.add - (get_local $$R332$1) - (i32.const 16) ) - ) - (set_local $$50 - (i32.load - (get_local $$arrayidx379) + (set_local $$cmp375 + (i32.eq + (get_local $$49) + (i32.const 0) + ) ) - ) - (set_local $$cmp380 - (i32.eq - (get_local $$50) - (i32.const 0) + (if + (i32.eqz + (get_local $$cmp375) + ) + (block + (set_local $$R332$1 + (get_local $$49) + ) + (set_local $$RP360$1 + (get_local $$arrayidx374) + ) + (br $while-in$13) + ) ) - ) - (if - (get_local $$cmp380) - (block - (set_local $$R332$1$lcssa + (set_local $$arrayidx379 + (i32.add (get_local $$R332$1) + (i32.const 16) ) - (set_local $$RP360$1$lcssa - (get_local $$RP360$1) + ) + (set_local $$50 + (i32.load + (get_local $$arrayidx379) ) - (br $while-out$12) ) - (block - (set_local $$R332$1 + (set_local $$cmp380 + (i32.eq (get_local $$50) + (i32.const 0) ) - (set_local $$RP360$1 - (get_local $$arrayidx379) + ) + (if + (get_local $$cmp380) + (block + (set_local $$R332$1$lcssa + (get_local $$R332$1) + ) + (set_local $$RP360$1$lcssa + (get_local $$RP360$1) + ) + (br $while-out$12) + ) + (block + (set_local $$R332$1 + (get_local $$50) + ) + (set_local $$RP360$1 + (get_local $$arrayidx379) + ) ) ) + (br $while-in$13) ) - (br $while-in$13) ) (set_local $$51 (i32.load @@ -29978,101 +30106,103 @@ (set_local $$T$0 (get_local $$67) ) - (loop $while-out$18 $while-in$19 - (set_local $$head591 - (i32.add - (get_local $$T$0) - (i32.const 4) - ) - ) - (set_local $$68 - (i32.load - (get_local $$head591) + (loop $while-in$19 + (block $while-out$18 + (set_local $$head591 + (i32.add + (get_local $$T$0) + (i32.const 4) + ) ) - ) - (set_local $$and592 - (i32.and - (get_local $$68) - (i32.const -8) + (set_local $$68 + (i32.load + (get_local $$head591) + ) ) - ) - (set_local $$cmp593 - (i32.eq - (get_local $$and592) - (get_local $$psize$2) + (set_local $$and592 + (i32.and + (get_local $$68) + (i32.const -8) + ) ) - ) - (if - (get_local $$cmp593) - (block - (set_local $$T$0$lcssa - (get_local $$T$0) + (set_local $$cmp593 + (i32.eq + (get_local $$and592) + (get_local $$psize$2) ) - (set_local $label - (i32.const 130) + ) + (if + (get_local $$cmp593) + (block + (set_local $$T$0$lcssa + (get_local $$T$0) + ) + (set_local $label + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $$shr596 - (i32.shr_u - (get_local $$K583$0) - (i32.const 31) + (set_local $$shr596 + (i32.shr_u + (get_local $$K583$0) + (i32.const 31) + ) ) - ) - (set_local $$arrayidx599 - (i32.add + (set_local $$arrayidx599 (i32.add - (get_local $$T$0) - (i32.const 16) + (i32.add + (get_local $$T$0) + (i32.const 16) + ) + (i32.shl + (get_local $$shr596) + (i32.const 2) + ) ) + ) + (set_local $$shl600 (i32.shl - (get_local $$shr596) - (i32.const 2) + (get_local $$K583$0) + (i32.const 1) ) ) - ) - (set_local $$shl600 - (i32.shl - (get_local $$K583$0) - (i32.const 1) - ) - ) - (set_local $$69 - (i32.load - (get_local $$arrayidx599) - ) - ) - (set_local $$cmp601 - (i32.eq - (get_local $$69) - (i32.const 0) - ) - ) - (if - (get_local $$cmp601) - (block - (set_local $$T$0$lcssa319 - (get_local $$T$0) - ) - (set_local $$arrayidx599$lcssa + (set_local $$69 + (i32.load (get_local $$arrayidx599) ) - (set_local $label - (i32.const 127) + ) + (set_local $$cmp601 + (i32.eq + (get_local $$69) + (i32.const 0) ) - (br $while-out$18) ) - (block - (set_local $$K583$0 - (get_local $$shl600) + (if + (get_local $$cmp601) + (block + (set_local $$T$0$lcssa319 + (get_local $$T$0) + ) + (set_local $$arrayidx599$lcssa + (get_local $$arrayidx599) + ) + (set_local $label + (i32.const 127) + ) + (br $while-out$18) ) - (set_local $$T$0 - (get_local $$69) + (block + (set_local $$K583$0 + (get_local $$shl600) + ) + (set_local $$T$0 + (get_local $$69) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -30258,32 +30388,34 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $$sp$0$i - (i32.load - (get_local $$sp$0$in$i) + (loop $while-in$21 + (block $while-out$20 + (set_local $$sp$0$i + (i32.load + (get_local $$sp$0$in$i) + ) ) - ) - (set_local $$cmp$i - (i32.eq - (get_local $$sp$0$i) - (i32.const 0) + (set_local $$cmp$i + (i32.eq + (get_local $$sp$0$i) + (i32.const 0) + ) ) - ) - (set_local $$next4$i - (i32.add - (get_local $$sp$0$i) - (i32.const 8) + (set_local $$next4$i + (i32.add + (get_local $$sp$0$i) + (i32.const 8) + ) ) - ) - (if - (get_local $$cmp$i) - (br $while-out$20) - (set_local $$sp$0$in$i - (get_local $$next4$i) + (if + (get_local $$cmp$i) + (br $while-out$20) + (set_local $$sp$0$in$i + (get_local $$next4$i) + ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 208) @@ -30433,81 +30565,87 @@ (get_local $unaligned) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $unaligned) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $unaligned) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $ptr) - (get_local $value) - ) - (set_local $ptr - (i32.add + (block + (i32.store8 (get_local $ptr) - (i32.const 1) + (get_local $value) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $stop4) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $stop4) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $ptr) - (get_local $value4) - ) - (set_local $ptr - (i32.add + (block + (i32.store (get_local $ptr) - (i32.const 4) + (get_local $value4) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $ptr) - (get_local $stop) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $ptr) + (get_local $stop) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $ptr) - (get_local $value) - ) - (set_local $ptr - (i32.add + (block + (i32.store8 (get_local $ptr) - (i32.const 1) + (get_local $value) + ) + (set_local $ptr + (i32.add + (get_local $ptr) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub @@ -30668,130 +30806,136 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $dest) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if - (i32.eq - (get_local $num) - (i32.const 0) - ) - (return - (get_local $ret) + (i32.eqz + (i32.and + (get_local $dest) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $dest) - (i32.load8_s - (get_local $src) + (block + (if + (i32.eq + (get_local $num) + (i32.const 0) + ) + (return + (get_local $ret) + ) ) - ) - (set_local $dest - (i32.add + (i32.store8 (get_local $dest) - (i32.const 1) + (i32.load8_s + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 1) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 1) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 1) + (set_local $src + (i32.add + (get_local $src) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $num) - (i32.const 4) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $dest) - (i32.load - (get_local $src) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $num) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $dest - (i32.add + (block + (i32.store (get_local $dest) - (i32.const 4) + (i32.load + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 4) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 4) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 4) + (set_local $src + (i32.add + (get_local $src) + (i32.const 4) + ) + ) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $num) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $dest) - (i32.load8_s - (get_local $src) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $num) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $dest - (i32.add + (block + (i32.store8 (get_local $dest) - (i32.const 1) + (i32.load8_s + (get_local $src) + ) ) - ) - (set_local $src - (i32.add - (get_local $src) - (i32.const 1) + (set_local $dest + (i32.add + (get_local $dest) + (i32.const 1) + ) ) - ) - (set_local $num - (i32.sub - (get_local $num) - (i32.const 1) + (set_local $src + (i32.add + (get_local $src) + (i32.const 1) + ) + ) + (set_local $num + (i32.sub + (get_local $num) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $ret) @@ -32439,172 +32583,174 @@ (set_local $$carry_0203 (i32.const 0) ) - (loop $while-out$2 $while-in$3 - (set_local $$147 - (i32.or - (i32.shr_u - (get_local $$q_sroa_0_1199) - (i32.const 31) - ) - (i32.shl - (get_local $$q_sroa_1_1198) - (i32.const 1) - ) - ) - ) - (set_local $$149 - (i32.or - (get_local $$carry_0203) - (i32.shl - (get_local $$q_sroa_0_1199) - (i32.const 1) + (loop $while-in$3 + (block $while-out$2 + (set_local $$147 + (i32.or + (i32.shr_u + (get_local $$q_sroa_0_1199) + (i32.const 31) + ) + (i32.shl + (get_local $$q_sroa_1_1198) + (i32.const 1) + ) ) ) - ) - (set_local $$r_sroa_0_0_insert_insert42$0 - (i32.or - (i32.const 0) + (set_local $$149 (i32.or + (get_local $$carry_0203) (i32.shl - (get_local $$r_sroa_0_1201) + (get_local $$q_sroa_0_1199) (i32.const 1) ) + ) + ) + (set_local $$r_sroa_0_0_insert_insert42$0 + (i32.or + (i32.const 0) + (i32.or + (i32.shl + (get_local $$r_sroa_0_1201) + (i32.const 1) + ) + (i32.shr_u + (get_local $$q_sroa_1_1198) + (i32.const 31) + ) + ) + ) + ) + (set_local $$r_sroa_0_0_insert_insert42$1 + (i32.or (i32.shr_u - (get_local $$q_sroa_1_1198) + (get_local $$r_sroa_0_1201) (i32.const 31) ) + (i32.shl + (get_local $$r_sroa_1_1200) + (i32.const 1) + ) ) ) - ) - (set_local $$r_sroa_0_0_insert_insert42$1 - (i32.or - (i32.shr_u - (get_local $$r_sroa_0_1201) - (i32.const 31) - ) - (i32.shl - (get_local $$r_sroa_1_1200) - (i32.const 1) + (drop + (call $_i64Subtract + (get_local $$137$0) + (get_local $$137$1) + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) ) ) - ) - (drop - (call $_i64Subtract - (get_local $$137$0) - (get_local $$137$1) - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) - ) - ) - (set_local $$150$1 - (i32.load - (i32.const 168) - ) - ) - (set_local $$151$0 - (i32.or - (i32.shr_s - (get_local $$150$1) - (i32.const 31) + (set_local $$150$1 + (i32.load + (i32.const 168) ) - (i32.shl - (if - (i32.lt_s - (get_local $$150$1) + ) + (set_local $$151$0 + (i32.or + (i32.shr_s + (get_local $$150$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $$152 - (i32.and - (get_local $$151$0) - (i32.const 1) - ) - ) - (set_local $$154$0 - (call $_i64Subtract - (get_local $$r_sroa_0_0_insert_insert42$0) - (get_local $$r_sroa_0_0_insert_insert42$1) + (set_local $$152 (i32.and (get_local $$151$0) - (get_local $$d_sroa_0_0_insert_insert99$0) + (i32.const 1) ) - (i32.and - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$150$1) + ) + (set_local $$154$0 + (call $_i64Subtract + (get_local $$r_sroa_0_0_insert_insert42$0) + (get_local $$r_sroa_0_0_insert_insert42$1) + (i32.and + (get_local $$151$0) + (get_local $$d_sroa_0_0_insert_insert99$0) + ) + (i32.and + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 31) ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$150$1) + (i32.shl + (if + (i32.lt_s + (get_local $$150$1) + (i32.const 0) + ) + (i32.const -1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (i32.const 1) ) - (i32.const 1) ) + (get_local $$d_sroa_0_0_insert_insert99$1) ) - (get_local $$d_sroa_0_0_insert_insert99$1) ) ) - ) - (set_local $$r_sroa_0_0_extract_trunc - (get_local $$154$0) - ) - (set_local $$r_sroa_1_4_extract_trunc - (i32.load - (i32.const 168) - ) - ) - (set_local $$155 - (i32.sub - (get_local $$sr_1202) - (i32.const 1) - ) - ) - (if - (i32.eq - (get_local $$155) - (i32.const 0) + (set_local $$r_sroa_0_0_extract_trunc + (get_local $$154$0) ) - (br $while-out$2) - (block - (set_local $$q_sroa_1_1198 - (get_local $$147) - ) - (set_local $$q_sroa_0_1199 - (get_local $$149) - ) - (set_local $$r_sroa_1_1200 - (get_local $$r_sroa_1_4_extract_trunc) + (set_local $$r_sroa_1_4_extract_trunc + (i32.load + (i32.const 168) ) - (set_local $$r_sroa_0_1201 - (get_local $$r_sroa_0_0_extract_trunc) + ) + (set_local $$155 + (i32.sub + (get_local $$sr_1202) + (i32.const 1) ) - (set_local $$sr_1202 + ) + (if + (i32.eq (get_local $$155) + (i32.const 0) ) - (set_local $$carry_0203 - (get_local $$152) + (br $while-out$2) + (block + (set_local $$q_sroa_1_1198 + (get_local $$147) + ) + (set_local $$q_sroa_0_1199 + (get_local $$149) + ) + (set_local $$r_sroa_1_1200 + (get_local $$r_sroa_1_4_extract_trunc) + ) + (set_local $$r_sroa_0_1201 + (get_local $$r_sroa_0_0_extract_trunc) + ) + (set_local $$sr_1202 + (get_local $$155) + ) + (set_local $$carry_0203 + (get_local $$152) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) (set_local $$q_sroa_1_1_lcssa (get_local $$147) diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index d22a30e9c..f60b62785 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -185,9 +185,8 @@ void test_core() { BinaryenBlock(module, NULL, NULL, 0), // block with no name BinaryenIf(module, temp1, temp2, temp3), BinaryenIf(module, temp4, temp5, NULL), - BinaryenLoop(module, "out", "in", makeInt32(module, 0)), - BinaryenLoop(module, NULL, "in2", makeInt32(module, 0)), - BinaryenLoop(module, NULL, NULL, makeInt32(module, 0)), + BinaryenLoop(module, "in", makeInt32(module, 0)), + BinaryenLoop(module, NULL, makeInt32(module, 0)), BinaryenBreak(module, "the-value", temp6, temp7), BinaryenBreak(module, "the-nothing", makeInt32(module, 2), NULL), BinaryenBreak(module, "the-value", NULL, makeInt32(module, 3)), diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 37e7b6040..74bb0c25e 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -411,12 +411,7 @@ BinaryenFloat64: 4 (i32.const 5) ) (drop - (loop $out $in - (i32.const 0) - ) - ) - (drop - (loop $in2 + (loop $in (i32.const 0) ) ) @@ -1099,17 +1094,19 @@ optimized: ) ) (func $loop-tail (type $v) - (loop $block$3$break $shape$0$continue - (call_import $check - (i32.const 0) - ) - (call_import $check - (i32.const 1) - ) - (if - (i32.const 10) - (br $shape$0$continue) - (br $block$3$break) + (block $block$3$break + (loop $shape$0$continue + (call_import $check + (i32.const 0) + ) + (call_import $check + (i32.const 1) + ) + (if + (i32.const 10) + (br $shape$0$continue) + (br $block$3$break) + ) ) ) (call_import $check @@ -1121,20 +1118,22 @@ optimized: (i32.const 0) ) (block $block$7$break - (loop $block$4$break $shape$1$continue - (call_import $check - (i32.const 1) - ) - (br_if $block$7$break - (i32.const 0) - ) - (call_import $check - (i32.const 2) - ) - (if - (i32.const -6) - (br $block$4$break) - (br $shape$1$continue) + (block $block$4$break + (loop $shape$1$continue + (call_import $check + (i32.const 1) + ) + (br_if $block$7$break + (i32.const 0) + ) + (call_import $check + (i32.const 2) + ) + (if + (i32.const -6) + (br $block$4$break) + (br $shape$1$continue) + ) ) ) (call_import $check @@ -1484,86 +1483,84 @@ int main() { expressions[198] = BinaryenIf(the_module, expressions[13], expressions[14], expressions[15]); expressions[199] = BinaryenIf(the_module, expressions[16], expressions[17], expressions[0]); expressions[200] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[201] = BinaryenLoop(the_module, "out", "in", expressions[200]); + expressions[201] = BinaryenLoop(the_module, "in", expressions[200]); expressions[202] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[203] = BinaryenLoop(the_module, NULL, "in2", expressions[202]); - expressions[204] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[205] = BinaryenLoop(the_module, NULL, NULL, expressions[204]); - expressions[206] = BinaryenBreak(the_module, "the-value", expressions[18], expressions[19]); - expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[208] = BinaryenBreak(the_module, "the-nothing", expressions[207], expressions[0]); - expressions[209] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[210] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[209]); - expressions[211] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); + expressions[203] = BinaryenLoop(the_module, NULL, expressions[202]); + expressions[204] = BinaryenBreak(the_module, "the-value", expressions[18], expressions[19]); + expressions[205] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[206] = BinaryenBreak(the_module, "the-nothing", expressions[205], expressions[0]); + expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[208] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[207]); + expressions[209] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); { const char* names[] = { "the-value" }; - expressions[212] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[20], expressions[21]); + expressions[210] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[20], expressions[21]); } - expressions[213] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[211] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { const char* names[] = { "the-nothing" }; - expressions[214] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[213], expressions[0]); + expressions[212] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[211], expressions[0]); } { BinaryenExpressionRef operands[] = { expressions[9], expressions[10], expressions[11], expressions[12] }; - expressions[215] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1); + expressions[213] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1); } - expressions[216] = BinaryenUnary(the_module, 20, expressions[215]); + expressions[214] = BinaryenUnary(the_module, 20, expressions[213]); { BinaryenExpressionRef operands[] = { expressions[7], expressions[8] }; - expressions[217] = BinaryenCallImport(the_module, "an-imported", operands, 2, 3); + expressions[215] = BinaryenCallImport(the_module, "an-imported", operands, 2, 3); } - expressions[218] = BinaryenUnary(the_module, 25, expressions[217]); - expressions[219] = BinaryenUnary(the_module, 20, expressions[218]); - expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + expressions[216] = BinaryenUnary(the_module, 25, expressions[215]); + expressions[217] = BinaryenUnary(the_module, 20, expressions[216]); + expressions[218] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); { BinaryenExpressionRef operands[] = { expressions[9], expressions[10], expressions[11], expressions[12] }; - expressions[221] = BinaryenCallIndirect(the_module, expressions[220], operands, 4, "iiIfF"); - } - expressions[222] = BinaryenUnary(the_module, 20, expressions[221]); - expressions[223] = BinaryenGetLocal(the_module, 0, 1); - expressions[224] = BinaryenDrop(the_module, expressions[223]); - expressions[225] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[226] = BinaryenSetLocal(the_module, 0, expressions[225]); - expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[228] = BinaryenTeeLocal(the_module, 0, expressions[227]); - expressions[229] = BinaryenDrop(the_module, expressions[228]); - expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[231] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[230]); - expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[233] = BinaryenLoad(the_module, 1, 1, 2, 4, 2, expressions[232]); - expressions[234] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[235] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[234]); - expressions[236] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); - expressions[237] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[236]); - expressions[238] = BinaryenStore(the_module, 4, 0, 0, expressions[25], expressions[26], 1); - expressions[239] = BinaryenStore(the_module, 8, 2, 4, expressions[27], expressions[28], 2); - expressions[240] = BinaryenSelect(the_module, expressions[22], expressions[23], expressions[24]); - expressions[241] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[242] = BinaryenReturn(the_module, expressions[241]); - expressions[243] = BinaryenNop(the_module); - expressions[244] = BinaryenUnreachable(the_module); + expressions[219] = BinaryenCallIndirect(the_module, expressions[218], operands, 4, "iiIfF"); + } + expressions[220] = BinaryenUnary(the_module, 20, expressions[219]); + expressions[221] = BinaryenGetLocal(the_module, 0, 1); + expressions[222] = BinaryenDrop(the_module, expressions[221]); + expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); + expressions[224] = BinaryenSetLocal(the_module, 0, expressions[223]); + expressions[225] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); + expressions[226] = BinaryenTeeLocal(the_module, 0, expressions[225]); + expressions[227] = BinaryenDrop(the_module, expressions[226]); + expressions[228] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[229] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[228]); + expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); + expressions[231] = BinaryenLoad(the_module, 1, 1, 2, 4, 2, expressions[230]); + expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[233] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[232]); + expressions[234] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); + expressions[235] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[234]); + expressions[236] = BinaryenStore(the_module, 4, 0, 0, expressions[25], expressions[26], 1); + expressions[237] = BinaryenStore(the_module, 8, 2, 4, expressions[27], expressions[28], 2); + expressions[238] = BinaryenSelect(the_module, expressions[22], expressions[23], expressions[24]); + expressions[239] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[240] = BinaryenReturn(the_module, expressions[239]); + expressions[241] = BinaryenNop(the_module); + expressions[242] = BinaryenUnreachable(the_module); BinaryenExpressionPrint(expressions[36]); (f32.neg (f32.const -33.61199951171875) ) { - BinaryenExpressionRef children[] = { expressions[30], expressions[32], expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], expressions[94], expressions[96], expressions[98], expressions[100], expressions[103], expressions[106], expressions[109], expressions[112], expressions[115], expressions[118], expressions[121], expressions[124], expressions[127], expressions[130], expressions[133], expressions[136], expressions[139], expressions[142], expressions[145], expressions[148], expressions[151], expressions[154], expressions[157], expressions[160], expressions[163], expressions[166], expressions[169], expressions[172], expressions[175], expressions[178], expressions[181], expressions[184], expressions[187], expressions[190], expressions[193], expressions[196], expressions[197], expressions[198], expressions[199], expressions[201], expressions[203], expressions[205], expressions[206], expressions[208], expressions[210], expressions[211], expressions[212], expressions[214], expressions[216], expressions[219], expressions[222], expressions[224], expressions[226], expressions[229], expressions[231], expressions[233], expressions[235], expressions[237], expressions[238], expressions[239], expressions[240], expressions[242], expressions[243], expressions[244] }; - expressions[245] = BinaryenBlock(the_module, "the-value", children, 96); + BinaryenExpressionRef children[] = { expressions[30], expressions[32], expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], expressions[94], expressions[96], expressions[98], expressions[100], expressions[103], expressions[106], expressions[109], expressions[112], expressions[115], expressions[118], expressions[121], expressions[124], expressions[127], expressions[130], expressions[133], expressions[136], expressions[139], expressions[142], expressions[145], expressions[148], expressions[151], expressions[154], expressions[157], expressions[160], expressions[163], expressions[166], expressions[169], expressions[172], expressions[175], expressions[178], expressions[181], expressions[184], expressions[187], expressions[190], expressions[193], expressions[196], expressions[197], expressions[198], expressions[199], expressions[201], expressions[203], expressions[204], expressions[206], expressions[208], expressions[209], expressions[210], expressions[212], expressions[214], expressions[217], expressions[220], expressions[222], expressions[224], expressions[227], expressions[229], expressions[231], expressions[233], expressions[235], expressions[236], expressions[237], expressions[238], expressions[240], expressions[241], expressions[242] }; + expressions[243] = BinaryenBlock(the_module, "the-value", children, 95); } - expressions[246] = BinaryenDrop(the_module, expressions[245]); + expressions[244] = BinaryenDrop(the_module, expressions[243]); { - BinaryenExpressionRef children[] = { expressions[246] }; - expressions[247] = BinaryenBlock(the_module, "the-nothing", children, 1); + BinaryenExpressionRef children[] = { expressions[244] }; + expressions[245] = BinaryenBlock(the_module, "the-nothing", children, 1); } - expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[246] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { - BinaryenExpressionRef children[] = { expressions[247], expressions[248] }; - expressions[249] = BinaryenBlock(the_module, "the-body", children, 2); + BinaryenExpressionRef children[] = { expressions[245], expressions[246] }; + expressions[247] = BinaryenBlock(the_module, "the-body", children, 2); } { BinaryenType varTypes[] = { 1 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[249]); + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[247]); } { BinaryenIndex paramTypes[] = { 1, 4 }; @@ -2005,12 +2002,7 @@ int main() { (i32.const 5) ) (drop - (loop $out $in - (i32.const 0) - ) - ) - (drop - (loop $in2 + (loop $in (i32.const 0) ) ) @@ -3157,17 +3149,19 @@ optimized: ) ) (func $loop-tail (type $v) - (loop $block$3$break $shape$0$continue - (call_import $check - (i32.const 0) - ) - (call_import $check - (i32.const 1) - ) - (if - (i32.const 10) - (br $shape$0$continue) - (br $block$3$break) + (block $block$3$break + (loop $shape$0$continue + (call_import $check + (i32.const 0) + ) + (call_import $check + (i32.const 1) + ) + (if + (i32.const 10) + (br $shape$0$continue) + (br $block$3$break) + ) ) ) (call_import $check @@ -3179,20 +3173,22 @@ optimized: (i32.const 0) ) (block $block$7$break - (loop $block$4$break $shape$1$continue - (call_import $check - (i32.const 1) - ) - (br_if $block$7$break - (i32.const 0) - ) - (call_import $check - (i32.const 2) - ) - (if - (i32.const -6) - (br $block$4$break) - (br $shape$1$continue) + (block $block$4$break + (loop $shape$1$continue + (call_import $check + (i32.const 1) + ) + (br_if $block$7$break + (i32.const 0) + ) + (call_import $check + (i32.const 2) + ) + (if + (i32.const -6) + (br $block$4$break) + (br $shape$1$continue) + ) ) ) (call_import $check diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 29b242c2f..a572b8de8 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -406,12 +406,7 @@ (i32.const 5) ) (drop - (loop $out $in - (i32.const 0) - ) - ) - (drop - (loop $in2 + (loop $in (i32.const 0) ) ) @@ -1092,17 +1087,19 @@ ) ) (func $loop-tail (type $v) - (loop $block$3$break $shape$0$continue - (call_import $check - (i32.const 0) - ) - (call_import $check - (i32.const 1) - ) - (if - (i32.const 10) - (br $shape$0$continue) - (br $block$3$break) + (block $block$3$break + (loop $shape$0$continue + (call_import $check + (i32.const 0) + ) + (call_import $check + (i32.const 1) + ) + (if + (i32.const 10) + (br $shape$0$continue) + (br $block$3$break) + ) ) ) (call_import $check @@ -1114,20 +1111,22 @@ (i32.const 0) ) (block $block$7$break - (loop $block$4$break $shape$1$continue - (call_import $check - (i32.const 1) - ) - (br_if $block$7$break - (i32.const 0) - ) - (call_import $check - (i32.const 2) - ) - (if - (i32.const -6) - (br $block$4$break) - (br $shape$1$continue) + (block $block$4$break + (loop $shape$1$continue + (call_import $check + (i32.const 1) + ) + (br_if $block$7$break + (i32.const 0) + ) + (call_import $check + (i32.const 2) + ) + (if + (i32.const -6) + (br $block$4$break) + (br $shape$1$continue) + ) ) ) (call_import $check diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 4b5409dcb..2f3294438 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -784,70 +784,72 @@ (set_local $3 (get_local $25) ) - (loop $while-out$23 $while-in$24 - (if - (tee_local $25 - (i32.load offset=16 - (get_local $12) - ) - ) - (set_local $0 - (get_local $25) - ) + (loop $while-in$24 + (block $while-out$23 (if - (tee_local $16 - (i32.load offset=20 + (tee_local $25 + (i32.load offset=16 (get_local $12) ) ) (set_local $0 - (get_local $16) + (get_local $25) ) - (block - (set_local $32 - (get_local $2) + (if + (tee_local $16 + (i32.load offset=20 + (get_local $12) + ) ) - (set_local $26 - (get_local $3) + (set_local $0 + (get_local $16) + ) + (block + (set_local $32 + (get_local $2) + ) + (set_local $26 + (get_local $3) + ) + (br $while-out$23) ) - (br $while-out$23) ) ) - ) - (set_local $16 - (i32.lt_u - (tee_local $25 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $0) + (set_local $16 + (i32.lt_u + (tee_local $25 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $0) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $14) ) - (get_local $14) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $25) - (get_local $2) - (get_local $16) + (set_local $2 + (select + (get_local $25) + (get_local $2) + (get_local $16) + ) ) - ) - (set_local $12 - (get_local $0) - ) - (set_local $3 - (select + (set_local $12 (get_local $0) - (get_local $3) - (get_local $16) ) + (set_local $3 + (select + (get_local $0) + (get_local $3) + (get_local $16) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -934,50 +936,52 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (if - (tee_local $7 - (i32.load - (tee_local $8 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (tee_local $7 + (i32.load + (tee_local $8 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $7) - ) - (set_local $0 - (get_local $8) + (block + (set_local $11 + (get_local $7) + ) + (set_local $0 + (get_local $8) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $8 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $7 + (i32.load + (tee_local $8 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $7) - ) - (set_local $0 - (get_local $8) + (block + (set_local $11 + (get_local $7) + ) + (set_local $0 + (get_local $8) + ) ) + (br $while-out$27) ) - (br $while-out$27) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1579,145 +1583,147 @@ (set_local $5 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $29 - (i32.sub - (tee_local $27 - (i32.and - (i32.load offset=4 - (get_local $19) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.lt_u + (tee_local $29 + (i32.sub + (tee_local $27 + (i32.and + (i32.load offset=4 + (get_local $19) + ) + (i32.const -8) ) - (i32.const -8) ) + (get_local $2) ) - (get_local $2) ) + (get_local $7) ) - (get_local $7) - ) - (if - (i32.eq - (get_local $27) - (get_local $2) - ) - (block - (set_local $36 - (get_local $29) - ) - (set_local $18 - (get_local $19) + (if + (i32.eq + (get_local $27) + (get_local $2) ) - (set_local $17 - (get_local $19) + (block + (set_local $36 + (get_local $29) + ) + (set_local $18 + (get_local $19) + ) + (set_local $17 + (get_local $19) + ) + (set_local $7 + (i32.const 90) + ) + (br $label$break$a) ) - (set_local $7 - (i32.const 90) + (block + (set_local $4 + (get_local $29) + ) + (set_local $0 + (get_local $19) + ) ) - (br $label$break$a) ) (block (set_local $4 - (get_local $29) + (get_local $7) ) (set_local $0 - (get_local $19) + (get_local $5) ) ) ) - (block - (set_local $4 - (get_local $7) - ) - (set_local $0 - (get_local $5) + (set_local $27 + (select + (get_local $25) + (tee_local $29 + (i32.load offset=20 + (get_local $19) + ) + ) + (i32.or + (i32.eq + (get_local $29) + (i32.const 0) + ) + (i32.eq + (get_local $29) + (tee_local $19 + (i32.load + (i32.add + (i32.add + (get_local $19) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + ) ) ) - ) - (set_local $27 - (select - (get_local $25) + (if (tee_local $29 - (i32.load offset=20 + (i32.eq (get_local $19) + (i32.const 0) ) ) - (i32.or - (i32.eq - (get_local $29) - (i32.const 0) + (block + (set_local $40 + (get_local $4) ) - (i32.eq - (get_local $29) - (tee_local $19 - (i32.load - (i32.add - (i32.add - (get_local $19) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $3) - (i32.const 31) - ) - (i32.const 2) - ) + (set_local $12 + (get_local $27) + ) + (set_local $38 + (get_local $0) + ) + (set_local $7 + (i32.const 86) + ) + (br $while-out$3) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $25 + (get_local $27) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.xor + (i32.and + (get_local $29) + (i32.const 1) ) + (i32.const 1) ) ) ) + (set_local $5 + (get_local $0) + ) ) ) + (br $while-in$4) ) - (if - (tee_local $29 - (i32.eq - (get_local $19) - (i32.const 0) - ) - ) - (block - (set_local $40 - (get_local $4) - ) - (set_local $12 - (get_local $27) - ) - (set_local $38 - (get_local $0) - ) - (set_local $7 - (i32.const 86) - ) - (br $while-out$3) - ) - (block - (set_local $7 - (get_local $4) - ) - (set_local $25 - (get_local $27) - ) - (set_local $3 - (i32.shl - (get_local $3) - (i32.xor - (i32.and - (get_local $29) - (i32.const 1) - ) - (i32.const 1) - ) - ) - ) - (set_local $5 - (get_local $0) - ) - ) - ) - (br $while-in$4) ) ) (block @@ -1914,84 +1920,86 @@ (get_local $7) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $7 - (i32.const 0) - ) - (set_local $3 - (i32.lt_u - (tee_local $5 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $18) + (loop $while-in$6 + (block $while-out$5 + (set_local $7 + (i32.const 0) + ) + (set_local $3 + (i32.lt_u + (tee_local $5 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $18) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $2) ) - (get_local $2) ) - ) - (get_local $36) - ) - ) - (set_local $12 - (select - (get_local $5) - (get_local $36) - (get_local $3) - ) - ) - (set_local $5 - (select - (get_local $18) - (get_local $17) - (get_local $3) - ) - ) - (if - (tee_local $3 - (i32.load offset=16 - (get_local $18) + (get_local $36) ) ) - (block - (set_local $36 - (get_local $12) - ) - (set_local $18 - (get_local $3) - ) - (set_local $17 + (set_local $12 + (select (get_local $5) + (get_local $36) + (get_local $3) ) - (br $while-in$6) ) - ) - (if - (tee_local $18 - (i32.load offset=20 + (set_local $5 + (select (get_local $18) + (get_local $17) + (get_local $3) ) ) - (block - (set_local $36 - (get_local $12) + (if + (tee_local $3 + (i32.load offset=16 + (get_local $18) + ) ) - (set_local $17 - (get_local $5) + (block + (set_local $36 + (get_local $12) + ) + (set_local $18 + (get_local $3) + ) + (set_local $17 + (get_local $5) + ) + (br $while-in$6) ) ) - (block - (set_local $22 - (get_local $12) + (if + (tee_local $18 + (i32.load offset=20 + (get_local $18) + ) ) - (set_local $9 - (get_local $5) + (block + (set_local $36 + (get_local $12) + ) + (set_local $17 + (get_local $5) + ) + ) + (block + (set_local $22 + (get_local $12) + ) + (set_local $9 + (get_local $5) + ) + (br $while-out$5) ) - (br $while-out$5) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2087,50 +2095,52 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (if - (tee_local $16 - (i32.load - (tee_local $14 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$10 + (block $while-out$9 + (if + (tee_local $16 + (i32.load + (tee_local $14 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $16) - ) - (set_local $0 - (get_local $14) + (block + (set_local $11 + (get_local $16) + ) + (set_local $0 + (get_local $14) + ) + (br $while-in$10) ) - (br $while-in$10) ) - ) - (if - (tee_local $16 - (i32.load - (tee_local $14 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $16 + (i32.load + (tee_local $14 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $16) - ) - (set_local $0 - (get_local $14) + (block + (set_local $11 + (get_local $16) + ) + (set_local $0 + (get_local $14) + ) ) + (br $while-out$9) ) - (br $while-out$9) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -2713,72 +2723,74 @@ (get_local $0) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $14) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $14) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $22) - ) - (block - (set_local $21 - (get_local $14) + (get_local $22) ) - (set_local $7 - (i32.const 148) + (block + (set_local $21 + (get_local $14) + ) + (set_local $7 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (if - (tee_local $3 - (i32.load - (tee_local $0 - (i32.add + (if + (tee_local $3 + (i32.load + (tee_local $0 (i32.add - (get_local $14) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $8) - (i32.const 31) + (i32.add + (get_local $14) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $8) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $8 - (i32.shl - (get_local $8) - (i32.const 1) + (block + (set_local $8 + (i32.shl + (get_local $8) + (i32.const 1) + ) + ) + (set_local $14 + (get_local $3) ) ) - (set_local $14 - (get_local $3) - ) - ) - (block - (set_local $6 - (get_local $0) - ) - (set_local $24 - (get_local $14) - ) - (set_local $7 - (i32.const 145) + (block + (set_local $6 + (get_local $0) + ) + (set_local $24 + (get_local $14) + ) + (set_local $7 + (i32.const 145) + ) + (br $while-out$17) ) - (br $while-out$17) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3219,58 +3231,60 @@ (set_local $13 (i32.const 1656) ) - (loop $while-out$35 $while-in$36 - (if - (i32.le_u - (tee_local $20 - (i32.load - (get_local $13) - ) - ) - (get_local $22) - ) + (loop $while-in$36 + (block $while-out$35 (if - (i32.gt_u - (i32.add - (get_local $20) + (i32.le_u + (tee_local $20 (i32.load - (tee_local $23 - (i32.add - (get_local $13) - (i32.const 4) - ) - ) + (get_local $13) ) ) (get_local $22) ) - (block - (set_local $0 - (get_local $13) - ) - (set_local $17 - (get_local $23) - ) - (br $while-out$35) - ) - ) - ) - (if - (i32.eqz - (tee_local $13 - (i32.load offset=8 - (get_local $13) + (if + (i32.gt_u + (i32.add + (get_local $20) + (i32.load + (tee_local $23 + (i32.add + (get_local $13) + (i32.const 4) + ) + ) + ) + ) + (get_local $22) + ) + (block + (set_local $0 + (get_local $13) + ) + (set_local $17 + (get_local $23) + ) + (br $while-out$35) ) ) ) - (block - (set_local $7 - (i32.const 171) + (if + (i32.eqz + (tee_local $13 + (i32.load offset=8 + (get_local $13) + ) + ) + ) + (block + (set_local $7 + (i32.const 171) + ) + (br $label$break$c) ) - (br $label$break$c) ) + (br $while-in$36) ) - (br $while-in$36) ) (if (i32.lt_u @@ -3687,55 +3701,57 @@ (set_local $1 (i32.const 1656) ) - (loop $do-out$44 $do-in$45 - (if - (i32.eq - (get_local $28) - (i32.add - (tee_local $4 - (i32.load - (get_local $1) + (loop $do-in$45 + (block $do-out$44 + (if + (i32.eq + (get_local $28) + (i32.add + (tee_local $4 + (i32.load + (get_local $1) + ) ) - ) - (tee_local $21 - (i32.load - (tee_local $15 - (i32.add - (get_local $1) - (i32.const 4) + (tee_local $21 + (i32.load + (tee_local $15 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) ) ) ) - ) - (block - (set_local $50 - (get_local $4) - ) - (set_local $51 - (get_local $15) - ) - (set_local $52 - (get_local $21) - ) - (set_local $35 - (get_local $1) - ) - (set_local $7 - (i32.const 201) + (block + (set_local $50 + (get_local $4) + ) + (set_local $51 + (get_local $15) + ) + (set_local $52 + (get_local $21) + ) + (set_local $35 + (get_local $1) + ) + (set_local $7 + (i32.const 201) + ) + (br $do-out$44) ) - (br $do-out$44) ) - ) - (br_if $do-in$45 - (i32.ne - (tee_local $1 - (i32.load offset=8 - (get_local $1) + (br_if $do-in$45 + (i32.ne + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) ) ) ) @@ -3874,43 +3890,45 @@ (set_local $1 (i32.const 1656) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (i32.load - (get_local $1) - ) - (get_local $15) - ) - (block - (set_local $53 - (get_local $1) - ) - (set_local $45 - (get_local $1) - ) - (set_local $7 - (i32.const 209) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (i32.load + (get_local $1) + ) + (get_local $15) ) - (br $while-out$46) - ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=8 + (block + (set_local $53 + (get_local $1) + ) + (set_local $45 (get_local $1) ) + (set_local $7 + (i32.const 209) + ) + (br $while-out$46) ) ) - (block - (set_local $37 - (i32.const 1656) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) + ) + ) + (block + (set_local $37 + (i32.const 1656) + ) + (br $while-out$46) ) - (br $while-out$46) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -4313,50 +4331,52 @@ ) ) ) - (loop $while-out$53 $while-in$54 - (if - (tee_local $20 - (i32.load - (tee_local $13 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$54 + (block $while-out$53 + (if + (tee_local $20 + (i32.load + (tee_local $13 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $20) - ) - (set_local $0 - (get_local $13) + (block + (set_local $11 + (get_local $20) + ) + (set_local $0 + (get_local $13) + ) + (br $while-in$54) ) - (br $while-in$54) ) - ) - (if - (tee_local $20 - (i32.load - (tee_local $13 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $20 + (i32.load + (tee_local $13 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $20) - ) - (set_local $0 - (get_local $13) + (block + (set_local $11 + (get_local $20) + ) + (set_local $0 + (get_local $13) + ) ) + (br $while-out$53) ) - (br $while-out$53) + (br $while-in$54) ) - (br $while-in$54) ) (if (i32.lt_u @@ -4937,72 +4957,74 @@ (get_local $2) ) ) - (loop $while-out$67 $while-in$68 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $6) + (loop $while-in$68 + (block $while-out$67 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $6) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $11) - ) - (block - (set_local $42 - (get_local $6) + (get_local $11) ) - (set_local $7 - (i32.const 279) + (block + (set_local $42 + (get_local $6) + ) + (set_local $7 + (i32.const 279) + ) + (br $while-out$67) ) - (br $while-out$67) ) - ) - (if - (tee_local $17 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $17 + (i32.load + (tee_local $2 (i32.add - (get_local $6) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $6) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $6 + (get_local $17) ) ) - (set_local $6 - (get_local $17) - ) - ) - (block - (set_local $48 - (get_local $2) - ) - (set_local $54 - (get_local $6) - ) - (set_local $7 - (i32.const 276) + (block + (set_local $48 + (get_local $2) + ) + (set_local $54 + (get_local $6) + ) + (set_local $7 + (i32.const 276) + ) + (br $while-out$67) ) - (br $while-out$67) ) + (br $while-in$68) ) - (br $while-in$68) ) (if (i32.eq @@ -5107,42 +5129,44 @@ ) ) ) - (loop $while-out$69 $while-in$70 - (if - (i32.le_u - (tee_local $1 - (i32.load - (get_local $37) - ) - ) - (get_local $10) - ) + (loop $while-in$70 + (block $while-out$69 (if - (i32.gt_u - (tee_local $24 - (i32.add - (get_local $1) - (i32.load offset=4 - (get_local $37) - ) + (i32.le_u + (tee_local $1 + (i32.load + (get_local $37) ) ) (get_local $10) ) - (block - (set_local $0 - (get_local $24) + (if + (i32.gt_u + (tee_local $24 + (i32.add + (get_local $1) + (i32.load offset=4 + (get_local $37) + ) + ) + ) + (get_local $10) + ) + (block + (set_local $0 + (get_local $24) + ) + (br $while-out$69) ) - (br $while-out$69) ) ) - ) - (set_local $37 - (i32.load offset=8 - (get_local $37) + (set_local $37 + (i32.load offset=8 + (get_local $37) + ) ) + (br $while-in$70) ) - (br $while-in$70) ) (set_local $24 (i32.add @@ -5652,72 +5676,74 @@ (get_local $2) ) ) - (loop $while-out$73 $while-in$74 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $17) + (loop $while-in$74 + (block $while-out$73 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $17) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $1) - ) - (block - (set_local $32 - (get_local $17) + (get_local $1) ) - (set_local $7 - (i32.const 305) + (block + (set_local $32 + (get_local $17) + ) + (set_local $7 + (i32.const 305) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (if - (tee_local $6 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $6 + (i32.load + (tee_local $2 (i32.add - (get_local $17) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $4) - (i32.const 31) + (i32.add + (get_local $17) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $4) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $4 - (i32.shl - (get_local $4) - (i32.const 1) + (block + (set_local $4 + (i32.shl + (get_local $4) + (i32.const 1) + ) + ) + (set_local $17 + (get_local $6) ) ) - (set_local $17 - (get_local $6) - ) - ) - (block - (set_local $26 - (get_local $2) - ) - (set_local $11 - (get_local $17) - ) - (set_local $7 - (i32.const 302) + (block + (set_local $26 + (get_local $2) + ) + (set_local $11 + (get_local $17) + ) + (set_local $7 + (i32.const 302) + ) + (br $while-out$73) ) - (br $while-out$73) ) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.eq @@ -6403,58 +6429,60 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (if - (tee_local $11 - (i32.load - (tee_local $6 - (i32.add - (get_local $1) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (tee_local $11 + (i32.load + (tee_local $6 + (i32.add + (get_local $1) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $4 - (get_local $6) + (block + (set_local $1 + (get_local $11) + ) + (set_local $4 + (get_local $6) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $6 - (i32.add - (get_local $1) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $6 + (i32.add + (get_local $1) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $4 - (get_local $6) - ) - ) - (block - (set_local $6 - (get_local $1) + (block + (set_local $1 + (get_local $11) + ) + (set_local $4 + (get_local $6) + ) ) - (set_local $10 - (get_local $4) + (block + (set_local $6 + (get_local $1) + ) + (set_local $10 + (get_local $4) + ) + (br $while-out$4) ) - (br $while-out$4) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -7075,50 +7103,52 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $4 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $4 + (get_local $1) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $4 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $4 + (get_local $1) + ) ) + (br $while-out$12) ) - (br $while-out$12) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -7653,72 +7683,74 @@ (get_local $3) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $0) - ) - (block - (set_local $16 - (get_local $1) + (get_local $0) ) - (set_local $0 - (i32.const 130) + (block + (set_local $16 + (get_local $1) + ) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (if - (tee_local $12 - (i32.load - (tee_local $8 - (i32.add + (if + (tee_local $12 + (i32.load + (tee_local $8 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $12) ) ) - (set_local $1 - (get_local $12) - ) - ) - (block - (set_local $18 - (get_local $8) - ) - (set_local $19 - (get_local $1) - ) - (set_local $0 - (i32.const 127) + (block + (set_local $18 + (get_local $8) + ) + (set_local $19 + (get_local $1) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (br $while-out$18) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -7852,22 +7884,24 @@ (i32.const 1664) ) ) - (loop $while-out$20 $while-in$21 - (if - (tee_local $2 - (i32.load - (get_local $0) + (loop $while-in$21 + (block $while-out$20 + (if + (tee_local $2 + (i32.load + (get_local $0) + ) ) - ) - (set_local $0 - (i32.add - (get_local $2) - (i32.const 8) + (set_local $0 + (i32.add + (get_local $2) + (i32.const 8) + ) ) + (br $while-out$20) ) - (br $while-out$20) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 1240) @@ -7980,209 +8014,211 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $5) - (tee_local $6 - (if - (i32.load - (i32.const 1160) - ) - (block - (call_import $ra - (i32.const 1) - (get_local $0) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $5) + (tee_local $6 + (if + (i32.load + (i32.const 1160) ) - (i32.store - (get_local $13) - (i32.load - (get_local $1) + (block + (call_import $ra + (i32.const 1) + (get_local $0) ) - ) - (i32.store offset=4 - (get_local $13) - (get_local $4) - ) - (i32.store offset=8 - (get_local $13) - (get_local $3) - ) - (set_local $10 - (call $Pa - (call_import $ya - (i32.const 146) - (get_local $13) + (i32.store + (get_local $13) + (i32.load + (get_local $1) ) ) - ) - (call_import $oa - (i32.const 0) - ) - (get_local $10) - ) - (block - (i32.store - (get_local $12) - (i32.load - (get_local $1) + (i32.store offset=4 + (get_local $13) + (get_local $4) ) + (i32.store offset=8 + (get_local $13) + (get_local $3) + ) + (set_local $10 + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $13) + ) + ) + ) + (call_import $oa + (i32.const 0) + ) + (get_local $10) ) - (i32.store offset=4 - (get_local $12) - (get_local $4) - ) - (i32.store offset=8 - (get_local $12) - (get_local $3) - ) - (call $Pa - (call_import $ya - (i32.const 146) + (block + (i32.store (get_local $12) + (i32.load + (get_local $1) + ) + ) + (i32.store offset=4 + (get_local $12) + (get_local $4) + ) + (i32.store offset=8 + (get_local $12) + (get_local $3) + ) + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $12) + ) ) ) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $6) - (i32.const 0) - ) - (block - (set_local $17 - (get_local $4) - ) - (set_local $18 - (get_local $3) - ) - (set_local $1 - (i32.const 8) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) ) - ) - (set_local $10 - (i32.sub - (get_local $5) - (get_local $6) - ) - ) - (set_local $3 (if - (i32.gt_u + (i32.lt_s (get_local $6) - (tee_local $5 - (i32.load offset=4 - (get_local $4) - ) - ) + (i32.const 0) ) (block - (i32.store - (get_local $9) - (tee_local $7 - (i32.load - (get_local $8) - ) - ) - ) - (i32.store - (get_local $14) - (get_local $7) - ) - (set_local $6 - (i32.sub - (get_local $6) - (get_local $5) - ) - ) - (set_local $7 - (i32.add - (get_local $4) - (i32.const 8) - ) + (set_local $17 + (get_local $4) ) - (set_local $15 - (i32.add - (get_local $3) - (i32.const -1) - ) + (set_local $18 + (get_local $3) ) - (i32.load offset=12 - (get_local $4) + (set_local $1 + (i32.const 8) ) + (br $while-out$0) + ) + ) + (set_local $10 + (i32.sub + (get_local $5) + (get_local $6) ) + ) + (set_local $3 (if - (i32.eq - (get_local $3) - (i32.const 2) + (i32.gt_u + (get_local $6) + (tee_local $5 + (i32.load offset=4 + (get_local $4) + ) + ) ) (block (i32.store (get_local $9) - (i32.add + (tee_local $7 (i32.load - (get_local $9) + (get_local $8) ) + ) + ) + (i32.store + (get_local $14) + (get_local $7) + ) + (set_local $6 + (i32.sub (get_local $6) + (get_local $5) ) ) (set_local $7 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $15 - (i32.const 2) + (i32.add + (get_local $3) + (i32.const -1) + ) ) - (get_local $5) - ) - (block - (set_local $7 + (i32.load offset=12 (get_local $4) ) - (set_local $15 + ) + (if + (i32.eq (get_local $3) + (i32.const 2) + ) + (block + (i32.store + (get_local $9) + (i32.add + (i32.load + (get_local $9) + ) + (get_local $6) + ) + ) + (set_local $7 + (get_local $4) + ) + (set_local $15 + (i32.const 2) + ) + (get_local $5) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $15 + (get_local $3) + ) + (get_local $5) ) - (get_local $5) ) ) ) - ) - (i32.store - (get_local $7) - (i32.add - (i32.load - (get_local $7) + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) + ) + (get_local $6) ) - (get_local $6) ) - ) - (i32.store offset=4 - (get_local $7) - (i32.sub - (get_local $3) - (get_local $6) + (i32.store offset=4 + (get_local $7) + (i32.sub + (get_local $3) + (get_local $6) + ) ) + (set_local $4 + (get_local $7) + ) + (set_local $3 + (get_local $15) + ) + (set_local $5 + (get_local $10) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $7) - ) - (set_local $3 - (get_local $15) - ) - (set_local $5 - (get_local $10) - ) - (br $while-in$1) ) (if (i32.eq @@ -8372,49 +8408,51 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $3) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $3 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $3) ) - (br $label$break$b - (get_local $1) + (block + (set_local $2 + (get_local $0) + ) + (set_local $3 + (i32.const 0) + ) + (br $label$break$b + (get_local $1) + ) ) ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $7 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $7 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 10) ) - (i32.const 10) - ) - (block - (set_local $4 - (get_local $3) + (block + (set_local $4 + (get_local $3) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $7) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $7) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -8512,45 +8550,47 @@ (set_local $4 (get_local $3) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $0) + (loop $while-in$2 + (block $while-out$1 + (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) ) - ) - (if - (i32.eqz - (i32.and - (tee_local $4 - (tee_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (if + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) - ) - ) - (block - (set_local $2 - (get_local $0) ) - (set_local $1 - (i32.const 4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $1 + (i32.const 4) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -8572,34 +8612,36 @@ (set_local $1 (get_local $2) ) - (loop $while-out$3 $while-in$4 - (if - (i32.and - (i32.xor - (i32.and - (tee_local $2 - (i32.load - (get_local $1) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.and + (i32.xor + (i32.and + (tee_local $2 + (i32.load + (get_local $1) + ) ) + (i32.const -2139062144) ) (i32.const -2139062144) ) - (i32.const -2139062144) - ) - (i32.add - (get_local $2) - (i32.const -16843009) + (i32.add + (get_local $2) + (i32.const -16843009) + ) ) - ) - (br $while-out$3) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (br $while-out$3) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.shr_s @@ -8616,22 +8658,24 @@ (set_local $2 (get_local $1) ) - (loop $while-out$5 $while-in$6 - (if - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$6 + (block $while-out$5 + (if + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $2) + (i32.const 1) + ) ) ) + (set_local $2 + (get_local $1) + ) + (br $while-out$5) ) - (set_local $2 - (get_local $1) - ) - (br $while-out$5) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -8719,62 +8763,64 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $Ya (get_local $1) ) - (i32.const -1) - ) - (call $Ya - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $$a - (get_local $1) + (i32.or + (call $$a + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) ) - ) - (if - (get_local $0) - (call $Ta - (get_local $1) + (if + (get_local $0) + (call $Ta + (get_local $1) + ) ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=56 - (get_local $1) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) ) - (br $while-out$2) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -9104,116 +9150,122 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eqz - (get_local $2) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -9286,66 +9338,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 65be97cf1..2ae9ff495 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -783,70 +783,72 @@ (set_local $3 (get_local $25) ) - (loop $while-out$23 $while-in$24 - (if - (tee_local $25 - (i32.load offset=16 - (get_local $12) - ) - ) - (set_local $0 - (get_local $25) - ) + (loop $while-in$24 + (block $while-out$23 (if - (tee_local $16 - (i32.load offset=20 + (tee_local $25 + (i32.load offset=16 (get_local $12) ) ) (set_local $0 - (get_local $16) + (get_local $25) ) - (block - (set_local $32 - (get_local $2) + (if + (tee_local $16 + (i32.load offset=20 + (get_local $12) + ) ) - (set_local $26 - (get_local $3) + (set_local $0 + (get_local $16) + ) + (block + (set_local $32 + (get_local $2) + ) + (set_local $26 + (get_local $3) + ) + (br $while-out$23) ) - (br $while-out$23) ) ) - ) - (set_local $16 - (i32.lt_u - (tee_local $25 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $0) + (set_local $16 + (i32.lt_u + (tee_local $25 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $0) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $14) ) - (get_local $14) ) + (get_local $2) ) - (get_local $2) ) - ) - (set_local $2 - (select - (get_local $25) - (get_local $2) - (get_local $16) + (set_local $2 + (select + (get_local $25) + (get_local $2) + (get_local $16) + ) ) - ) - (set_local $12 - (get_local $0) - ) - (set_local $3 - (select + (set_local $12 (get_local $0) - (get_local $3) - (get_local $16) ) + (set_local $3 + (select + (get_local $0) + (get_local $3) + (get_local $16) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (if (i32.lt_u @@ -933,50 +935,52 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (if - (tee_local $7 - (i32.load - (tee_local $8 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$28 + (block $while-out$27 + (if + (tee_local $7 + (i32.load + (tee_local $8 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $7) - ) - (set_local $0 - (get_local $8) + (block + (set_local $11 + (get_local $7) + ) + (set_local $0 + (get_local $8) + ) + (br $while-in$28) ) - (br $while-in$28) ) - ) - (if - (tee_local $7 - (i32.load - (tee_local $8 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $7 + (i32.load + (tee_local $8 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $7) - ) - (set_local $0 - (get_local $8) + (block + (set_local $11 + (get_local $7) + ) + (set_local $0 + (get_local $8) + ) ) + (br $while-out$27) ) - (br $while-out$27) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1578,145 +1582,147 @@ (set_local $5 (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (if - (i32.lt_u - (tee_local $29 - (i32.sub - (tee_local $27 - (i32.and - (i32.load offset=4 - (get_local $19) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.lt_u + (tee_local $29 + (i32.sub + (tee_local $27 + (i32.and + (i32.load offset=4 + (get_local $19) + ) + (i32.const -8) ) - (i32.const -8) ) + (get_local $2) ) - (get_local $2) ) + (get_local $7) ) - (get_local $7) - ) - (if - (i32.eq - (get_local $27) - (get_local $2) - ) - (block - (set_local $36 - (get_local $29) - ) - (set_local $18 - (get_local $19) + (if + (i32.eq + (get_local $27) + (get_local $2) ) - (set_local $17 - (get_local $19) + (block + (set_local $36 + (get_local $29) + ) + (set_local $18 + (get_local $19) + ) + (set_local $17 + (get_local $19) + ) + (set_local $7 + (i32.const 90) + ) + (br $label$break$a) ) - (set_local $7 - (i32.const 90) + (block + (set_local $4 + (get_local $29) + ) + (set_local $0 + (get_local $19) + ) ) - (br $label$break$a) ) (block (set_local $4 - (get_local $29) + (get_local $7) ) (set_local $0 - (get_local $19) + (get_local $5) ) ) ) - (block - (set_local $4 - (get_local $7) - ) - (set_local $0 - (get_local $5) + (set_local $27 + (select + (get_local $25) + (tee_local $29 + (i32.load offset=20 + (get_local $19) + ) + ) + (i32.or + (i32.eq + (get_local $29) + (i32.const 0) + ) + (i32.eq + (get_local $29) + (tee_local $19 + (i32.load + (i32.add + (i32.add + (get_local $19) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + ) ) ) - ) - (set_local $27 - (select - (get_local $25) + (if (tee_local $29 - (i32.load offset=20 + (i32.eq (get_local $19) + (i32.const 0) ) ) - (i32.or - (i32.eq - (get_local $29) - (i32.const 0) + (block + (set_local $40 + (get_local $4) ) - (i32.eq - (get_local $29) - (tee_local $19 - (i32.load - (i32.add - (i32.add - (get_local $19) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $3) - (i32.const 31) - ) - (i32.const 2) - ) + (set_local $12 + (get_local $27) + ) + (set_local $38 + (get_local $0) + ) + (set_local $7 + (i32.const 86) + ) + (br $while-out$3) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $25 + (get_local $27) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.xor + (i32.and + (get_local $29) + (i32.const 1) ) + (i32.const 1) ) ) ) + (set_local $5 + (get_local $0) + ) ) ) + (br $while-in$4) ) - (if - (tee_local $29 - (i32.eq - (get_local $19) - (i32.const 0) - ) - ) - (block - (set_local $40 - (get_local $4) - ) - (set_local $12 - (get_local $27) - ) - (set_local $38 - (get_local $0) - ) - (set_local $7 - (i32.const 86) - ) - (br $while-out$3) - ) - (block - (set_local $7 - (get_local $4) - ) - (set_local $25 - (get_local $27) - ) - (set_local $3 - (i32.shl - (get_local $3) - (i32.xor - (i32.and - (get_local $29) - (i32.const 1) - ) - (i32.const 1) - ) - ) - ) - (set_local $5 - (get_local $0) - ) - ) - ) - (br $while-in$4) ) ) (block @@ -1913,84 +1919,86 @@ (get_local $7) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $7 - (i32.const 0) - ) - (set_local $3 - (i32.lt_u - (tee_local $5 - (i32.sub - (i32.and - (i32.load offset=4 - (get_local $18) + (loop $while-in$6 + (block $while-out$5 + (set_local $7 + (i32.const 0) + ) + (set_local $3 + (i32.lt_u + (tee_local $5 + (i32.sub + (i32.and + (i32.load offset=4 + (get_local $18) + ) + (i32.const -8) ) - (i32.const -8) + (get_local $2) ) - (get_local $2) ) - ) - (get_local $36) - ) - ) - (set_local $12 - (select - (get_local $5) - (get_local $36) - (get_local $3) - ) - ) - (set_local $5 - (select - (get_local $18) - (get_local $17) - (get_local $3) - ) - ) - (if - (tee_local $3 - (i32.load offset=16 - (get_local $18) + (get_local $36) ) ) - (block - (set_local $36 - (get_local $12) - ) - (set_local $18 - (get_local $3) - ) - (set_local $17 + (set_local $12 + (select (get_local $5) + (get_local $36) + (get_local $3) ) - (br $while-in$6) ) - ) - (if - (tee_local $18 - (i32.load offset=20 + (set_local $5 + (select (get_local $18) + (get_local $17) + (get_local $3) ) ) - (block - (set_local $36 - (get_local $12) + (if + (tee_local $3 + (i32.load offset=16 + (get_local $18) + ) ) - (set_local $17 - (get_local $5) + (block + (set_local $36 + (get_local $12) + ) + (set_local $18 + (get_local $3) + ) + (set_local $17 + (get_local $5) + ) + (br $while-in$6) ) ) - (block - (set_local $22 - (get_local $12) + (if + (tee_local $18 + (i32.load offset=20 + (get_local $18) + ) ) - (set_local $9 - (get_local $5) + (block + (set_local $36 + (get_local $12) + ) + (set_local $17 + (get_local $5) + ) + ) + (block + (set_local $22 + (get_local $12) + ) + (set_local $9 + (get_local $5) + ) + (br $while-out$5) ) - (br $while-out$5) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2086,50 +2094,52 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (if - (tee_local $16 - (i32.load - (tee_local $14 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$10 + (block $while-out$9 + (if + (tee_local $16 + (i32.load + (tee_local $14 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $16) - ) - (set_local $0 - (get_local $14) + (block + (set_local $11 + (get_local $16) + ) + (set_local $0 + (get_local $14) + ) + (br $while-in$10) ) - (br $while-in$10) ) - ) - (if - (tee_local $16 - (i32.load - (tee_local $14 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $16 + (i32.load + (tee_local $14 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $16) - ) - (set_local $0 - (get_local $14) + (block + (set_local $11 + (get_local $16) + ) + (set_local $0 + (get_local $14) + ) ) + (br $while-out$9) ) - (br $while-out$9) + (br $while-in$10) ) - (br $while-in$10) ) (if (i32.lt_u @@ -2712,72 +2722,74 @@ (get_local $0) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $14) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $14) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $22) - ) - (block - (set_local $21 - (get_local $14) + (get_local $22) ) - (set_local $7 - (i32.const 148) + (block + (set_local $21 + (get_local $14) + ) + (set_local $7 + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (if - (tee_local $3 - (i32.load - (tee_local $0 - (i32.add + (if + (tee_local $3 + (i32.load + (tee_local $0 (i32.add - (get_local $14) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $8) - (i32.const 31) + (i32.add + (get_local $14) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $8) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $8 - (i32.shl - (get_local $8) - (i32.const 1) + (block + (set_local $8 + (i32.shl + (get_local $8) + (i32.const 1) + ) + ) + (set_local $14 + (get_local $3) ) ) - (set_local $14 - (get_local $3) - ) - ) - (block - (set_local $6 - (get_local $0) - ) - (set_local $24 - (get_local $14) - ) - (set_local $7 - (i32.const 145) + (block + (set_local $6 + (get_local $0) + ) + (set_local $24 + (get_local $14) + ) + (set_local $7 + (i32.const 145) + ) + (br $while-out$17) ) - (br $while-out$17) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3218,58 +3230,60 @@ (set_local $13 (i32.const 1656) ) - (loop $while-out$35 $while-in$36 - (if - (i32.le_u - (tee_local $20 - (i32.load - (get_local $13) - ) - ) - (get_local $22) - ) + (loop $while-in$36 + (block $while-out$35 (if - (i32.gt_u - (i32.add - (get_local $20) + (i32.le_u + (tee_local $20 (i32.load - (tee_local $23 - (i32.add - (get_local $13) - (i32.const 4) - ) - ) + (get_local $13) ) ) (get_local $22) ) - (block - (set_local $0 - (get_local $13) - ) - (set_local $17 - (get_local $23) - ) - (br $while-out$35) - ) - ) - ) - (if - (i32.eqz - (tee_local $13 - (i32.load offset=8 - (get_local $13) + (if + (i32.gt_u + (i32.add + (get_local $20) + (i32.load + (tee_local $23 + (i32.add + (get_local $13) + (i32.const 4) + ) + ) + ) + ) + (get_local $22) + ) + (block + (set_local $0 + (get_local $13) + ) + (set_local $17 + (get_local $23) + ) + (br $while-out$35) ) ) ) - (block - (set_local $7 - (i32.const 171) + (if + (i32.eqz + (tee_local $13 + (i32.load offset=8 + (get_local $13) + ) + ) + ) + (block + (set_local $7 + (i32.const 171) + ) + (br $label$break$c) ) - (br $label$break$c) ) + (br $while-in$36) ) - (br $while-in$36) ) (if (i32.lt_u @@ -3686,55 +3700,57 @@ (set_local $1 (i32.const 1656) ) - (loop $do-out$44 $do-in$45 - (if - (i32.eq - (get_local $28) - (i32.add - (tee_local $4 - (i32.load - (get_local $1) + (loop $do-in$45 + (block $do-out$44 + (if + (i32.eq + (get_local $28) + (i32.add + (tee_local $4 + (i32.load + (get_local $1) + ) ) - ) - (tee_local $21 - (i32.load - (tee_local $15 - (i32.add - (get_local $1) - (i32.const 4) + (tee_local $21 + (i32.load + (tee_local $15 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) ) ) ) - ) - (block - (set_local $50 - (get_local $4) - ) - (set_local $51 - (get_local $15) - ) - (set_local $52 - (get_local $21) - ) - (set_local $35 - (get_local $1) - ) - (set_local $7 - (i32.const 201) + (block + (set_local $50 + (get_local $4) + ) + (set_local $51 + (get_local $15) + ) + (set_local $52 + (get_local $21) + ) + (set_local $35 + (get_local $1) + ) + (set_local $7 + (i32.const 201) + ) + (br $do-out$44) ) - (br $do-out$44) ) - ) - (br_if $do-in$45 - (i32.ne - (tee_local $1 - (i32.load offset=8 - (get_local $1) + (br_if $do-in$45 + (i32.ne + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) ) + (i32.const 0) ) - (i32.const 0) ) ) ) @@ -3873,43 +3889,45 @@ (set_local $1 (i32.const 1656) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (i32.load - (get_local $1) - ) - (get_local $15) - ) - (block - (set_local $53 - (get_local $1) - ) - (set_local $45 - (get_local $1) - ) - (set_local $7 - (i32.const 209) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (i32.load + (get_local $1) + ) + (get_local $15) ) - (br $while-out$46) - ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=8 + (block + (set_local $53 + (get_local $1) + ) + (set_local $45 (get_local $1) ) + (set_local $7 + (i32.const 209) + ) + (br $while-out$46) ) ) - (block - (set_local $37 - (i32.const 1656) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=8 + (get_local $1) + ) + ) + ) + (block + (set_local $37 + (i32.const 1656) + ) + (br $while-out$46) ) - (br $while-out$46) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -4312,50 +4330,52 @@ ) ) ) - (loop $while-out$53 $while-in$54 - (if - (tee_local $20 - (i32.load - (tee_local $13 - (i32.add - (get_local $11) - (i32.const 20) + (loop $while-in$54 + (block $while-out$53 + (if + (tee_local $20 + (i32.load + (tee_local $13 + (i32.add + (get_local $11) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $20) - ) - (set_local $0 - (get_local $13) + (block + (set_local $11 + (get_local $20) + ) + (set_local $0 + (get_local $13) + ) + (br $while-in$54) ) - (br $while-in$54) ) - ) - (if - (tee_local $20 - (i32.load - (tee_local $13 - (i32.add - (get_local $11) - (i32.const 16) + (if + (tee_local $20 + (i32.load + (tee_local $13 + (i32.add + (get_local $11) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $11 - (get_local $20) - ) - (set_local $0 - (get_local $13) + (block + (set_local $11 + (get_local $20) + ) + (set_local $0 + (get_local $13) + ) ) + (br $while-out$53) ) - (br $while-out$53) + (br $while-in$54) ) - (br $while-in$54) ) (if (i32.lt_u @@ -4936,72 +4956,74 @@ (get_local $2) ) ) - (loop $while-out$67 $while-in$68 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $6) + (loop $while-in$68 + (block $while-out$67 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $6) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $11) - ) - (block - (set_local $42 - (get_local $6) + (get_local $11) ) - (set_local $7 - (i32.const 279) + (block + (set_local $42 + (get_local $6) + ) + (set_local $7 + (i32.const 279) + ) + (br $while-out$67) ) - (br $while-out$67) ) - ) - (if - (tee_local $17 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $17 + (i32.load + (tee_local $2 (i32.add - (get_local $6) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $6) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $6 + (get_local $17) ) ) - (set_local $6 - (get_local $17) - ) - ) - (block - (set_local $48 - (get_local $2) - ) - (set_local $54 - (get_local $6) - ) - (set_local $7 - (i32.const 276) + (block + (set_local $48 + (get_local $2) + ) + (set_local $54 + (get_local $6) + ) + (set_local $7 + (i32.const 276) + ) + (br $while-out$67) ) - (br $while-out$67) ) + (br $while-in$68) ) - (br $while-in$68) ) (if (i32.eq @@ -5106,42 +5128,44 @@ ) ) ) - (loop $while-out$69 $while-in$70 - (if - (i32.le_u - (tee_local $1 - (i32.load - (get_local $37) - ) - ) - (get_local $10) - ) + (loop $while-in$70 + (block $while-out$69 (if - (i32.gt_u - (tee_local $24 - (i32.add - (get_local $1) - (i32.load offset=4 - (get_local $37) - ) + (i32.le_u + (tee_local $1 + (i32.load + (get_local $37) ) ) (get_local $10) ) - (block - (set_local $0 - (get_local $24) + (if + (i32.gt_u + (tee_local $24 + (i32.add + (get_local $1) + (i32.load offset=4 + (get_local $37) + ) + ) + ) + (get_local $10) + ) + (block + (set_local $0 + (get_local $24) + ) + (br $while-out$69) ) - (br $while-out$69) ) ) - ) - (set_local $37 - (i32.load offset=8 - (get_local $37) + (set_local $37 + (i32.load offset=8 + (get_local $37) + ) ) + (br $while-in$70) ) - (br $while-in$70) ) (set_local $24 (i32.add @@ -5651,72 +5675,74 @@ (get_local $2) ) ) - (loop $while-out$73 $while-in$74 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $17) + (loop $while-in$74 + (block $while-out$73 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $17) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $1) - ) - (block - (set_local $32 - (get_local $17) + (get_local $1) ) - (set_local $7 - (i32.const 305) + (block + (set_local $32 + (get_local $17) + ) + (set_local $7 + (i32.const 305) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (if - (tee_local $6 - (i32.load - (tee_local $2 - (i32.add + (if + (tee_local $6 + (i32.load + (tee_local $2 (i32.add - (get_local $17) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $4) - (i32.const 31) + (i32.add + (get_local $17) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $4) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $4 - (i32.shl - (get_local $4) - (i32.const 1) + (block + (set_local $4 + (i32.shl + (get_local $4) + (i32.const 1) + ) + ) + (set_local $17 + (get_local $6) ) ) - (set_local $17 - (get_local $6) - ) - ) - (block - (set_local $26 - (get_local $2) - ) - (set_local $11 - (get_local $17) - ) - (set_local $7 - (i32.const 302) + (block + (set_local $26 + (get_local $2) + ) + (set_local $11 + (get_local $17) + ) + (set_local $7 + (i32.const 302) + ) + (br $while-out$73) ) - (br $while-out$73) ) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.eq @@ -6402,58 +6428,60 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (if - (tee_local $11 - (i32.load - (tee_local $6 - (i32.add - (get_local $1) - (i32.const 20) + (loop $while-in$5 + (block $while-out$4 + (if + (tee_local $11 + (i32.load + (tee_local $6 + (i32.add + (get_local $1) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $4 - (get_local $6) + (block + (set_local $1 + (get_local $11) + ) + (set_local $4 + (get_local $6) + ) + (br $while-in$5) ) - (br $while-in$5) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $6 - (i32.add - (get_local $1) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $6 + (i32.add + (get_local $1) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $1 - (get_local $11) - ) - (set_local $4 - (get_local $6) - ) - ) - (block - (set_local $6 - (get_local $1) + (block + (set_local $1 + (get_local $11) + ) + (set_local $4 + (get_local $6) + ) ) - (set_local $10 - (get_local $4) + (block + (set_local $6 + (get_local $1) + ) + (set_local $10 + (get_local $4) + ) + (br $while-out$4) ) - (br $while-out$4) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -7074,50 +7102,52 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 20) + (loop $while-in$13 + (block $while-out$12 + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 20) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $4 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $4 + (get_local $1) + ) + (br $while-in$13) ) - (br $while-in$13) ) - ) - (if - (tee_local $11 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 16) + (if + (tee_local $11 + (i32.load + (tee_local $1 + (i32.add + (get_local $0) + (i32.const 16) + ) ) ) ) - ) - (block - (set_local $0 - (get_local $11) - ) - (set_local $4 - (get_local $1) + (block + (set_local $0 + (get_local $11) + ) + (set_local $4 + (get_local $1) + ) ) + (br $while-out$12) ) - (br $while-out$12) + (br $while-in$13) ) - (br $while-in$13) ) (if (i32.lt_u @@ -7652,72 +7682,74 @@ (get_local $3) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load offset=4 - (get_local $1) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (get_local $1) + ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $0) - ) - (block - (set_local $16 - (get_local $1) + (get_local $0) ) - (set_local $0 - (i32.const 130) + (block + (set_local $16 + (get_local $1) + ) + (set_local $0 + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (if - (tee_local $12 - (i32.load - (tee_local $8 - (i32.add + (if + (tee_local $12 + (i32.load + (tee_local $8 (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $13) - (i32.const 31) + (i32.add + (get_local $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $13) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) ) - ) - (block - (set_local $13 - (i32.shl - (get_local $13) - (i32.const 1) + (block + (set_local $13 + (i32.shl + (get_local $13) + (i32.const 1) + ) + ) + (set_local $1 + (get_local $12) ) ) - (set_local $1 - (get_local $12) - ) - ) - (block - (set_local $18 - (get_local $8) - ) - (set_local $19 - (get_local $1) - ) - (set_local $0 - (i32.const 127) + (block + (set_local $18 + (get_local $8) + ) + (set_local $19 + (get_local $1) + ) + (set_local $0 + (i32.const 127) + ) + (br $while-out$18) ) - (br $while-out$18) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -7851,22 +7883,24 @@ (i32.const 1664) ) ) - (loop $while-out$20 $while-in$21 - (if - (tee_local $2 - (i32.load - (get_local $0) + (loop $while-in$21 + (block $while-out$20 + (if + (tee_local $2 + (i32.load + (get_local $0) + ) ) - ) - (set_local $0 - (i32.add - (get_local $2) - (i32.const 8) + (set_local $0 + (i32.add + (get_local $2) + (i32.const 8) + ) ) + (br $while-out$20) ) - (br $while-out$20) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 1240) @@ -7979,209 +8013,211 @@ (get_local $2) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eq - (get_local $5) - (tee_local $6 - (if - (i32.load - (i32.const 1160) - ) - (block - (call_import $ra - (i32.const 1) - (get_local $0) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eq + (get_local $5) + (tee_local $6 + (if + (i32.load + (i32.const 1160) ) - (i32.store - (get_local $13) - (i32.load - (get_local $1) + (block + (call_import $ra + (i32.const 1) + (get_local $0) ) - ) - (i32.store offset=4 - (get_local $13) - (get_local $4) - ) - (i32.store offset=8 - (get_local $13) - (get_local $3) - ) - (set_local $10 - (call $Pa - (call_import $ya - (i32.const 146) - (get_local $13) + (i32.store + (get_local $13) + (i32.load + (get_local $1) ) ) - ) - (call_import $oa - (i32.const 0) - ) - (get_local $10) - ) - (block - (i32.store - (get_local $12) - (i32.load - (get_local $1) + (i32.store offset=4 + (get_local $13) + (get_local $4) ) + (i32.store offset=8 + (get_local $13) + (get_local $3) + ) + (set_local $10 + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $13) + ) + ) + ) + (call_import $oa + (i32.const 0) + ) + (get_local $10) ) - (i32.store offset=4 - (get_local $12) - (get_local $4) - ) - (i32.store offset=8 - (get_local $12) - (get_local $3) - ) - (call $Pa - (call_import $ya - (i32.const 146) + (block + (i32.store (get_local $12) + (i32.load + (get_local $1) + ) + ) + (i32.store offset=4 + (get_local $12) + (get_local $4) + ) + (i32.store offset=8 + (get_local $12) + (get_local $3) + ) + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $12) + ) ) ) ) ) ) - ) - (block - (set_local $1 - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $6) - (i32.const 0) - ) - (block - (set_local $17 - (get_local $4) - ) - (set_local $18 - (get_local $3) - ) - (set_local $1 - (i32.const 8) + (block + (set_local $1 + (i32.const 6) + ) + (br $while-out$0) ) - (br $while-out$0) ) - ) - (set_local $10 - (i32.sub - (get_local $5) - (get_local $6) - ) - ) - (set_local $3 (if - (i32.gt_u + (i32.lt_s (get_local $6) - (tee_local $5 - (i32.load offset=4 - (get_local $4) - ) - ) + (i32.const 0) ) (block - (i32.store - (get_local $9) - (tee_local $7 - (i32.load - (get_local $8) - ) - ) - ) - (i32.store - (get_local $14) - (get_local $7) - ) - (set_local $6 - (i32.sub - (get_local $6) - (get_local $5) - ) - ) - (set_local $7 - (i32.add - (get_local $4) - (i32.const 8) - ) + (set_local $17 + (get_local $4) ) - (set_local $15 - (i32.add - (get_local $3) - (i32.const -1) - ) + (set_local $18 + (get_local $3) ) - (i32.load offset=12 - (get_local $4) + (set_local $1 + (i32.const 8) ) + (br $while-out$0) + ) + ) + (set_local $10 + (i32.sub + (get_local $5) + (get_local $6) ) + ) + (set_local $3 (if - (i32.eq - (get_local $3) - (i32.const 2) + (i32.gt_u + (get_local $6) + (tee_local $5 + (i32.load offset=4 + (get_local $4) + ) + ) ) (block (i32.store (get_local $9) - (i32.add + (tee_local $7 (i32.load - (get_local $9) + (get_local $8) ) + ) + ) + (i32.store + (get_local $14) + (get_local $7) + ) + (set_local $6 + (i32.sub (get_local $6) + (get_local $5) ) ) (set_local $7 - (get_local $4) + (i32.add + (get_local $4) + (i32.const 8) + ) ) (set_local $15 - (i32.const 2) + (i32.add + (get_local $3) + (i32.const -1) + ) ) - (get_local $5) - ) - (block - (set_local $7 + (i32.load offset=12 (get_local $4) ) - (set_local $15 + ) + (if + (i32.eq (get_local $3) + (i32.const 2) + ) + (block + (i32.store + (get_local $9) + (i32.add + (i32.load + (get_local $9) + ) + (get_local $6) + ) + ) + (set_local $7 + (get_local $4) + ) + (set_local $15 + (i32.const 2) + ) + (get_local $5) + ) + (block + (set_local $7 + (get_local $4) + ) + (set_local $15 + (get_local $3) + ) + (get_local $5) ) - (get_local $5) ) ) ) - ) - (i32.store - (get_local $7) - (i32.add - (i32.load - (get_local $7) + (i32.store + (get_local $7) + (i32.add + (i32.load + (get_local $7) + ) + (get_local $6) ) - (get_local $6) ) - ) - (i32.store offset=4 - (get_local $7) - (i32.sub - (get_local $3) - (get_local $6) + (i32.store offset=4 + (get_local $7) + (i32.sub + (get_local $3) + (get_local $6) + ) ) + (set_local $4 + (get_local $7) + ) + (set_local $3 + (get_local $15) + ) + (set_local $5 + (get_local $10) + ) + (br $while-in$1) ) - (set_local $4 - (get_local $7) - ) - (set_local $3 - (get_local $15) - ) - (set_local $5 - (get_local $10) - ) - (br $while-in$1) ) (if (i32.eq @@ -8371,49 +8407,51 @@ (set_local $3 (get_local $1) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $3) - ) - (block - (set_local $2 - (get_local $0) - ) - (set_local $3 - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $3) ) - (br $label$break$b - (get_local $1) + (block + (set_local $2 + (get_local $0) + ) + (set_local $3 + (i32.const 0) + ) + (br $label$break$b + (get_local $1) + ) ) ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add - (get_local $0) - (tee_local $7 - (i32.add - (get_local $3) - (i32.const -1) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $7 + (i32.add + (get_local $3) + (i32.const -1) + ) ) ) ) + (i32.const 10) ) - (i32.const 10) - ) - (block - (set_local $4 - (get_local $3) + (block + (set_local $4 + (get_local $3) + ) + (br $while-out$2) + ) + (set_local $3 + (get_local $7) ) - (br $while-out$2) - ) - (set_local $3 - (get_local $7) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -8511,45 +8549,47 @@ (set_local $4 (get_local $3) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $0) + (loop $while-in$2 + (block $while-out$1 + (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) ) - ) - (if - (i32.eqz - (i32.and - (tee_local $4 - (tee_local $0 - (i32.add - (get_local $0) - (i32.const 1) + (if + (i32.eqz + (i32.and + (tee_local $4 + (tee_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) ) + (i32.const 3) ) - (i32.const 3) - ) - ) - (block - (set_local $2 - (get_local $0) ) - (set_local $1 - (i32.const 4) + (block + (set_local $2 + (get_local $0) + ) + (set_local $1 + (i32.const 4) + ) + (br $while-out$1) ) - (br $while-out$1) ) + (br $while-in$2) ) - (br $while-in$2) ) ) (block @@ -8571,34 +8611,36 @@ (set_local $1 (get_local $2) ) - (loop $while-out$3 $while-in$4 - (if - (i32.and - (i32.xor - (i32.and - (tee_local $2 - (i32.load - (get_local $1) + (loop $while-in$4 + (block $while-out$3 + (if + (i32.and + (i32.xor + (i32.and + (tee_local $2 + (i32.load + (get_local $1) + ) ) + (i32.const -2139062144) ) (i32.const -2139062144) ) - (i32.const -2139062144) - ) - (i32.add - (get_local $2) - (i32.const -16843009) + (i32.add + (get_local $2) + (i32.const -16843009) + ) ) - ) - (br $while-out$3) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (br $while-out$3) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.shr_s @@ -8615,22 +8657,24 @@ (set_local $2 (get_local $1) ) - (loop $while-out$5 $while-in$6 - (if - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $2) - (i32.const 1) + (loop $while-in$6 + (block $while-out$5 + (if + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $2) + (i32.const 1) + ) ) ) + (set_local $2 + (get_local $1) + ) + (br $while-out$5) ) - (set_local $2 - (get_local $1) - ) - (br $while-out$5) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -8718,62 +8762,64 @@ (set_local $2 (get_local $0) ) - (loop $while-out$2 $while-in$3 - (set_local $0 - (if - (i32.gt_s - (i32.load offset=76 + (loop $while-in$3 + (block $while-out$2 + (set_local $0 + (if + (i32.gt_s + (i32.load offset=76 + (get_local $1) + ) + (i32.const -1) + ) + (call $Ya (get_local $1) ) - (i32.const -1) - ) - (call $Ya - (get_local $1) + (i32.const 0) ) - (i32.const 0) ) - ) - (set_local $2 - (if - (i32.gt_u - (i32.load offset=20 - (get_local $1) - ) - (i32.load offset=28 - (get_local $1) + (set_local $2 + (if + (i32.gt_u + (i32.load offset=20 + (get_local $1) + ) + (i32.load offset=28 + (get_local $1) + ) ) - ) - (i32.or - (call $$a - (get_local $1) + (i32.or + (call $$a + (get_local $1) + ) + (get_local $2) ) (get_local $2) ) - (get_local $2) ) - ) - (if - (get_local $0) - (call $Ta - (get_local $1) + (if + (get_local $0) + (call $Ta + (get_local $1) + ) ) - ) - (if - (i32.eqz - (tee_local $1 - (i32.load offset=56 - (get_local $1) + (if + (i32.eqz + (tee_local $1 + (i32.load offset=56 + (get_local $1) + ) ) ) - ) - (block - (set_local $0 - (get_local $2) + (block + (set_local $0 + (get_local $2) + ) + (br $while-out$2) ) - (br $while-out$2) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -9103,116 +9149,122 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eqz - (get_local $2) - ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.lt_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) + (br $while-in$1) ) - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.lt_s + (get_local $2) + (i32.const 4) + ) ) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.le_s - (get_local $2) - (i32.const 0) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.le_s + (get_local $2) + (i32.const 0) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $while-in$5) ) - (br $while-in$5) ) (get_local $3) ) @@ -9285,66 +9337,72 @@ (get_local $3) ) ) - (loop $while-out$0 $while-in$1 - (br_if $while-out$0 - (i32.ge_s - (get_local $0) - (get_local $3) + (loop $while-in$1 + (block $while-out$0 + (br_if $while-out$0 + (i32.ge_s + (get_local $0) + (get_local $3) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (br_if $while-out$2 - (i32.ge_s - (get_local $0) - (get_local $6) + (loop $while-in$3 + (block $while-out$2 + (br_if $while-out$2 + (i32.ge_s + (get_local $0) + (get_local $6) + ) ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (set_local $0 - (i32.add + (i32.store (get_local $0) - (i32.const 4) + (get_local $5) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) + ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (br_if $while-out$4 - (i32.ge_s - (get_local $0) - (get_local $4) + (loop $while-in$5 + (block $while-out$4 + (br_if $while-out$4 + (i32.ge_s + (get_local $0) + (get_local $4) + ) ) - ) - (i32.store8 - (get_local $0) - (get_local $1) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (get_local $1) + ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) + (br $while-in$5) ) - (br $while-in$5) ) (i32.sub (get_local $0) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index be0a35505..ab9a5c6c0 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -912,88 +912,90 @@ (set_local $s (get_local $j) ) - (loop $while-out$23 $while-in$24 - (set_local $j - (i32.load - (i32.add - (get_local $g) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $j + (i32.load + (i32.add + (get_local $g) + (i32.const 16) + ) ) ) - ) - (if - (i32.eqz - (get_local $j) - ) - (block - (set_local $f - (i32.load - (i32.add - (get_local $g) - (i32.const 20) - ) - ) + (if + (i32.eqz + (get_local $j) ) - (if - (i32.eqz - (get_local $f) + (block + (set_local $f + (i32.load + (i32.add + (get_local $g) + (i32.const 20) + ) + ) ) - (block - (set_local $z - (get_local $e) + (if + (i32.eqz + (get_local $f) ) - (set_local $A - (get_local $s) + (block + (set_local $z + (get_local $e) + ) + (set_local $A + (get_local $s) + ) + (br $while-out$23) + ) + (set_local $B + (get_local $f) ) - (br $while-out$23) - ) - (set_local $B - (get_local $f) ) ) + (set_local $B + (get_local $j) + ) ) - (set_local $B - (get_local $j) - ) - ) - (set_local $j - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $B) - (i32.const 4) + (set_local $j + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $B) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $d) ) - (get_local $d) ) - ) - (set_local $f - (i32.lt_u - (get_local $j) - (get_local $e) + (set_local $f + (i32.lt_u + (get_local $j) + (get_local $e) + ) ) - ) - (set_local $e - (if - (get_local $f) - (get_local $j) - (get_local $e) + (set_local $e + (if + (get_local $f) + (get_local $j) + (get_local $e) + ) ) - ) - (set_local $g - (get_local $B) - ) - (set_local $s - (if - (get_local $f) + (set_local $g (get_local $B) - (get_local $s) ) + (set_local $s + (if + (get_local $f) + (get_local $B) + (get_local $s) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (set_local $s (i32.load @@ -1099,64 +1101,66 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $q - (i32.add - (get_local $D) - (i32.const 20) - ) - ) - (set_local $u - (i32.load - (get_local $q) - ) - ) - (if - (get_local $u) - (block - (set_local $D - (get_local $u) + (loop $while-in$28 + (block $while-out$27 + (set_local $q + (i32.add + (get_local $D) + (i32.const 20) ) - (set_local $E + ) + (set_local $u + (i32.load (get_local $q) ) - (br $while-in$28) - ) - ) - (set_local $q - (i32.add - (get_local $D) - (i32.const 16) ) - ) - (set_local $u - (i32.load - (get_local $q) - ) - ) - (if - (i32.eqz + (if (get_local $u) + (block + (set_local $D + (get_local $u) + ) + (set_local $E + (get_local $q) + ) + (br $while-in$28) + ) ) - (block - (set_local $F + (set_local $q + (i32.add (get_local $D) + (i32.const 16) ) - (set_local $G - (get_local $E) + ) + (set_local $u + (i32.load + (get_local $q) ) - (br $while-out$27) ) - (block - (set_local $D + (if + (i32.eqz (get_local $u) ) - (set_local $E - (get_local $q) + (block + (set_local $F + (get_local $D) + ) + (set_local $G + (get_local $E) + ) + (br $while-out$27) + ) + (block + (set_local $D + (get_local $u) + ) + (set_local $E + (get_local $q) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1874,156 +1878,158 @@ (set_local $i (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $m - (i32.and - (i32.load - (i32.add - (get_local $o) - (i32.const 4) + (loop $while-in$4 + (block $while-out$3 + (set_local $m + (i32.and + (i32.load + (i32.add + (get_local $o) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - ) - (set_local $l - (i32.sub - (get_local $m) - (get_local $e) - ) - ) - (if - (i32.lt_u - (get_local $l) - (get_local $u) ) - (if - (i32.eq + (set_local $l + (i32.sub (get_local $m) (get_local $e) ) - (block - (set_local $O - (get_local $l) - ) - (set_local $P - (get_local $o) + ) + (if + (i32.lt_u + (get_local $l) + (get_local $u) + ) + (if + (i32.eq + (get_local $m) + (get_local $e) ) - (set_local $Q - (get_local $o) + (block + (set_local $O + (get_local $l) + ) + (set_local $P + (get_local $o) + ) + (set_local $Q + (get_local $o) + ) + (set_local $N + (i32.const 90) + ) + (br $label$break$a) ) - (set_local $N - (i32.const 90) + (block + (set_local $R + (get_local $l) + ) + (set_local $S + (get_local $o) + ) ) - (br $label$break$a) ) (block (set_local $R - (get_local $l) + (get_local $u) ) (set_local $S - (get_local $o) + (get_local $i) ) ) ) - (block - (set_local $R - (get_local $u) - ) - (set_local $S - (get_local $i) - ) - ) - ) - (set_local $l - (i32.load - (i32.add - (get_local $o) - (i32.const 20) - ) - ) - ) - (set_local $o - (i32.load - (i32.add + (set_local $l + (i32.load (i32.add (get_local $o) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $s) - (i32.const 31) - ) - (i32.const 2) + (i32.const 20) ) ) ) - ) - (set_local $m - (if - (i32.or - (i32.eq - (get_local $l) - (i32.const 0) - ) - (i32.eq - (get_local $l) - (get_local $o) + (set_local $o + (i32.load + (i32.add + (i32.add + (get_local $o) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $s) + (i32.const 31) + ) + (i32.const 2) + ) ) ) - (get_local $j) - (get_local $l) - ) - ) - (set_local $l - (i32.eq - (get_local $o) - (i32.const 0) ) - ) - (if - (get_local $l) - (block - (set_local $K - (get_local $R) - ) - (set_local $L - (get_local $m) - ) - (set_local $M - (get_local $S) - ) - (set_local $N - (i32.const 86) + (set_local $m + (if + (i32.or + (i32.eq + (get_local $l) + (i32.const 0) + ) + (i32.eq + (get_local $l) + (get_local $o) + ) + ) + (get_local $j) + (get_local $l) ) - (br $while-out$3) ) - (block - (set_local $u - (get_local $R) + (set_local $l + (i32.eq + (get_local $o) + (i32.const 0) ) - (set_local $j - (get_local $m) + ) + (if + (get_local $l) + (block + (set_local $K + (get_local $R) + ) + (set_local $L + (get_local $m) + ) + (set_local $M + (get_local $S) + ) + (set_local $N + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $s - (i32.shl - (get_local $s) - (i32.xor - (i32.and - (get_local $l) + (block + (set_local $u + (get_local $R) + ) + (set_local $j + (get_local $m) + ) + (set_local $s + (i32.shl + (get_local $s) + (i32.xor + (i32.and + (get_local $l) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $i - (get_local $S) + (set_local $i + (get_local $S) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -2224,104 +2230,106 @@ (get_local $N) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $N - (i32.const 0) - ) - (set_local $i - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $P) - (i32.const 4) + (loop $while-in$6 + (block $while-out$5 + (set_local $N + (i32.const 0) + ) + (set_local $i + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $P) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $e) ) - (get_local $e) - ) - ) - (set_local $s - (i32.lt_u - (get_local $i) - (get_local $O) - ) - ) - (set_local $g - (if - (get_local $s) - (get_local $i) - (get_local $O) - ) - ) - (set_local $i - (if - (get_local $s) - (get_local $P) - (get_local $Q) ) - ) - (set_local $s - (i32.load - (i32.add - (get_local $P) - (i32.const 16) + (set_local $s + (i32.lt_u + (get_local $i) + (get_local $O) ) ) - ) - (if - (get_local $s) - (block - (set_local $O - (get_local $g) - ) - (set_local $P + (set_local $g + (if (get_local $s) - ) - (set_local $Q (get_local $i) + (get_local $O) ) - (set_local $N - (i32.const 90) - ) - (br $while-in$6) ) - ) - (set_local $P - (i32.load - (i32.add + (set_local $i + (if + (get_local $s) (get_local $P) - (i32.const 20) + (get_local $Q) ) ) - ) - (if - (i32.eqz - (get_local $P) + (set_local $s + (i32.load + (i32.add + (get_local $P) + (i32.const 16) + ) + ) ) - (block - (set_local $U - (get_local $g) + (if + (get_local $s) + (block + (set_local $O + (get_local $g) + ) + (set_local $P + (get_local $s) + ) + (set_local $Q + (get_local $i) + ) + (set_local $N + (i32.const 90) + ) + (br $while-in$6) ) - (set_local $V - (get_local $i) + ) + (set_local $P + (i32.load + (i32.add + (get_local $P) + (i32.const 20) + ) ) - (br $while-out$5) ) - (block - (set_local $O - (get_local $g) + (if + (i32.eqz + (get_local $P) ) - (set_local $Q - (get_local $i) + (block + (set_local $U + (get_local $g) + ) + (set_local $V + (get_local $i) + ) + (br $while-out$5) ) - (set_local $N - (i32.const 90) + (block + (set_local $O + (get_local $g) + ) + (set_local $Q + (get_local $i) + ) + (set_local $N + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2446,65 +2454,67 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (set_local $d - (i32.add - (get_local $X) - (i32.const 20) - ) - ) - (set_local $f - (i32.load - (get_local $d) - ) - ) - (if - (get_local $f) - (block - (set_local $X - (get_local $f) + (loop $while-in$10 + (block $while-out$9 + (set_local $d + (i32.add + (get_local $X) + (i32.const 20) ) - (set_local $Y + ) + (set_local $f + (i32.load (get_local $d) ) - (br $while-in$10) - ) - ) - (set_local $d - (i32.add - (get_local $X) - (i32.const 16) - ) - ) - (set_local $f - (i32.load - (get_local $d) ) - ) - (if - (i32.eqz + (if (get_local $f) + (block + (set_local $X + (get_local $f) + ) + (set_local $Y + (get_local $d) + ) + (br $while-in$10) + ) ) - (block - (set_local $Z + (set_local $d + (i32.add (get_local $X) + (i32.const 16) ) - (set_local $_ - (get_local $Y) + ) + (set_local $f + (i32.load + (get_local $d) ) - (br $while-out$9) ) - (block - (set_local $X + (if + (i32.eqz (get_local $f) ) - (set_local $Y - (get_local $d) + (block + (set_local $Z + (get_local $X) + ) + (set_local $_ + (get_local $Y) + ) + (br $while-out$9) ) - ) - ) - (br $while-in$10) - ) + (block + (set_local $X + (get_local $f) + ) + (set_local $Y + (get_local $d) + ) + ) + ) + (br $while-in$10) + ) + ) (if (i32.lt_u (get_local $_) @@ -3194,79 +3204,81 @@ (get_local $t) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $d) - (i32.const 4) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $d) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $U) - ) - (block - (set_local $ca - (get_local $d) + (get_local $U) ) - (set_local $N - (i32.const 148) + (block + (set_local $ca + (get_local $d) + ) + (set_local $N + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $t - (i32.add + (set_local $t (i32.add - (get_local $d) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $q) - (i32.const 31) + (i32.add + (get_local $d) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $q) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $s - (i32.load - (get_local $t) - ) - ) - (if - (i32.eqz - (get_local $s) - ) - (block - (set_local $da + (set_local $s + (i32.load (get_local $t) ) - (set_local $ea - (get_local $d) - ) - (set_local $N - (i32.const 145) - ) - (br $while-out$17) ) - (block - (set_local $q - (i32.shl - (get_local $q) - (i32.const 1) + (if + (i32.eqz + (get_local $s) + ) + (block + (set_local $da + (get_local $t) + ) + (set_local $ea + (get_local $d) + ) + (set_local $N + (i32.const 145) ) + (br $while-out$17) ) - (set_local $d - (get_local $s) + (block + (set_local $q + (i32.shl + (get_local $q) + (i32.const 1) + ) + ) + (set_local $d + (get_local $s) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3782,66 +3794,68 @@ (set_local $aa (i32.const 1656) ) - (loop $while-out$35 $while-in$36 - (set_local $ba - (i32.load - (get_local $aa) - ) - ) - (if - (i32.le_u - (get_local $ba) - (get_local $U) + (loop $while-in$36 + (block $while-out$35 + (set_local $ba + (i32.load + (get_local $aa) + ) ) - (block - (set_local $$ - (i32.add - (get_local $aa) - (i32.const 4) - ) + (if + (i32.le_u + (get_local $ba) + (get_local $U) ) - (if - (i32.gt_u + (block + (set_local $$ (i32.add - (get_local $ba) - (i32.load - (get_local $$) - ) + (get_local $aa) + (i32.const 4) ) - (get_local $U) ) - (block - (set_local $fa - (get_local $aa) + (if + (i32.gt_u + (i32.add + (get_local $ba) + (i32.load + (get_local $$) + ) + ) + (get_local $U) ) - (set_local $ga - (get_local $$) + (block + (set_local $fa + (get_local $aa) + ) + (set_local $ga + (get_local $$) + ) + (br $while-out$35) ) - (br $while-out$35) ) ) ) - ) - (set_local $aa - (i32.load - (i32.add - (get_local $aa) - (i32.const 8) + (set_local $aa + (i32.load + (i32.add + (get_local $aa) + (i32.const 8) + ) ) ) - ) - (if - (i32.eqz - (get_local $aa) - ) - (block - (set_local $N - (i32.const 171) + (if + (i32.eqz + (get_local $aa) + ) + (block + (set_local $N + (i32.const 171) + ) + (br $label$break$c) ) - (br $label$break$c) ) + (br $while-in$36) ) - (br $while-in$36) ) (set_local $aa (i32.and @@ -4346,43 +4360,45 @@ (set_local $ma (i32.const 0) ) - (loop $do-out$75 $do-in$76 - (set_local $c - (i32.add - (i32.const 1248) - (i32.shl + (loop $do-in$76 + (block $do-out$75 + (set_local $c + (i32.add + (i32.const 1248) (i32.shl - (get_local $ma) - (i32.const 1) + (i32.shl + (get_local $ma) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $c) + (i32.const 12) + ) (get_local $c) - (i32.const 12) ) - (get_local $c) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $c) + (i32.const 8) + ) (get_local $c) - (i32.const 8) ) - (get_local $c) - ) - (set_local $ma - (i32.add - (get_local $ma) - (i32.const 1) + (set_local $ma + (i32.add + (get_local $ma) + (i32.const 1) + ) ) - ) - (br_if $do-in$76 - (i32.ne - (get_local $ma) - (i32.const 32) + (br_if $do-in$76 + (i32.ne + (get_local $ma) + (i32.const 32) + ) ) ) ) @@ -4465,64 +4481,66 @@ (set_local $ka (i32.const 1656) ) - (loop $do-out$44 $do-in$45 - (set_local $ma - (i32.load - (get_local $ka) - ) - ) - (set_local $c - (i32.add - (get_local $ka) - (i32.const 4) - ) - ) - (set_local $ca - (i32.load - (get_local $c) - ) - ) - (if - (i32.eq - (get_local $ha) - (i32.add - (get_local $ma) - (get_local $ca) - ) - ) - (block - (set_local $na - (get_local $ma) - ) - (set_local $oa - (get_local $c) - ) - (set_local $pa - (get_local $ca) - ) - (set_local $ra + (loop $do-in$45 + (block $do-out$44 + (set_local $ma + (i32.load (get_local $ka) ) - (set_local $N - (i32.const 201) - ) - (br $do-out$44) ) - ) - (set_local $ka - (i32.load + (set_local $c (i32.add (get_local $ka) - (i32.const 8) + (i32.const 4) ) ) - ) - (br_if $do-in$45 - (i32.ne - (get_local $ka) - (i32.const 0) - ) - ) + (set_local $ca + (i32.load + (get_local $c) + ) + ) + (if + (i32.eq + (get_local $ha) + (i32.add + (get_local $ma) + (get_local $ca) + ) + ) + (block + (set_local $na + (get_local $ma) + ) + (set_local $oa + (get_local $c) + ) + (set_local $pa + (get_local $ca) + ) + (set_local $ra + (get_local $ka) + ) + (set_local $N + (i32.const 201) + ) + (br $do-out$44) + ) + ) + (set_local $ka + (i32.load + (i32.add + (get_local $ka) + (i32.const 8) + ) + ) + ) + (br_if $do-in$45 + (i32.ne + (get_local $ka) + (i32.const 0) + ) + ) + ) ) (if (i32.eq @@ -4673,47 +4691,49 @@ (set_local $ka (i32.const 1656) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (i32.load - (get_local $ka) - ) - (get_local $c) - ) - (block - (set_local $ua - (get_local $ka) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (i32.load + (get_local $ka) + ) + (get_local $c) ) - (set_local $va - (get_local $ka) + (block + (set_local $ua + (get_local $ka) + ) + (set_local $va + (get_local $ka) + ) + (set_local $N + (i32.const 209) + ) + (br $while-out$46) ) - (set_local $N - (i32.const 209) + ) + (set_local $ka + (i32.load + (i32.add + (get_local $ka) + (i32.const 8) + ) ) - (br $while-out$46) ) - ) - (set_local $ka - (i32.load - (i32.add + (if + (i32.eqz (get_local $ka) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $ka) - ) - (block - (set_local $wa - (i32.const 1656) + (block + (set_local $wa + (i32.const 1656) + ) + (br $while-out$46) ) - (br $while-out$46) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -5166,64 +5186,66 @@ ) ) ) - (loop $while-out$53 $while-in$54 - (set_local $aa - (i32.add - (get_local $za) - (i32.const 20) - ) - ) - (set_local $ba - (i32.load - (get_local $aa) - ) - ) - (if - (get_local $ba) - (block - (set_local $za - (get_local $ba) + (loop $while-in$54 + (block $while-out$53 + (set_local $aa + (i32.add + (get_local $za) + (i32.const 20) ) - (set_local $Aa + ) + (set_local $ba + (i32.load (get_local $aa) ) - (br $while-in$54) - ) - ) - (set_local $aa - (i32.add - (get_local $za) - (i32.const 16) - ) - ) - (set_local $ba - (i32.load - (get_local $aa) ) - ) - (if - (i32.eqz + (if (get_local $ba) + (block + (set_local $za + (get_local $ba) + ) + (set_local $Aa + (get_local $aa) + ) + (br $while-in$54) + ) ) - (block - (set_local $Ba + (set_local $aa + (i32.add (get_local $za) + (i32.const 16) ) - (set_local $Ca - (get_local $Aa) + ) + (set_local $ba + (i32.load + (get_local $aa) ) - (br $while-out$53) ) - (block - (set_local $za + (if + (i32.eqz (get_local $ba) ) - (set_local $Aa - (get_local $aa) + (block + (set_local $Ba + (get_local $za) + ) + (set_local $Ca + (get_local $Aa) + ) + (br $while-out$53) + ) + (block + (set_local $za + (get_local $ba) + ) + (set_local $Aa + (get_local $aa) + ) ) ) + (br $while-in$54) ) - (br $while-in$54) ) (if (i32.lt_u @@ -5913,79 +5935,81 @@ (get_local $e) ) ) - (loop $while-out$67 $while-in$68 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $la) - (i32.const 4) + (loop $while-in$68 + (block $while-out$67 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $la) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $Ea) - ) - (block - (set_local $Ia - (get_local $la) + (get_local $Ea) ) - (set_local $N - (i32.const 279) + (block + (set_local $Ia + (get_local $la) + ) + (set_local $N + (i32.const 279) + ) + (br $while-out$67) ) - (br $while-out$67) ) - ) - (set_local $e - (i32.add + (set_local $e (i32.add - (get_local $la) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $aa) - (i32.const 31) + (i32.add + (get_local $la) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $aa) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $ga - (i32.load - (get_local $e) - ) - ) - (if - (i32.eqz - (get_local $ga) - ) - (block - (set_local $Ja + (set_local $ga + (i32.load (get_local $e) ) - (set_local $Ka - (get_local $la) - ) - (set_local $N - (i32.const 276) - ) - (br $while-out$67) ) - (block - (set_local $aa - (i32.shl - (get_local $aa) - (i32.const 1) + (if + (i32.eqz + (get_local $ga) + ) + (block + (set_local $Ja + (get_local $e) + ) + (set_local $Ka + (get_local $la) + ) + (set_local $N + (i32.const 276) ) + (br $while-out$67) ) - (set_local $la - (get_local $ga) + (block + (set_local $aa + (i32.shl + (get_local $aa) + (i32.const 1) + ) + ) + (set_local $la + (get_local $ga) + ) ) ) + (br $while-in$68) ) - (br $while-in$68) ) (if (i32.eq @@ -6124,52 +6148,54 @@ ) ) ) - (loop $while-out$69 $while-in$70 - (set_local $ka - (i32.load - (get_local $wa) - ) - ) - (if - (i32.le_u - (get_local $ka) - (get_local $ja) + (loop $while-in$70 + (block $while-out$69 + (set_local $ka + (i32.load + (get_local $wa) + ) ) - (block - (set_local $ea - (i32.add - (get_local $ka) - (i32.load - (i32.add - (get_local $wa) - (i32.const 4) + (if + (i32.le_u + (get_local $ka) + (get_local $ja) + ) + (block + (set_local $ea + (i32.add + (get_local $ka) + (i32.load + (i32.add + (get_local $wa) + (i32.const 4) + ) ) ) ) - ) - (if - (i32.gt_u - (get_local $ea) - (get_local $ja) - ) - (block - (set_local $La + (if + (i32.gt_u (get_local $ea) + (get_local $ja) + ) + (block + (set_local $La + (get_local $ea) + ) + (br $while-out$69) ) - (br $while-out$69) ) ) ) - ) - (set_local $wa - (i32.load - (i32.add - (get_local $wa) - (i32.const 8) + (set_local $wa + (i32.load + (i32.add + (get_local $wa) + (i32.const 8) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (set_local $ca (i32.add @@ -6366,24 +6392,26 @@ (i32.const 24) ) ) - (loop $do-out$71 $do-in$72 - (set_local $ka - (i32.add - (get_local $ka) - (i32.const 4) - ) - ) - (i32.store - (get_local $ka) - (i32.const 7) - ) - (br_if $do-in$72 - (i32.lt_u + (loop $do-in$72 + (block $do-out$71 + (set_local $ka (i32.add (get_local $ka) (i32.const 4) ) - (get_local $La) + ) + (i32.store + (get_local $ka) + (i32.const 7) + ) + (br_if $do-in$72 + (i32.lt_u + (i32.add + (get_local $ka) + (i32.const 4) + ) + (get_local $La) + ) ) ) ) @@ -6758,79 +6786,81 @@ (get_local $e) ) ) - (loop $while-out$73 $while-in$74 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $ga) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $ga) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $ka) - ) - (block - (set_local $Pa - (get_local $ga) + (get_local $ka) ) - (set_local $N - (i32.const 305) + (block + (set_local $Pa + (get_local $ga) + ) + (set_local $N + (i32.const 305) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (set_local $e - (i32.add + (set_local $e (i32.add - (get_local $ga) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $ma) - (i32.const 31) + (i32.add + (get_local $ga) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $ma) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $la - (i32.load - (get_local $e) - ) - ) - (if - (i32.eqz - (get_local $la) - ) - (block - (set_local $Ra + (set_local $la + (i32.load (get_local $e) ) - (set_local $Sa - (get_local $ga) - ) - (set_local $N - (i32.const 302) - ) - (br $while-out$73) ) - (block - (set_local $ma - (i32.shl - (get_local $ma) - (i32.const 1) + (if + (i32.eqz + (get_local $la) + ) + (block + (set_local $Ra + (get_local $e) ) + (set_local $Sa + (get_local $ga) + ) + (set_local $N + (i32.const 302) + ) + (br $while-out$73) ) - (set_local $ga - (get_local $la) + (block + (set_local $ma + (i32.shl + (get_local $ma) + (i32.const 1) + ) + ) + (set_local $ga + (get_local $la) + ) ) ) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.eq @@ -7482,64 +7512,66 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $l - (i32.add - (get_local $t) - (i32.const 20) - ) - ) - (set_local $q - (i32.load - (get_local $l) - ) - ) - (if - (get_local $q) - (block - (set_local $t - (get_local $q) + (loop $while-in$5 + (block $while-out$4 + (set_local $l + (i32.add + (get_local $t) + (i32.const 20) ) - (set_local $u + ) + (set_local $q + (i32.load (get_local $l) ) - (br $while-in$5) - ) - ) - (set_local $l - (i32.add - (get_local $t) - (i32.const 16) - ) - ) - (set_local $q - (i32.load - (get_local $l) ) - ) - (if - (i32.eqz + (if (get_local $q) + (block + (set_local $t + (get_local $q) + ) + (set_local $u + (get_local $l) + ) + (br $while-in$5) + ) ) - (block - (set_local $v + (set_local $l + (i32.add (get_local $t) + (i32.const 16) ) - (set_local $w - (get_local $u) + ) + (set_local $q + (i32.load + (get_local $l) ) - (br $while-out$4) ) - (block - (set_local $t + (if + (i32.eqz (get_local $q) ) - (set_local $u - (get_local $l) + (block + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $u) + ) + (br $while-out$4) + ) + (block + (set_local $t + (get_local $q) + ) + (set_local $u + (get_local $l) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -8239,68 +8271,70 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (set_local $t - (i32.add - (get_local $z) - (i32.const 20) - ) - ) - (set_local $p - (i32.load - (get_local $t) - ) - ) - (if - (get_local $p) - (block - (set_local $z - (get_local $p) + (loop $while-in$13 + (block $while-out$12 + (set_local $t + (i32.add + (get_local $z) + (i32.const 20) ) - (set_local $A + ) + (set_local $p + (i32.load (get_local $t) ) - (br $while-in$13) - ) - ) - (set_local $t - (i32.add - (get_local $z) - (i32.const 16) - ) - ) - (set_local $p - (i32.load - (get_local $t) ) - ) - (if - (i32.eqz + (if (get_local $p) + (block + (set_local $z + (get_local $p) + ) + (set_local $A + (get_local $t) + ) + (br $while-in$13) + ) ) - (block - (set_local $B + (set_local $t + (i32.add (get_local $z) + (i32.const 16) ) - (set_local $C - (get_local $A) - ) - (br $while-out$12) ) - (block - (set_local $z - (get_local $p) - ) - (set_local $A + (set_local $p + (i32.load (get_local $t) ) ) - ) - (br $while-in$13) - ) - (if - (i32.lt_u - (get_local $C) + (if + (i32.eqz + (get_local $p) + ) + (block + (set_local $B + (get_local $z) + ) + (set_local $C + (get_local $A) + ) + (br $while-out$12) + ) + (block + (set_local $z + (get_local $p) + ) + (set_local $A + (get_local $t) + ) + ) + ) + (br $while-in$13) + ) + ) + (if + (i32.lt_u + (get_local $C) (i32.load (i32.const 1224) ) @@ -8988,79 +9022,81 @@ (get_local $s) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $b) - (i32.const 4) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $b) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $D) - ) - (block - (set_local $H - (get_local $b) + (get_local $D) ) - (set_local $I - (i32.const 130) + (block + (set_local $H + (get_local $b) + ) + (set_local $I + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $n - (i32.add + (set_local $n (i32.add - (get_local $b) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $F) - (i32.const 31) + (i32.add + (get_local $b) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $F) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $y - (i32.load - (get_local $n) - ) - ) - (if - (i32.eqz - (get_local $y) - ) - (block - (set_local $J + (set_local $y + (i32.load (get_local $n) ) - (set_local $K - (get_local $b) - ) - (set_local $I - (i32.const 127) - ) - (br $while-out$18) ) - (block - (set_local $F - (i32.shl - (get_local $F) - (i32.const 1) + (if + (i32.eqz + (get_local $y) + ) + (block + (set_local $J + (get_local $n) + ) + (set_local $K + (get_local $b) + ) + (set_local $I + (i32.const 127) ) + (br $while-out$18) ) - (set_local $b - (get_local $y) + (block + (set_local $F + (i32.shl + (get_local $F) + (i32.const 1) + ) + ) + (set_local $b + (get_local $y) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -9201,25 +9237,27 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $m - (i32.load - (get_local $L) - ) - ) - (if - (i32.eqz - (get_local $m) + (loop $while-in$21 + (block $while-out$20 + (set_local $m + (i32.load + (get_local $L) + ) ) - (br $while-out$20) - (set_local $L - (i32.add + (if + (i32.eqz (get_local $m) - (i32.const 8) + ) + (br $while-out$20) + (set_local $L + (i32.add + (get_local $m) + (i32.const 8) + ) ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 1240) @@ -9352,247 +9390,249 @@ (get_local $c) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.load - (i32.const 1160) - ) - ) - (block - (i32.store - (get_local $e) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz (i32.load - (get_local $b) + (i32.const 1160) ) ) - (i32.store - (i32.add + (block + (i32.store (get_local $e) - (i32.const 4) + (i32.load + (get_local $b) + ) ) - (get_local $m) - ) - (i32.store - (i32.add - (get_local $e) - (i32.const 8) + (i32.store + (i32.add + (get_local $e) + (i32.const 4) + ) + (get_local $m) ) - (get_local $g) - ) - (set_local $o - (call $Pa - (call_import $ya - (i32.const 146) + (i32.store + (i32.add (get_local $e) + (i32.const 8) ) + (get_local $g) ) - ) - ) - (block - (call_import $ra - (i32.const 1) - (get_local $a) - ) - (i32.store - (get_local $f) - (i32.load - (get_local $b) + (set_local $o + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $e) + ) + ) ) ) - (i32.store - (i32.add - (get_local $f) - (i32.const 4) + (block + (call_import $ra + (i32.const 1) + (get_local $a) ) - (get_local $m) - ) - (i32.store - (i32.add + (i32.store (get_local $f) - (i32.const 8) + (i32.load + (get_local $b) + ) ) - (get_local $g) - ) - (set_local $l - (call $Pa - (call_import $ya - (i32.const 146) + (i32.store + (i32.add + (get_local $f) + (i32.const 4) + ) + (get_local $m) + ) + (i32.store + (i32.add (get_local $f) + (i32.const 8) + ) + (get_local $g) + ) + (set_local $l + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $f) + ) ) ) + (call_import $oa + (i32.const 0) + ) + (set_local $o + (get_local $l) + ) + ) + ) + (if + (i32.eq + (get_local $n) + (get_local $o) + ) + (block + (set_local $p + (i32.const 6) + ) + (br $while-out$0) ) - (call_import $oa + ) + (if + (i32.lt_s + (get_local $o) (i32.const 0) ) - (set_local $o - (get_local $l) + (block + (set_local $q + (get_local $m) + ) + (set_local $s + (get_local $g) + ) + (set_local $p + (i32.const 8) + ) + (br $while-out$0) ) ) - ) - (if - (i32.eq - (get_local $n) - (get_local $o) + (set_local $l + (i32.sub + (get_local $n) + (get_local $o) + ) ) - (block - (set_local $p - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $o) - (i32.const 0) - ) - (block - (set_local $q - (get_local $m) - ) - (set_local $s - (get_local $g) - ) - (set_local $p - (i32.const 8) - ) - (br $while-out$0) - ) - ) - (set_local $l - (i32.sub - (get_local $n) - (get_local $o) - ) - ) - (set_local $t - (i32.load - (i32.add - (get_local $m) - (i32.const 4) - ) - ) - ) - (if - (i32.gt_u - (get_local $o) - (get_local $t) - ) - (block - (set_local $u - (i32.load - (get_local $i) - ) - ) - (i32.store - (get_local $h) - (get_local $u) - ) - (i32.store - (get_local $j) - (get_local $u) - ) - (set_local $v - (i32.load - (i32.add - (get_local $m) - (i32.const 12) - ) - ) - ) - (set_local $w - (i32.sub - (get_local $o) - (get_local $t) - ) - ) - (set_local $x - (i32.add - (get_local $m) - (i32.const 8) - ) - ) - (set_local $y - (i32.add - (get_local $g) - (i32.const -1) - ) + (set_local $t + (i32.load + (i32.add + (get_local $m) + (i32.const 4) + ) ) ) (if - (i32.eq - (get_local $g) - (i32.const 2) + (i32.gt_u + (get_local $o) + (get_local $t) ) (block + (set_local $u + (i32.load + (get_local $i) + ) + ) (i32.store (get_local $h) - (i32.add - (i32.load - (get_local $h) - ) - (get_local $o) - ) + (get_local $u) + ) + (i32.store + (get_local $j) + (get_local $u) ) (set_local $v - (get_local $t) + (i32.load + (i32.add + (get_local $m) + (i32.const 12) + ) + ) ) (set_local $w - (get_local $o) + (i32.sub + (get_local $o) + (get_local $t) + ) ) (set_local $x - (get_local $m) + (i32.add + (get_local $m) + (i32.const 8) + ) ) (set_local $y - (i32.const 2) + (i32.add + (get_local $g) + (i32.const -1) + ) ) ) - (block - (set_local $v - (get_local $t) + (if + (i32.eq + (get_local $g) + (i32.const 2) ) - (set_local $w - (get_local $o) + (block + (i32.store + (get_local $h) + (i32.add + (i32.load + (get_local $h) + ) + (get_local $o) + ) + ) + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $o) + ) + (set_local $x + (get_local $m) + ) + (set_local $y + (i32.const 2) + ) ) - (set_local $x - (get_local $m) + (block + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $o) + ) + (set_local $x + (get_local $m) + ) + (set_local $y + (get_local $g) + ) ) - (set_local $y - (get_local $g) + ) + ) + (i32.store + (get_local $x) + (i32.add + (i32.load + (get_local $x) ) + (get_local $w) ) ) - ) - (i32.store - (get_local $x) - (i32.add - (i32.load + (i32.store + (i32.add (get_local $x) + (i32.const 4) + ) + (i32.sub + (get_local $v) + (get_local $w) ) - (get_local $w) ) - ) - (i32.store - (i32.add + (set_local $m (get_local $x) - (i32.const 4) ) - (i32.sub - (get_local $v) - (get_local $w) + (set_local $g + (get_local $y) ) + (set_local $n + (get_local $l) + ) + (br $while-in$1) ) - (set_local $m - (get_local $x) - ) - (set_local $g - (get_local $y) - ) - (set_local $n - (get_local $l) - ) - (br $while-in$1) ) (if (i32.eq @@ -9820,54 +9860,56 @@ (set_local $d (get_local $b) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $d) - ) - (block - (set_local $l - (get_local $b) - ) - (set_local $m - (get_local $a) - ) - (set_local $n - (get_local $j) - ) - (set_local $o - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $d) ) - (br $label$break$b) - ) - ) - (set_local $p - (i32.add - (get_local $d) - (i32.const -1) - ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add + (block + (set_local $l + (get_local $b) + ) + (set_local $m (get_local $a) - (get_local $p) ) + (set_local $n + (get_local $j) + ) + (set_local $o + (i32.const 0) + ) + (br $label$break$b) ) - (i32.const 10) ) - (block - (set_local $q + (set_local $p + (i32.add (get_local $d) + (i32.const -1) ) - (br $while-out$2) ) - (set_local $d - (get_local $p) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $a) + (get_local $p) + ) + ) + (i32.const 10) + ) + (block + (set_local $q + (get_local $d) + ) + (br $while-out$2) + ) + (set_local $d + (get_local $p) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -10000,50 +10042,52 @@ (set_local $f (get_local $b) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $e) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (i32.load8_s + (get_local $e) + ) + ) + (block + (set_local $g + (get_local $f) + ) + (br $label$break$a) ) ) - (block - (set_local $g - (get_local $f) + (set_local $h + (i32.add + (get_local $e) + (i32.const 1) ) - (br $label$break$a) ) - ) - (set_local $h - (i32.add - (get_local $e) - (i32.const 1) + (set_local $f + (get_local $h) ) - ) - (set_local $f - (get_local $h) - ) - (if - (i32.eqz - (i32.and - (get_local $f) - (i32.const 3) + (if + (i32.eqz + (i32.and + (get_local $f) + (i32.const 3) + ) ) - ) - (block - (set_local $c - (get_local $h) + (block + (set_local $c + (get_local $h) + ) + (set_local $d + (i32.const 4) + ) + (br $while-out$1) ) - (set_local $d - (i32.const 4) + (set_local $e + (get_local $h) ) - (br $while-out$1) - ) - (set_local $e - (get_local $h) ) + (br $while-in$2) ) - (br $while-in$2) ) ) ) @@ -10057,45 +10101,47 @@ (set_local $d (get_local $c) ) - (loop $while-out$3 $while-in$4 - (set_local $c - (i32.load - (get_local $d) + (loop $while-in$4 + (block $while-out$3 + (set_local $c + (i32.load + (get_local $d) + ) ) - ) - (if - (i32.eqz - (i32.and - (i32.xor - (i32.and - (get_local $c) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (get_local $c) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (i32.add + (get_local $c) + (i32.const -16843009) + ) ) + ) + (set_local $d (i32.add - (get_local $c) - (i32.const -16843009) + (get_local $d) + (i32.const 4) ) ) - ) - (set_local $d - (i32.add - (get_local $d) - (i32.const 4) - ) - ) - (block - (set_local $j - (get_local $c) - ) - (set_local $l - (get_local $d) + (block + (set_local $j + (get_local $c) + ) + (set_local $l + (get_local $d) + ) + (br $while-out$3) ) - (br $while-out$3) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.eqz @@ -10117,30 +10163,32 @@ (set_local $j (get_local $l) ) - (loop $while-out$5 $while-in$6 - (set_local $l - (i32.add - (get_local $j) - (i32.const 1) - ) - ) - (if - (i32.eqz - (i32.load8_s - (get_local $l) + (loop $while-in$6 + (block $while-out$5 + (set_local $l + (i32.add + (get_local $j) + (i32.const 1) ) ) - (block - (set_local $m + (if + (i32.eqz + (i32.load8_s + (get_local $l) + ) + ) + (block + (set_local $m + (get_local $l) + ) + (br $while-out$5) + ) + (set_local $j (get_local $l) ) - (br $while-out$5) - ) - (set_local $j - (get_local $l) ) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -10209,82 +10257,84 @@ (set_local $c (get_local $b) ) - (loop $while-out$2 $while-in$3 - (if - (i32.gt_s - (i32.load - (i32.add + (loop $while-in$3 + (block $while-out$2 + (if + (i32.gt_s + (i32.load + (i32.add + (get_local $e) + (i32.const 76) + ) + ) + (i32.const -1) + ) + (set_local $f + (call $Ya (get_local $e) - (i32.const 76) ) ) - (i32.const -1) - ) - (set_local $f - (call $Ya - (get_local $e) + (set_local $f + (i32.const 0) ) ) - (set_local $f - (i32.const 0) - ) - ) - (if - (i32.gt_u - (i32.load - (i32.add - (get_local $e) - (i32.const 20) + (if + (i32.gt_u + (i32.load + (i32.add + (get_local $e) + (i32.const 20) + ) ) - ) - (i32.load - (i32.add - (get_local $e) - (i32.const 28) + (i32.load + (i32.add + (get_local $e) + (i32.const 28) + ) ) ) - ) - (set_local $g - (i32.or - (call $$a - (get_local $e) + (set_local $g + (i32.or + (call $$a + (get_local $e) + ) + (get_local $c) ) + ) + (set_local $g (get_local $c) ) - ) - (set_local $g - (get_local $c) - ) - ) - (if - (get_local $f) - (call $Ta - (get_local $e) - ) - ) - (set_local $e - (i32.load - (i32.add + ) + (if + (get_local $f) + (call $Ta (get_local $e) - (i32.const 56) ) ) - ) - (if - (i32.eqz - (get_local $e) + (set_local $e + (i32.load + (i32.add + (get_local $e) + (i32.const 56) + ) + ) ) - (block - (set_local $d + (if + (i32.eqz + (get_local $e) + ) + (block + (set_local $d + (get_local $g) + ) + (br $while-out$2) + ) + (set_local $c (get_local $g) ) - (br $while-out$2) - ) - (set_local $c - (get_local $g) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -10714,129 +10764,135 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $a) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if (i32.eqz - (get_local $c) - ) - (return - (get_local $d) + (i32.and + (get_local $a) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $a) - (i32.load8_s - (get_local $b) + (block + (if + (i32.eqz + (get_local $c) + ) + (return + (get_local $d) + ) ) - ) - (set_local $a - (i32.add + (i32.store8 (get_local $a) - (i32.const 1) + (i32.load8_s + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 1) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 1) + (set_local $b + (i32.add + (get_local $b) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $c) - (i32.const 4) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $a) - (i32.load - (get_local $b) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $c) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $a - (i32.add + (block + (i32.store (get_local $a) - (i32.const 4) + (i32.load + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 4) + (set_local $a + (i32.add + (get_local $a) + (i32.const 4) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 4) + (set_local $b + (i32.add + (get_local $b) + (i32.const 4) + ) + ) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $c) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $a) - (i32.load8_s - (get_local $b) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $c) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (i32.load8_s + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 1) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 1) + (set_local $b + (i32.add + (get_local $b) + (i32.const 1) + ) + ) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $d) @@ -10916,81 +10972,87 @@ (get_local $e) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $e) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $e) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $a) - (get_local $b) - ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (get_local $b) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $g) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $g) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $a) - (get_local $f) - ) - (set_local $a - (i32.add + (block + (i32.store (get_local $a) - (i32.const 4) + (get_local $f) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $d) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $d) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $a) - (get_local $b) - ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (get_local $b) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 166cd316c..5a993bcd0 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -913,88 +913,90 @@ (set_local $s (get_local $j) ) - (loop $while-out$23 $while-in$24 - (set_local $j - (i32.load - (i32.add - (get_local $g) - (i32.const 16) + (loop $while-in$24 + (block $while-out$23 + (set_local $j + (i32.load + (i32.add + (get_local $g) + (i32.const 16) + ) ) ) - ) - (if - (i32.eqz - (get_local $j) - ) - (block - (set_local $f - (i32.load - (i32.add - (get_local $g) - (i32.const 20) - ) - ) + (if + (i32.eqz + (get_local $j) ) - (if - (i32.eqz - (get_local $f) + (block + (set_local $f + (i32.load + (i32.add + (get_local $g) + (i32.const 20) + ) + ) ) - (block - (set_local $z - (get_local $e) + (if + (i32.eqz + (get_local $f) ) - (set_local $A - (get_local $s) + (block + (set_local $z + (get_local $e) + ) + (set_local $A + (get_local $s) + ) + (br $while-out$23) + ) + (set_local $B + (get_local $f) ) - (br $while-out$23) - ) - (set_local $B - (get_local $f) ) ) + (set_local $B + (get_local $j) + ) ) - (set_local $B - (get_local $j) - ) - ) - (set_local $j - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $B) - (i32.const 4) + (set_local $j + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $B) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $d) ) - (get_local $d) ) - ) - (set_local $f - (i32.lt_u - (get_local $j) - (get_local $e) + (set_local $f + (i32.lt_u + (get_local $j) + (get_local $e) + ) ) - ) - (set_local $e - (if - (get_local $f) - (get_local $j) - (get_local $e) + (set_local $e + (if + (get_local $f) + (get_local $j) + (get_local $e) + ) ) - ) - (set_local $g - (get_local $B) - ) - (set_local $s - (if - (get_local $f) + (set_local $g (get_local $B) - (get_local $s) ) + (set_local $s + (if + (get_local $f) + (get_local $B) + (get_local $s) + ) + ) + (br $while-in$24) ) - (br $while-in$24) ) (set_local $s (i32.load @@ -1100,64 +1102,66 @@ ) ) ) - (loop $while-out$27 $while-in$28 - (set_local $q - (i32.add - (get_local $D) - (i32.const 20) - ) - ) - (set_local $u - (i32.load - (get_local $q) - ) - ) - (if - (get_local $u) - (block - (set_local $D - (get_local $u) + (loop $while-in$28 + (block $while-out$27 + (set_local $q + (i32.add + (get_local $D) + (i32.const 20) ) - (set_local $E + ) + (set_local $u + (i32.load (get_local $q) ) - (br $while-in$28) - ) - ) - (set_local $q - (i32.add - (get_local $D) - (i32.const 16) ) - ) - (set_local $u - (i32.load - (get_local $q) - ) - ) - (if - (i32.eqz + (if (get_local $u) + (block + (set_local $D + (get_local $u) + ) + (set_local $E + (get_local $q) + ) + (br $while-in$28) + ) ) - (block - (set_local $F + (set_local $q + (i32.add (get_local $D) + (i32.const 16) ) - (set_local $G - (get_local $E) + ) + (set_local $u + (i32.load + (get_local $q) ) - (br $while-out$27) ) - (block - (set_local $D + (if + (i32.eqz (get_local $u) ) - (set_local $E - (get_local $q) + (block + (set_local $F + (get_local $D) + ) + (set_local $G + (get_local $E) + ) + (br $while-out$27) + ) + (block + (set_local $D + (get_local $u) + ) + (set_local $E + (get_local $q) + ) ) ) + (br $while-in$28) ) - (br $while-in$28) ) (if (i32.lt_u @@ -1875,156 +1879,158 @@ (set_local $i (i32.const 0) ) - (loop $while-out$3 $while-in$4 - (set_local $m - (i32.and - (i32.load - (i32.add - (get_local $o) - (i32.const 4) + (loop $while-in$4 + (block $while-out$3 + (set_local $m + (i32.and + (i32.load + (i32.add + (get_local $o) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - ) - (set_local $l - (i32.sub - (get_local $m) - (get_local $e) - ) - ) - (if - (i32.lt_u - (get_local $l) - (get_local $u) ) - (if - (i32.eq + (set_local $l + (i32.sub (get_local $m) (get_local $e) ) - (block - (set_local $O - (get_local $l) - ) - (set_local $P - (get_local $o) + ) + (if + (i32.lt_u + (get_local $l) + (get_local $u) + ) + (if + (i32.eq + (get_local $m) + (get_local $e) ) - (set_local $Q - (get_local $o) + (block + (set_local $O + (get_local $l) + ) + (set_local $P + (get_local $o) + ) + (set_local $Q + (get_local $o) + ) + (set_local $N + (i32.const 90) + ) + (br $label$break$a) ) - (set_local $N - (i32.const 90) + (block + (set_local $R + (get_local $l) + ) + (set_local $S + (get_local $o) + ) ) - (br $label$break$a) ) (block (set_local $R - (get_local $l) + (get_local $u) ) (set_local $S - (get_local $o) + (get_local $i) ) ) ) - (block - (set_local $R - (get_local $u) - ) - (set_local $S - (get_local $i) - ) - ) - ) - (set_local $l - (i32.load - (i32.add - (get_local $o) - (i32.const 20) - ) - ) - ) - (set_local $o - (i32.load - (i32.add + (set_local $l + (i32.load (i32.add (get_local $o) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $s) - (i32.const 31) - ) - (i32.const 2) + (i32.const 20) ) ) ) - ) - (set_local $m - (if - (i32.or - (i32.eq - (get_local $l) - (i32.const 0) - ) - (i32.eq - (get_local $l) - (get_local $o) + (set_local $o + (i32.load + (i32.add + (i32.add + (get_local $o) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $s) + (i32.const 31) + ) + (i32.const 2) + ) ) ) - (get_local $j) - (get_local $l) - ) - ) - (set_local $l - (i32.eq - (get_local $o) - (i32.const 0) ) - ) - (if - (get_local $l) - (block - (set_local $K - (get_local $R) - ) - (set_local $L - (get_local $m) - ) - (set_local $M - (get_local $S) - ) - (set_local $N - (i32.const 86) + (set_local $m + (if + (i32.or + (i32.eq + (get_local $l) + (i32.const 0) + ) + (i32.eq + (get_local $l) + (get_local $o) + ) + ) + (get_local $j) + (get_local $l) ) - (br $while-out$3) ) - (block - (set_local $u - (get_local $R) + (set_local $l + (i32.eq + (get_local $o) + (i32.const 0) ) - (set_local $j - (get_local $m) + ) + (if + (get_local $l) + (block + (set_local $K + (get_local $R) + ) + (set_local $L + (get_local $m) + ) + (set_local $M + (get_local $S) + ) + (set_local $N + (i32.const 86) + ) + (br $while-out$3) ) - (set_local $s - (i32.shl - (get_local $s) - (i32.xor - (i32.and - (get_local $l) + (block + (set_local $u + (get_local $R) + ) + (set_local $j + (get_local $m) + ) + (set_local $s + (i32.shl + (get_local $s) + (i32.xor + (i32.and + (get_local $l) + (i32.const 1) + ) (i32.const 1) ) - (i32.const 1) ) ) - ) - (set_local $i - (get_local $S) + (set_local $i + (get_local $S) + ) ) ) + (br $while-in$4) ) - (br $while-in$4) ) ) ) @@ -2225,104 +2231,106 @@ (get_local $N) (i32.const 90) ) - (loop $while-out$5 $while-in$6 - (set_local $N - (i32.const 0) - ) - (set_local $i - (i32.sub - (i32.and - (i32.load - (i32.add - (get_local $P) - (i32.const 4) + (loop $while-in$6 + (block $while-out$5 + (set_local $N + (i32.const 0) + ) + (set_local $i + (i32.sub + (i32.and + (i32.load + (i32.add + (get_local $P) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) + (get_local $e) ) - (get_local $e) - ) - ) - (set_local $s - (i32.lt_u - (get_local $i) - (get_local $O) - ) - ) - (set_local $g - (if - (get_local $s) - (get_local $i) - (get_local $O) - ) - ) - (set_local $i - (if - (get_local $s) - (get_local $P) - (get_local $Q) ) - ) - (set_local $s - (i32.load - (i32.add - (get_local $P) - (i32.const 16) + (set_local $s + (i32.lt_u + (get_local $i) + (get_local $O) ) ) - ) - (if - (get_local $s) - (block - (set_local $O - (get_local $g) - ) - (set_local $P + (set_local $g + (if (get_local $s) - ) - (set_local $Q (get_local $i) + (get_local $O) ) - (set_local $N - (i32.const 90) - ) - (br $while-in$6) ) - ) - (set_local $P - (i32.load - (i32.add + (set_local $i + (if + (get_local $s) (get_local $P) - (i32.const 20) + (get_local $Q) ) ) - ) - (if - (i32.eqz - (get_local $P) + (set_local $s + (i32.load + (i32.add + (get_local $P) + (i32.const 16) + ) + ) ) - (block - (set_local $U - (get_local $g) + (if + (get_local $s) + (block + (set_local $O + (get_local $g) + ) + (set_local $P + (get_local $s) + ) + (set_local $Q + (get_local $i) + ) + (set_local $N + (i32.const 90) + ) + (br $while-in$6) ) - (set_local $V - (get_local $i) + ) + (set_local $P + (i32.load + (i32.add + (get_local $P) + (i32.const 20) + ) ) - (br $while-out$5) ) - (block - (set_local $O - (get_local $g) + (if + (i32.eqz + (get_local $P) ) - (set_local $Q - (get_local $i) + (block + (set_local $U + (get_local $g) + ) + (set_local $V + (get_local $i) + ) + (br $while-out$5) ) - (set_local $N - (i32.const 90) + (block + (set_local $O + (get_local $g) + ) + (set_local $Q + (get_local $i) + ) + (set_local $N + (i32.const 90) + ) ) ) + (br $while-in$6) ) - (br $while-in$6) ) ) (if @@ -2447,65 +2455,67 @@ ) ) ) - (loop $while-out$9 $while-in$10 - (set_local $d - (i32.add - (get_local $X) - (i32.const 20) - ) - ) - (set_local $f - (i32.load - (get_local $d) - ) - ) - (if - (get_local $f) - (block - (set_local $X - (get_local $f) + (loop $while-in$10 + (block $while-out$9 + (set_local $d + (i32.add + (get_local $X) + (i32.const 20) ) - (set_local $Y + ) + (set_local $f + (i32.load (get_local $d) ) - (br $while-in$10) - ) - ) - (set_local $d - (i32.add - (get_local $X) - (i32.const 16) - ) - ) - (set_local $f - (i32.load - (get_local $d) ) - ) - (if - (i32.eqz + (if (get_local $f) + (block + (set_local $X + (get_local $f) + ) + (set_local $Y + (get_local $d) + ) + (br $while-in$10) + ) ) - (block - (set_local $Z + (set_local $d + (i32.add (get_local $X) + (i32.const 16) ) - (set_local $_ - (get_local $Y) + ) + (set_local $f + (i32.load + (get_local $d) ) - (br $while-out$9) ) - (block - (set_local $X + (if + (i32.eqz (get_local $f) ) - (set_local $Y - (get_local $d) + (block + (set_local $Z + (get_local $X) + ) + (set_local $_ + (get_local $Y) + ) + (br $while-out$9) ) - ) - ) - (br $while-in$10) - ) + (block + (set_local $X + (get_local $f) + ) + (set_local $Y + (get_local $d) + ) + ) + ) + (br $while-in$10) + ) + ) (if (i32.lt_u (get_local $_) @@ -3195,79 +3205,81 @@ (get_local $t) ) ) - (loop $while-out$17 $while-in$18 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $d) - (i32.const 4) + (loop $while-in$18 + (block $while-out$17 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $d) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $U) - ) - (block - (set_local $ca - (get_local $d) + (get_local $U) ) - (set_local $N - (i32.const 148) + (block + (set_local $ca + (get_local $d) + ) + (set_local $N + (i32.const 148) + ) + (br $while-out$17) ) - (br $while-out$17) ) - ) - (set_local $t - (i32.add + (set_local $t (i32.add - (get_local $d) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $q) - (i32.const 31) + (i32.add + (get_local $d) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $q) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $s - (i32.load - (get_local $t) - ) - ) - (if - (i32.eqz - (get_local $s) - ) - (block - (set_local $da + (set_local $s + (i32.load (get_local $t) ) - (set_local $ea - (get_local $d) - ) - (set_local $N - (i32.const 145) - ) - (br $while-out$17) ) - (block - (set_local $q - (i32.shl - (get_local $q) - (i32.const 1) + (if + (i32.eqz + (get_local $s) + ) + (block + (set_local $da + (get_local $t) + ) + (set_local $ea + (get_local $d) + ) + (set_local $N + (i32.const 145) ) + (br $while-out$17) ) - (set_local $d - (get_local $s) + (block + (set_local $q + (i32.shl + (get_local $q) + (i32.const 1) + ) + ) + (set_local $d + (get_local $s) + ) ) ) + (br $while-in$18) ) - (br $while-in$18) ) (if (i32.eq @@ -3783,66 +3795,68 @@ (set_local $aa (i32.const 1656) ) - (loop $while-out$35 $while-in$36 - (set_local $ba - (i32.load - (get_local $aa) - ) - ) - (if - (i32.le_u - (get_local $ba) - (get_local $U) + (loop $while-in$36 + (block $while-out$35 + (set_local $ba + (i32.load + (get_local $aa) + ) ) - (block - (set_local $$ - (i32.add - (get_local $aa) - (i32.const 4) - ) + (if + (i32.le_u + (get_local $ba) + (get_local $U) ) - (if - (i32.gt_u + (block + (set_local $$ (i32.add - (get_local $ba) - (i32.load - (get_local $$) - ) + (get_local $aa) + (i32.const 4) ) - (get_local $U) ) - (block - (set_local $fa - (get_local $aa) + (if + (i32.gt_u + (i32.add + (get_local $ba) + (i32.load + (get_local $$) + ) + ) + (get_local $U) ) - (set_local $ga - (get_local $$) + (block + (set_local $fa + (get_local $aa) + ) + (set_local $ga + (get_local $$) + ) + (br $while-out$35) ) - (br $while-out$35) ) ) ) - ) - (set_local $aa - (i32.load - (i32.add - (get_local $aa) - (i32.const 8) + (set_local $aa + (i32.load + (i32.add + (get_local $aa) + (i32.const 8) + ) ) ) - ) - (if - (i32.eqz - (get_local $aa) - ) - (block - (set_local $N - (i32.const 171) + (if + (i32.eqz + (get_local $aa) + ) + (block + (set_local $N + (i32.const 171) + ) + (br $label$break$c) ) - (br $label$break$c) ) + (br $while-in$36) ) - (br $while-in$36) ) (set_local $aa (i32.and @@ -4347,43 +4361,45 @@ (set_local $ma (i32.const 0) ) - (loop $do-out$75 $do-in$76 - (set_local $c - (i32.add - (i32.const 1248) - (i32.shl + (loop $do-in$76 + (block $do-out$75 + (set_local $c + (i32.add + (i32.const 1248) (i32.shl - (get_local $ma) - (i32.const 1) + (i32.shl + (get_local $ma) + (i32.const 1) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $c) + (i32.const 12) + ) (get_local $c) - (i32.const 12) ) - (get_local $c) - ) - (i32.store - (i32.add + (i32.store + (i32.add + (get_local $c) + (i32.const 8) + ) (get_local $c) - (i32.const 8) ) - (get_local $c) - ) - (set_local $ma - (i32.add - (get_local $ma) - (i32.const 1) + (set_local $ma + (i32.add + (get_local $ma) + (i32.const 1) + ) ) - ) - (br_if $do-in$76 - (i32.ne - (get_local $ma) - (i32.const 32) + (br_if $do-in$76 + (i32.ne + (get_local $ma) + (i32.const 32) + ) ) ) ) @@ -4466,64 +4482,66 @@ (set_local $ka (i32.const 1656) ) - (loop $do-out$44 $do-in$45 - (set_local $ma - (i32.load - (get_local $ka) - ) - ) - (set_local $c - (i32.add - (get_local $ka) - (i32.const 4) - ) - ) - (set_local $ca - (i32.load - (get_local $c) - ) - ) - (if - (i32.eq - (get_local $ha) - (i32.add - (get_local $ma) - (get_local $ca) - ) - ) - (block - (set_local $na - (get_local $ma) - ) - (set_local $oa - (get_local $c) - ) - (set_local $pa - (get_local $ca) - ) - (set_local $ra + (loop $do-in$45 + (block $do-out$44 + (set_local $ma + (i32.load (get_local $ka) ) - (set_local $N - (i32.const 201) - ) - (br $do-out$44) ) - ) - (set_local $ka - (i32.load + (set_local $c (i32.add (get_local $ka) - (i32.const 8) + (i32.const 4) ) ) - ) - (br_if $do-in$45 - (i32.ne - (get_local $ka) - (i32.const 0) - ) - ) + (set_local $ca + (i32.load + (get_local $c) + ) + ) + (if + (i32.eq + (get_local $ha) + (i32.add + (get_local $ma) + (get_local $ca) + ) + ) + (block + (set_local $na + (get_local $ma) + ) + (set_local $oa + (get_local $c) + ) + (set_local $pa + (get_local $ca) + ) + (set_local $ra + (get_local $ka) + ) + (set_local $N + (i32.const 201) + ) + (br $do-out$44) + ) + ) + (set_local $ka + (i32.load + (i32.add + (get_local $ka) + (i32.const 8) + ) + ) + ) + (br_if $do-in$45 + (i32.ne + (get_local $ka) + (i32.const 0) + ) + ) + ) ) (if (i32.eq @@ -4674,47 +4692,49 @@ (set_local $ka (i32.const 1656) ) - (loop $while-out$46 $while-in$47 - (if - (i32.eq - (i32.load - (get_local $ka) - ) - (get_local $c) - ) - (block - (set_local $ua - (get_local $ka) + (loop $while-in$47 + (block $while-out$46 + (if + (i32.eq + (i32.load + (get_local $ka) + ) + (get_local $c) ) - (set_local $va - (get_local $ka) + (block + (set_local $ua + (get_local $ka) + ) + (set_local $va + (get_local $ka) + ) + (set_local $N + (i32.const 209) + ) + (br $while-out$46) ) - (set_local $N - (i32.const 209) + ) + (set_local $ka + (i32.load + (i32.add + (get_local $ka) + (i32.const 8) + ) ) - (br $while-out$46) ) - ) - (set_local $ka - (i32.load - (i32.add + (if + (i32.eqz (get_local $ka) - (i32.const 8) ) - ) - ) - (if - (i32.eqz - (get_local $ka) - ) - (block - (set_local $wa - (i32.const 1656) + (block + (set_local $wa + (i32.const 1656) + ) + (br $while-out$46) ) - (br $while-out$46) ) + (br $while-in$47) ) - (br $while-in$47) ) (if (i32.eq @@ -5167,64 +5187,66 @@ ) ) ) - (loop $while-out$53 $while-in$54 - (set_local $aa - (i32.add - (get_local $za) - (i32.const 20) - ) - ) - (set_local $ba - (i32.load - (get_local $aa) - ) - ) - (if - (get_local $ba) - (block - (set_local $za - (get_local $ba) + (loop $while-in$54 + (block $while-out$53 + (set_local $aa + (i32.add + (get_local $za) + (i32.const 20) ) - (set_local $Aa + ) + (set_local $ba + (i32.load (get_local $aa) ) - (br $while-in$54) - ) - ) - (set_local $aa - (i32.add - (get_local $za) - (i32.const 16) - ) - ) - (set_local $ba - (i32.load - (get_local $aa) ) - ) - (if - (i32.eqz + (if (get_local $ba) + (block + (set_local $za + (get_local $ba) + ) + (set_local $Aa + (get_local $aa) + ) + (br $while-in$54) + ) ) - (block - (set_local $Ba + (set_local $aa + (i32.add (get_local $za) + (i32.const 16) ) - (set_local $Ca - (get_local $Aa) + ) + (set_local $ba + (i32.load + (get_local $aa) ) - (br $while-out$53) ) - (block - (set_local $za + (if + (i32.eqz (get_local $ba) ) - (set_local $Aa - (get_local $aa) + (block + (set_local $Ba + (get_local $za) + ) + (set_local $Ca + (get_local $Aa) + ) + (br $while-out$53) + ) + (block + (set_local $za + (get_local $ba) + ) + (set_local $Aa + (get_local $aa) + ) ) ) + (br $while-in$54) ) - (br $while-in$54) ) (if (i32.lt_u @@ -5914,79 +5936,81 @@ (get_local $e) ) ) - (loop $while-out$67 $while-in$68 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $la) - (i32.const 4) + (loop $while-in$68 + (block $while-out$67 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $la) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $Ea) - ) - (block - (set_local $Ia - (get_local $la) + (get_local $Ea) ) - (set_local $N - (i32.const 279) + (block + (set_local $Ia + (get_local $la) + ) + (set_local $N + (i32.const 279) + ) + (br $while-out$67) ) - (br $while-out$67) ) - ) - (set_local $e - (i32.add + (set_local $e (i32.add - (get_local $la) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $aa) - (i32.const 31) + (i32.add + (get_local $la) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $aa) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $ga - (i32.load - (get_local $e) - ) - ) - (if - (i32.eqz - (get_local $ga) - ) - (block - (set_local $Ja + (set_local $ga + (i32.load (get_local $e) ) - (set_local $Ka - (get_local $la) - ) - (set_local $N - (i32.const 276) - ) - (br $while-out$67) ) - (block - (set_local $aa - (i32.shl - (get_local $aa) - (i32.const 1) + (if + (i32.eqz + (get_local $ga) + ) + (block + (set_local $Ja + (get_local $e) + ) + (set_local $Ka + (get_local $la) + ) + (set_local $N + (i32.const 276) ) + (br $while-out$67) ) - (set_local $la - (get_local $ga) + (block + (set_local $aa + (i32.shl + (get_local $aa) + (i32.const 1) + ) + ) + (set_local $la + (get_local $ga) + ) ) ) + (br $while-in$68) ) - (br $while-in$68) ) (if (i32.eq @@ -6125,52 +6149,54 @@ ) ) ) - (loop $while-out$69 $while-in$70 - (set_local $ka - (i32.load - (get_local $wa) - ) - ) - (if - (i32.le_u - (get_local $ka) - (get_local $ja) + (loop $while-in$70 + (block $while-out$69 + (set_local $ka + (i32.load + (get_local $wa) + ) ) - (block - (set_local $ea - (i32.add - (get_local $ka) - (i32.load - (i32.add - (get_local $wa) - (i32.const 4) + (if + (i32.le_u + (get_local $ka) + (get_local $ja) + ) + (block + (set_local $ea + (i32.add + (get_local $ka) + (i32.load + (i32.add + (get_local $wa) + (i32.const 4) + ) ) ) ) - ) - (if - (i32.gt_u - (get_local $ea) - (get_local $ja) - ) - (block - (set_local $La + (if + (i32.gt_u (get_local $ea) + (get_local $ja) + ) + (block + (set_local $La + (get_local $ea) + ) + (br $while-out$69) ) - (br $while-out$69) ) ) ) - ) - (set_local $wa - (i32.load - (i32.add - (get_local $wa) - (i32.const 8) + (set_local $wa + (i32.load + (i32.add + (get_local $wa) + (i32.const 8) + ) ) ) + (br $while-in$70) ) - (br $while-in$70) ) (set_local $ca (i32.add @@ -6367,24 +6393,26 @@ (i32.const 24) ) ) - (loop $do-out$71 $do-in$72 - (set_local $ka - (i32.add - (get_local $ka) - (i32.const 4) - ) - ) - (i32.store - (get_local $ka) - (i32.const 7) - ) - (br_if $do-in$72 - (i32.lt_u + (loop $do-in$72 + (block $do-out$71 + (set_local $ka (i32.add (get_local $ka) (i32.const 4) ) - (get_local $La) + ) + (i32.store + (get_local $ka) + (i32.const 7) + ) + (br_if $do-in$72 + (i32.lt_u + (i32.add + (get_local $ka) + (i32.const 4) + ) + (get_local $La) + ) ) ) ) @@ -6759,79 +6787,81 @@ (get_local $e) ) ) - (loop $while-out$73 $while-in$74 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $ga) - (i32.const 4) + (loop $while-in$74 + (block $while-out$73 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $ga) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $ka) - ) - (block - (set_local $Pa - (get_local $ga) + (get_local $ka) ) - (set_local $N - (i32.const 305) + (block + (set_local $Pa + (get_local $ga) + ) + (set_local $N + (i32.const 305) + ) + (br $while-out$73) ) - (br $while-out$73) ) - ) - (set_local $e - (i32.add + (set_local $e (i32.add - (get_local $ga) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $ma) - (i32.const 31) + (i32.add + (get_local $ga) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $ma) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $la - (i32.load - (get_local $e) - ) - ) - (if - (i32.eqz - (get_local $la) - ) - (block - (set_local $Ra + (set_local $la + (i32.load (get_local $e) ) - (set_local $Sa - (get_local $ga) - ) - (set_local $N - (i32.const 302) - ) - (br $while-out$73) ) - (block - (set_local $ma - (i32.shl - (get_local $ma) - (i32.const 1) + (if + (i32.eqz + (get_local $la) + ) + (block + (set_local $Ra + (get_local $e) ) + (set_local $Sa + (get_local $ga) + ) + (set_local $N + (i32.const 302) + ) + (br $while-out$73) ) - (set_local $ga - (get_local $la) + (block + (set_local $ma + (i32.shl + (get_local $ma) + (i32.const 1) + ) + ) + (set_local $ga + (get_local $la) + ) ) ) + (br $while-in$74) ) - (br $while-in$74) ) (if (i32.eq @@ -7483,64 +7513,66 @@ ) ) ) - (loop $while-out$4 $while-in$5 - (set_local $l - (i32.add - (get_local $t) - (i32.const 20) - ) - ) - (set_local $q - (i32.load - (get_local $l) - ) - ) - (if - (get_local $q) - (block - (set_local $t - (get_local $q) + (loop $while-in$5 + (block $while-out$4 + (set_local $l + (i32.add + (get_local $t) + (i32.const 20) ) - (set_local $u + ) + (set_local $q + (i32.load (get_local $l) ) - (br $while-in$5) - ) - ) - (set_local $l - (i32.add - (get_local $t) - (i32.const 16) - ) - ) - (set_local $q - (i32.load - (get_local $l) ) - ) - (if - (i32.eqz + (if (get_local $q) + (block + (set_local $t + (get_local $q) + ) + (set_local $u + (get_local $l) + ) + (br $while-in$5) + ) ) - (block - (set_local $v + (set_local $l + (i32.add (get_local $t) + (i32.const 16) ) - (set_local $w - (get_local $u) + ) + (set_local $q + (i32.load + (get_local $l) ) - (br $while-out$4) ) - (block - (set_local $t + (if + (i32.eqz (get_local $q) ) - (set_local $u - (get_local $l) + (block + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $u) + ) + (br $while-out$4) + ) + (block + (set_local $t + (get_local $q) + ) + (set_local $u + (get_local $l) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (if (i32.lt_u @@ -8240,68 +8272,70 @@ ) ) ) - (loop $while-out$12 $while-in$13 - (set_local $t - (i32.add - (get_local $z) - (i32.const 20) - ) - ) - (set_local $p - (i32.load - (get_local $t) - ) - ) - (if - (get_local $p) - (block - (set_local $z - (get_local $p) + (loop $while-in$13 + (block $while-out$12 + (set_local $t + (i32.add + (get_local $z) + (i32.const 20) ) - (set_local $A + ) + (set_local $p + (i32.load (get_local $t) ) - (br $while-in$13) - ) - ) - (set_local $t - (i32.add - (get_local $z) - (i32.const 16) - ) - ) - (set_local $p - (i32.load - (get_local $t) ) - ) - (if - (i32.eqz + (if (get_local $p) + (block + (set_local $z + (get_local $p) + ) + (set_local $A + (get_local $t) + ) + (br $while-in$13) + ) ) - (block - (set_local $B + (set_local $t + (i32.add (get_local $z) + (i32.const 16) ) - (set_local $C - (get_local $A) - ) - (br $while-out$12) ) - (block - (set_local $z - (get_local $p) - ) - (set_local $A + (set_local $p + (i32.load (get_local $t) ) ) - ) - (br $while-in$13) - ) - (if - (i32.lt_u - (get_local $C) + (if + (i32.eqz + (get_local $p) + ) + (block + (set_local $B + (get_local $z) + ) + (set_local $C + (get_local $A) + ) + (br $while-out$12) + ) + (block + (set_local $z + (get_local $p) + ) + (set_local $A + (get_local $t) + ) + ) + ) + (br $while-in$13) + ) + ) + (if + (i32.lt_u + (get_local $C) (i32.load (i32.const 1224) ) @@ -8989,79 +9023,81 @@ (get_local $s) ) ) - (loop $while-out$18 $while-in$19 - (if - (i32.eq - (i32.and - (i32.load - (i32.add - (get_local $b) - (i32.const 4) + (loop $while-in$19 + (block $while-out$18 + (if + (i32.eq + (i32.and + (i32.load + (i32.add + (get_local $b) + (i32.const 4) + ) ) + (i32.const -8) ) - (i32.const -8) - ) - (get_local $D) - ) - (block - (set_local $H - (get_local $b) + (get_local $D) ) - (set_local $I - (i32.const 130) + (block + (set_local $H + (get_local $b) + ) + (set_local $I + (i32.const 130) + ) + (br $while-out$18) ) - (br $while-out$18) ) - ) - (set_local $n - (i32.add + (set_local $n (i32.add - (get_local $b) - (i32.const 16) - ) - (i32.shl - (i32.shr_u - (get_local $F) - (i32.const 31) + (i32.add + (get_local $b) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (get_local $F) + (i32.const 31) + ) + (i32.const 2) ) - (i32.const 2) ) ) - ) - (set_local $y - (i32.load - (get_local $n) - ) - ) - (if - (i32.eqz - (get_local $y) - ) - (block - (set_local $J + (set_local $y + (i32.load (get_local $n) ) - (set_local $K - (get_local $b) - ) - (set_local $I - (i32.const 127) - ) - (br $while-out$18) ) - (block - (set_local $F - (i32.shl - (get_local $F) - (i32.const 1) + (if + (i32.eqz + (get_local $y) + ) + (block + (set_local $J + (get_local $n) + ) + (set_local $K + (get_local $b) + ) + (set_local $I + (i32.const 127) ) + (br $while-out$18) ) - (set_local $b - (get_local $y) + (block + (set_local $F + (i32.shl + (get_local $F) + (i32.const 1) + ) + ) + (set_local $b + (get_local $y) + ) ) ) + (br $while-in$19) ) - (br $while-in$19) ) (if (i32.eq @@ -9202,25 +9238,27 @@ ) (return) ) - (loop $while-out$20 $while-in$21 - (set_local $m - (i32.load - (get_local $L) - ) - ) - (if - (i32.eqz - (get_local $m) + (loop $while-in$21 + (block $while-out$20 + (set_local $m + (i32.load + (get_local $L) + ) ) - (br $while-out$20) - (set_local $L - (i32.add + (if + (i32.eqz (get_local $m) - (i32.const 8) + ) + (br $while-out$20) + (set_local $L + (i32.add + (get_local $m) + (i32.const 8) + ) ) ) + (br $while-in$21) ) - (br $while-in$21) ) (i32.store (i32.const 1240) @@ -9353,247 +9391,249 @@ (get_local $c) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.load - (i32.const 1160) - ) - ) - (block - (i32.store - (get_local $e) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz (i32.load - (get_local $b) + (i32.const 1160) ) ) - (i32.store - (i32.add + (block + (i32.store (get_local $e) - (i32.const 4) + (i32.load + (get_local $b) + ) ) - (get_local $m) - ) - (i32.store - (i32.add - (get_local $e) - (i32.const 8) + (i32.store + (i32.add + (get_local $e) + (i32.const 4) + ) + (get_local $m) ) - (get_local $g) - ) - (set_local $o - (call $Pa - (call_import $ya - (i32.const 146) + (i32.store + (i32.add (get_local $e) + (i32.const 8) ) + (get_local $g) ) - ) - ) - (block - (call_import $ra - (i32.const 1) - (get_local $a) - ) - (i32.store - (get_local $f) - (i32.load - (get_local $b) + (set_local $o + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $e) + ) + ) ) ) - (i32.store - (i32.add - (get_local $f) - (i32.const 4) + (block + (call_import $ra + (i32.const 1) + (get_local $a) ) - (get_local $m) - ) - (i32.store - (i32.add + (i32.store (get_local $f) - (i32.const 8) + (i32.load + (get_local $b) + ) ) - (get_local $g) - ) - (set_local $l - (call $Pa - (call_import $ya - (i32.const 146) + (i32.store + (i32.add + (get_local $f) + (i32.const 4) + ) + (get_local $m) + ) + (i32.store + (i32.add (get_local $f) + (i32.const 8) + ) + (get_local $g) + ) + (set_local $l + (call $Pa + (call_import $ya + (i32.const 146) + (get_local $f) + ) ) ) + (call_import $oa + (i32.const 0) + ) + (set_local $o + (get_local $l) + ) + ) + ) + (if + (i32.eq + (get_local $n) + (get_local $o) + ) + (block + (set_local $p + (i32.const 6) + ) + (br $while-out$0) ) - (call_import $oa + ) + (if + (i32.lt_s + (get_local $o) (i32.const 0) ) - (set_local $o - (get_local $l) + (block + (set_local $q + (get_local $m) + ) + (set_local $s + (get_local $g) + ) + (set_local $p + (i32.const 8) + ) + (br $while-out$0) ) ) - ) - (if - (i32.eq - (get_local $n) - (get_local $o) + (set_local $l + (i32.sub + (get_local $n) + (get_local $o) + ) ) - (block - (set_local $p - (i32.const 6) - ) - (br $while-out$0) - ) - ) - (if - (i32.lt_s - (get_local $o) - (i32.const 0) - ) - (block - (set_local $q - (get_local $m) - ) - (set_local $s - (get_local $g) - ) - (set_local $p - (i32.const 8) - ) - (br $while-out$0) - ) - ) - (set_local $l - (i32.sub - (get_local $n) - (get_local $o) - ) - ) - (set_local $t - (i32.load - (i32.add - (get_local $m) - (i32.const 4) - ) - ) - ) - (if - (i32.gt_u - (get_local $o) - (get_local $t) - ) - (block - (set_local $u - (i32.load - (get_local $i) - ) - ) - (i32.store - (get_local $h) - (get_local $u) - ) - (i32.store - (get_local $j) - (get_local $u) - ) - (set_local $v - (i32.load - (i32.add - (get_local $m) - (i32.const 12) - ) - ) - ) - (set_local $w - (i32.sub - (get_local $o) - (get_local $t) - ) - ) - (set_local $x - (i32.add - (get_local $m) - (i32.const 8) - ) - ) - (set_local $y - (i32.add - (get_local $g) - (i32.const -1) - ) + (set_local $t + (i32.load + (i32.add + (get_local $m) + (i32.const 4) + ) ) ) (if - (i32.eq - (get_local $g) - (i32.const 2) + (i32.gt_u + (get_local $o) + (get_local $t) ) (block + (set_local $u + (i32.load + (get_local $i) + ) + ) (i32.store (get_local $h) - (i32.add - (i32.load - (get_local $h) - ) - (get_local $o) - ) + (get_local $u) + ) + (i32.store + (get_local $j) + (get_local $u) ) (set_local $v - (get_local $t) + (i32.load + (i32.add + (get_local $m) + (i32.const 12) + ) + ) ) (set_local $w - (get_local $o) + (i32.sub + (get_local $o) + (get_local $t) + ) ) (set_local $x - (get_local $m) + (i32.add + (get_local $m) + (i32.const 8) + ) ) (set_local $y - (i32.const 2) + (i32.add + (get_local $g) + (i32.const -1) + ) ) ) - (block - (set_local $v - (get_local $t) + (if + (i32.eq + (get_local $g) + (i32.const 2) ) - (set_local $w - (get_local $o) + (block + (i32.store + (get_local $h) + (i32.add + (i32.load + (get_local $h) + ) + (get_local $o) + ) + ) + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $o) + ) + (set_local $x + (get_local $m) + ) + (set_local $y + (i32.const 2) + ) ) - (set_local $x - (get_local $m) + (block + (set_local $v + (get_local $t) + ) + (set_local $w + (get_local $o) + ) + (set_local $x + (get_local $m) + ) + (set_local $y + (get_local $g) + ) ) - (set_local $y - (get_local $g) + ) + ) + (i32.store + (get_local $x) + (i32.add + (i32.load + (get_local $x) ) + (get_local $w) ) ) - ) - (i32.store - (get_local $x) - (i32.add - (i32.load + (i32.store + (i32.add (get_local $x) + (i32.const 4) + ) + (i32.sub + (get_local $v) + (get_local $w) ) - (get_local $w) ) - ) - (i32.store - (i32.add + (set_local $m (get_local $x) - (i32.const 4) ) - (i32.sub - (get_local $v) - (get_local $w) + (set_local $g + (get_local $y) ) + (set_local $n + (get_local $l) + ) + (br $while-in$1) ) - (set_local $m - (get_local $x) - ) - (set_local $g - (get_local $y) - ) - (set_local $n - (get_local $l) - ) - (br $while-in$1) ) (if (i32.eq @@ -9821,54 +9861,56 @@ (set_local $d (get_local $b) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (get_local $d) - ) - (block - (set_local $l - (get_local $b) - ) - (set_local $m - (get_local $a) - ) - (set_local $n - (get_local $j) - ) - (set_local $o - (i32.const 0) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (get_local $d) ) - (br $label$break$b) - ) - ) - (set_local $p - (i32.add - (get_local $d) - (i32.const -1) - ) - ) - (if - (i32.eq - (i32.load8_s - (i32.add + (block + (set_local $l + (get_local $b) + ) + (set_local $m (get_local $a) - (get_local $p) ) + (set_local $n + (get_local $j) + ) + (set_local $o + (i32.const 0) + ) + (br $label$break$b) ) - (i32.const 10) ) - (block - (set_local $q + (set_local $p + (i32.add (get_local $d) + (i32.const -1) ) - (br $while-out$2) ) - (set_local $d - (get_local $p) + (if + (i32.eq + (i32.load8_s + (i32.add + (get_local $a) + (get_local $p) + ) + ) + (i32.const 10) + ) + (block + (set_local $q + (get_local $d) + ) + (br $while-out$2) + ) + (set_local $d + (get_local $p) + ) ) + (br $while-in$3) ) - (br $while-in$3) ) (if (i32.lt_u @@ -10001,50 +10043,52 @@ (set_local $f (get_local $b) ) - (loop $while-out$1 $while-in$2 - (if - (i32.eqz - (i32.load8_s - (get_local $e) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (i32.load8_s + (get_local $e) + ) + ) + (block + (set_local $g + (get_local $f) + ) + (br $label$break$a) ) ) - (block - (set_local $g - (get_local $f) + (set_local $h + (i32.add + (get_local $e) + (i32.const 1) ) - (br $label$break$a) ) - ) - (set_local $h - (i32.add - (get_local $e) - (i32.const 1) + (set_local $f + (get_local $h) ) - ) - (set_local $f - (get_local $h) - ) - (if - (i32.eqz - (i32.and - (get_local $f) - (i32.const 3) + (if + (i32.eqz + (i32.and + (get_local $f) + (i32.const 3) + ) ) - ) - (block - (set_local $c - (get_local $h) + (block + (set_local $c + (get_local $h) + ) + (set_local $d + (i32.const 4) + ) + (br $while-out$1) ) - (set_local $d - (i32.const 4) + (set_local $e + (get_local $h) ) - (br $while-out$1) - ) - (set_local $e - (get_local $h) ) + (br $while-in$2) ) - (br $while-in$2) ) ) ) @@ -10058,45 +10102,47 @@ (set_local $d (get_local $c) ) - (loop $while-out$3 $while-in$4 - (set_local $c - (i32.load - (get_local $d) + (loop $while-in$4 + (block $while-out$3 + (set_local $c + (i32.load + (get_local $d) + ) ) - ) - (if - (i32.eqz - (i32.and - (i32.xor - (i32.and - (get_local $c) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (get_local $c) + (i32.const -2139062144) + ) (i32.const -2139062144) ) - (i32.const -2139062144) + (i32.add + (get_local $c) + (i32.const -16843009) + ) ) + ) + (set_local $d (i32.add - (get_local $c) - (i32.const -16843009) + (get_local $d) + (i32.const 4) ) ) - ) - (set_local $d - (i32.add - (get_local $d) - (i32.const 4) - ) - ) - (block - (set_local $j - (get_local $c) - ) - (set_local $l - (get_local $d) + (block + (set_local $j + (get_local $c) + ) + (set_local $l + (get_local $d) + ) + (br $while-out$3) ) - (br $while-out$3) ) + (br $while-in$4) ) - (br $while-in$4) ) (if (i32.eqz @@ -10118,30 +10164,32 @@ (set_local $j (get_local $l) ) - (loop $while-out$5 $while-in$6 - (set_local $l - (i32.add - (get_local $j) - (i32.const 1) - ) - ) - (if - (i32.eqz - (i32.load8_s - (get_local $l) + (loop $while-in$6 + (block $while-out$5 + (set_local $l + (i32.add + (get_local $j) + (i32.const 1) ) ) - (block - (set_local $m + (if + (i32.eqz + (i32.load8_s + (get_local $l) + ) + ) + (block + (set_local $m + (get_local $l) + ) + (br $while-out$5) + ) + (set_local $j (get_local $l) ) - (br $while-out$5) - ) - (set_local $j - (get_local $l) ) + (br $while-in$6) ) - (br $while-in$6) ) ) ) @@ -10210,82 +10258,84 @@ (set_local $c (get_local $b) ) - (loop $while-out$2 $while-in$3 - (if - (i32.gt_s - (i32.load - (i32.add + (loop $while-in$3 + (block $while-out$2 + (if + (i32.gt_s + (i32.load + (i32.add + (get_local $e) + (i32.const 76) + ) + ) + (i32.const -1) + ) + (set_local $f + (call $Ya (get_local $e) - (i32.const 76) ) ) - (i32.const -1) - ) - (set_local $f - (call $Ya - (get_local $e) + (set_local $f + (i32.const 0) ) ) - (set_local $f - (i32.const 0) - ) - ) - (if - (i32.gt_u - (i32.load - (i32.add - (get_local $e) - (i32.const 20) + (if + (i32.gt_u + (i32.load + (i32.add + (get_local $e) + (i32.const 20) + ) ) - ) - (i32.load - (i32.add - (get_local $e) - (i32.const 28) + (i32.load + (i32.add + (get_local $e) + (i32.const 28) + ) ) ) - ) - (set_local $g - (i32.or - (call $$a - (get_local $e) + (set_local $g + (i32.or + (call $$a + (get_local $e) + ) + (get_local $c) ) + ) + (set_local $g (get_local $c) ) - ) - (set_local $g - (get_local $c) - ) - ) - (if - (get_local $f) - (call $Ta - (get_local $e) - ) - ) - (set_local $e - (i32.load - (i32.add + ) + (if + (get_local $f) + (call $Ta (get_local $e) - (i32.const 56) ) ) - ) - (if - (i32.eqz - (get_local $e) + (set_local $e + (i32.load + (i32.add + (get_local $e) + (i32.const 56) + ) + ) ) - (block - (set_local $d + (if + (i32.eqz + (get_local $e) + ) + (block + (set_local $d + (get_local $g) + ) + (br $while-out$2) + ) + (set_local $c (get_local $g) ) - (br $while-out$2) - ) - (set_local $c - (get_local $g) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) @@ -10715,129 +10765,135 @@ ) ) (block - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $a) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block + (loop $while-in$1 + (block $while-out$0 (if (i32.eqz - (get_local $c) - ) - (return - (get_local $d) + (i32.and + (get_local $a) + (i32.const 3) + ) ) + (br $while-out$0) ) - (i32.store8 - (get_local $a) - (i32.load8_s - (get_local $b) + (block + (if + (i32.eqz + (get_local $c) + ) + (return + (get_local $d) + ) ) - ) - (set_local $a - (i32.add + (i32.store8 (get_local $a) - (i32.const 1) + (i32.load8_s + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 1) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 1) + (set_local $b + (i32.add + (get_local $b) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $c) - (i32.const 4) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block - (i32.store - (get_local $a) - (i32.load - (get_local $b) + ) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.ge_s + (get_local $c) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $a - (i32.add + (block + (i32.store (get_local $a) - (i32.const 4) + (i32.load + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 4) + (set_local $a + (i32.add + (get_local $a) + (i32.const 4) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 4) + (set_local $b + (i32.add + (get_local $b) + (i32.const 4) + ) + ) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $c) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $a) - (i32.load8_s - (get_local $b) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.gt_s + (get_local $c) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (i32.load8_s + (get_local $b) + ) ) - ) - (set_local $b - (i32.add - (get_local $b) - (i32.const 1) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) - ) - (set_local $c - (i32.sub - (get_local $c) - (i32.const 1) + (set_local $b + (i32.add + (get_local $b) + (i32.const 1) + ) + ) + (set_local $c + (i32.sub + (get_local $c) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $d) @@ -10917,81 +10973,87 @@ (get_local $e) ) ) - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $e) + (loop $while-in$1 + (block $while-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $e) + ) ) + (br $while-out$0) ) - (br $while-out$0) - ) - (block - (i32.store8 - (get_local $a) - (get_local $b) - ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (get_local $b) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) ) + (br $while-in$1) ) - (br $while-in$1) ) ) ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $g) + (loop $while-in$3 + (block $while-out$2 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $g) + ) ) + (br $while-out$2) ) - (br $while-out$2) - ) - (block - (i32.store - (get_local $a) - (get_local $f) - ) - (set_local $a - (i32.add + (block + (i32.store (get_local $a) - (i32.const 4) + (get_local $f) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.lt_s - (get_local $a) - (get_local $d) + (loop $while-in$5 + (block $while-out$4 + (if + (i32.eqz + (i32.lt_s + (get_local $a) + (get_local $d) + ) ) + (br $while-out$4) ) - (br $while-out$4) - ) - (block - (i32.store8 - (get_local $a) - (get_local $b) - ) - (set_local $a - (i32.add + (block + (i32.store8 (get_local $a) - (i32.const 1) + (get_local $b) + ) + (set_local $a + (i32.add + (get_local $a) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (i32.sub diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt index 6ec6f94ae..a9039e4d8 100644 --- a/test/passes/coalesce-locals-learning.txt +++ b/test/passes/coalesce-locals-learning.txt @@ -375,17 +375,19 @@ (func $loop (type $2) (local $0 i32) (local $1 i32) - (loop $out $in - (drop - (get_local $0) - ) - (set_local $0 - (i32.const 0) - ) - (drop - (get_local $1) + (block $out + (loop $in + (drop + (get_local $0) + ) + (set_local $0 + (i32.const 0) + ) + (drop + (get_local $1) + ) + (br $in) ) - (br $in) ) ) (func $interfere-in-dead (type $2) @@ -711,129 +713,135 @@ ) ) (block $block2 - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block $block4 + (block $while-out$0 + (loop $while-in$1 (if (i32.eqz - (get_local $2) - ) - (return - (get_local $3) + (i32.and + (get_local $0) + (i32.const 3) + ) ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (br $while-out$0) + ) + (block $block4 + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block $block7 - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (block $while-out$2 + (loop $while-in$3 + (if + (i32.eqz + (i32.ge_s + (get_local $2) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $0 - (i32.add + (block $block7 + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $2) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block $block9 - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (block $while-out$4 + (loop $while-in$5 + (if + (i32.eqz + (i32.gt_s + (get_local $2) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $0 - (i32.add + (block $block9 + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $3) diff --git a/test/passes/coalesce-locals-learning.wast b/test/passes/coalesce-locals-learning.wast index 1e82a73b9..469a034ba 100644 --- a/test/passes/coalesce-locals-learning.wast +++ b/test/passes/coalesce-locals-learning.wast @@ -384,17 +384,19 @@ (func $loop (type $2) (local $x i32) (local $y i32) - (loop $out $in - (drop - (get_local $x) - ) - (set_local $x - (i32.const 0) - ) - (drop - (get_local $y) + (block $out + (loop $in + (drop + (get_local $x) + ) + (set_local $x + (i32.const 0) + ) + (drop + (get_local $y) + ) + (br $in) ) - (br $in) ) ) (func $interfere-in-dead (type $2) @@ -733,129 +735,135 @@ ) ) (block $block2 - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $i1) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block $block4 + (block $while-out$0 + (loop $while-in$1 (if (i32.eqz - (get_local $i3) - ) - (return - (get_local $i4) + (i32.and + (get_local $i1) + (i32.const 3) + ) ) - ) - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (br $while-out$0) + ) + (block $block4 + (if + (i32.eqz + (get_local $i3) + ) + (return + (get_local $i4) + ) ) - ) - (set_local $i1 - (i32.add + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $i3) - (i32.const 4) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block $block7 - (i32.store - (get_local $i1) - (i32.load - (get_local $i2) + ) + (block $while-out$2 + (loop $while-in$3 + (if + (i32.eqz + (i32.ge_s + (get_local $i3) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $i1 - (i32.add + (block $block7 + (i32.store (get_local $i1) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 4) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 4) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $i3) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block $block9 - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (block $while-out$4 + (loop $while-in$5 + (if + (i32.eqz + (i32.gt_s + (get_local $i3) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $i1 - (i32.add + (block $block9 + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $i4) diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index b8d97b921..3a038ca27 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -375,7 +375,7 @@ (func $loop (type $2) (local $0 i32) (local $1 i32) - (loop $out $in + (loop $in (drop (get_local $0) ) @@ -712,129 +712,135 @@ ) ) (block $block2 - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $0) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block $block4 + (block $while-out$0 + (loop $while-in$1 (if (i32.eqz - (get_local $2) + (i32.and + (get_local $0) + (i32.const 3) + ) ) - (return - (get_local $3) - ) - ) - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (br $while-out$0) + ) + (block $block4 + (if + (i32.eqz + (get_local $2) + ) + (return + (get_local $3) + ) ) - ) - (set_local $0 - (i32.add + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $2) - (i32.const 4) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block $block7 - (i32.store - (get_local $0) - (i32.load - (get_local $1) + ) + (block $while-out$2 + (loop $while-in$3 + (if + (i32.eqz + (i32.ge_s + (get_local $2) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $0 - (i32.add + (block $block7 + (i32.store (get_local $0) - (i32.const 4) + (i32.load + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 4) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 4) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 4) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 4) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $2) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block $block9 - (i32.store8 - (get_local $0) - (i32.load8_s - (get_local $1) + (block $while-out$4 + (loop $while-in$5 + (if + (i32.eqz + (i32.gt_s + (get_local $2) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $0 - (i32.add + (block $block9 + (i32.store8 (get_local $0) - (i32.const 1) + (i32.load8_s + (get_local $1) + ) ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) ) - ) - (set_local $2 - (i32.sub - (get_local $2) - (i32.const 1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $3) diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast index 568b3741c..713fd7dd9 100644 --- a/test/passes/coalesce-locals.wast +++ b/test/passes/coalesce-locals.wast @@ -384,7 +384,7 @@ (func $loop (type $2) (local $x i32) (local $y i32) - (loop $out $in + (loop $in (drop (get_local $x) ) @@ -733,129 +733,135 @@ ) ) (block $block2 - (loop $while-out$0 $while-in$1 - (if - (i32.eqz - (i32.and - (get_local $i1) - (i32.const 3) - ) - ) - (br $while-out$0) - ) - (block $block4 + (block $while-out$0 + (loop $while-in$1 (if (i32.eqz - (get_local $i3) + (i32.and + (get_local $i1) + (i32.const 3) + ) ) - (return - (get_local $i4) + (br $while-out$0) + ) + (block $block4 + (if + (i32.eqz + (get_local $i3) + ) + (return + (get_local $i4) + ) ) - ) - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) - ) - ) - (set_local $i1 - (i32.add + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) ) - ) - ) - (br $while-in$1) - ) - (loop $while-out$2 $while-in$3 - (if - (i32.eqz - (i32.ge_s - (get_local $i3) - (i32.const 4) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) - (br $while-out$2) + (br $while-in$1) ) - (block $block7 - (i32.store - (get_local $i1) - (i32.load - (get_local $i2) + ) + (block $while-out$2 + (loop $while-in$3 + (if + (i32.eqz + (i32.ge_s + (get_local $i3) + (i32.const 4) + ) ) + (br $while-out$2) ) - (set_local $i1 - (i32.add + (block $block7 + (i32.store (get_local $i1) - (i32.const 4) + (i32.load + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 4) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 4) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 4) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 4) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 4) + ) ) ) + (br $while-in$3) ) - (br $while-in$3) ) ) ) - (loop $while-out$4 $while-in$5 - (if - (i32.eqz - (i32.gt_s - (get_local $i3) - (i32.const 0) - ) - ) - (br $while-out$4) - ) - (block $block9 - (i32.store8 - (get_local $i1) - (i32.load8_s - (get_local $i2) + (block $while-out$4 + (loop $while-in$5 + (if + (i32.eqz + (i32.gt_s + (get_local $i3) + (i32.const 0) + ) ) + (br $while-out$4) ) - (set_local $i1 - (i32.add + (block $block9 + (i32.store8 (get_local $i1) - (i32.const 1) + (i32.load8_s + (get_local $i2) + ) ) - ) - (set_local $i2 - (i32.add - (get_local $i2) - (i32.const 1) + (set_local $i1 + (i32.add + (get_local $i1) + (i32.const 1) + ) ) - ) - (set_local $i3 - (i32.sub - (get_local $i3) - (i32.const 1) + (set_local $i2 + (i32.add + (get_local $i2) + (i32.const 1) + ) + ) + (set_local $i3 + (i32.sub + (get_local $i3) + (i32.const 1) + ) ) ) + (br $while-in$5) ) - (br $while-in$5) ) (return (get_local $i4) diff --git a/test/passes/dce.txt b/test/passes/dce.txt index 92fea5c28..6e70cd8de 100644 --- a/test/passes/dce.txt +++ b/test/passes/dce.txt @@ -123,16 +123,18 @@ (i32.const 0) (unreachable) ) - (loop $out $in - (br_if $out - (i32.const 1) + (block $out + (loop $in + (br_if $out + (i32.const 1) + ) + (unreachable) ) - (unreachable) ) (if (i32.const 0) (block $block20 - (loop $out $in + (loop $in (br_if $in (i32.const 1) ) diff --git a/test/passes/dce.wast b/test/passes/dce.wast index 22ae25fbc..61b3138e5 100644 --- a/test/passes/dce.wast +++ b/test/passes/dce.wast @@ -194,20 +194,22 @@ ) (if (i32.const 0) - (loop $loop-out17 $loop-in18 + (loop $loop-in18 (unreachable) ) ) - (loop $out $in + (block $out + (loop $in (br_if $out (i32.const 1) ) (unreachable) ) + ) (if (i32.const 0) (block $block20 - (loop $out $in + (loop $in (br_if $in (i32.const 1) ) diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index 022d45052..c37c41fe3 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -283,7 +283,7 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (loop $foo $bar + (loop $bar (nop) ) ) diff --git a/test/passes/duplicate-function-elimination.wast b/test/passes/duplicate-function-elimination.wast index 1e0aaaf33..843e812f9 100644 --- a/test/passes/duplicate-function-elimination.wast +++ b/test/passes/duplicate-function-elimination.wast @@ -335,12 +335,12 @@ (memory 0) (type $0 (func)) (func $erase (type $0) - (loop $foo $bar + (loop $bar (nop) ) ) (func $other (type $0) - (loop $sfo $sjc + (loop $sjc (nop) ) ) diff --git a/test/passes/nm.txt b/test/passes/nm.txt index 8e3771ba2..1b12c5cff 100644 --- a/test/passes/nm.txt +++ b/test/passes/nm.txt @@ -9,7 +9,7 @@ ) (func $b (type $0) (drop - (loop $loop-out0 $loop-in1 + (loop $loop-in1 (nop) (i32.const 1000) ) diff --git a/test/passes/nm.wast b/test/passes/nm.wast index d75a2b99e..8cea1e648 100644 --- a/test/passes/nm.wast +++ b/test/passes/nm.wast @@ -6,7 +6,7 @@ ) (func $b (type $0) (drop - (loop $loop-out0 $loop-in1 + (loop $loop-in1 (nop) (i32.const 1000) ) diff --git a/test/passes/precompute.txt b/test/passes/precompute.txt index 9c40148b6..9825594b6 100644 --- a/test/passes/precompute.txt +++ b/test/passes/precompute.txt @@ -20,7 +20,7 @@ (drop (i32.const 3) ) - (loop $loop-out0 $in + (loop $in (br $in) ) ) diff --git a/test/passes/precompute.wast b/test/passes/precompute.wast index c702f2e8b..808485a34 100644 --- a/test/passes/precompute.wast +++ b/test/passes/precompute.wast @@ -38,7 +38,7 @@ (i32.const 1) ) ) - (loop $loop-out0 $in + (loop $in (br $in) ) ) diff --git a/test/passes/remove-unused-names.txt b/test/passes/remove-unused-names.txt index b36ebb622..fa42e8d28 100644 --- a/test/passes/remove-unused-names.txt +++ b/test/passes/remove-unused-names.txt @@ -6,42 +6,45 @@ (i32.const 0) ) (func $loops (type $1) - (loop $out $in - (br $out) - (br $in) - ) (block $out - (br $out) + (loop $in + (br $out) + (br $in) + ) ) (loop $in (br $in) ) - (loop - (nop) - ) - (loop - (loop $out $in + (nop) + (block $out + (loop $in (br $out) (br $in) ) ) - (block - (loop $out $in + (block $out + (loop $in (br $out) (br $in) ) ) - (loop $out $in - (br $out) - (br $in) + (loop $in + (block $out + (br $out) + (br $in) + ) ) - (loop $out $in - (br $out) - (br $in) + (loop $in + (block $out + (br $out) + (br $in) + ) ) - (loop $out $in - (br $out) - (br $in) + (block $out + (loop $in + (br $out) + (br $in) + ) ) ) (func $merges (type $1) diff --git a/test/passes/remove-unused-names.wast b/test/passes/remove-unused-names.wast index 4b3365bf8..c8efa0c15 100644 --- a/test/passes/remove-unused-names.wast +++ b/test/passes/remove-unused-names.wast @@ -8,45 +8,48 @@ ) ) (func $loops (type $1) - (loop $out $in - (br $out) - (br $in) - ) - (loop $out $in - (br $out) + (block $out + (loop $in + (br $out) + (br $in) + ) ) - (loop $out $in + (loop $in (br $in) ) - (loop $out $in + (loop $in (nop) ) - (loop $out $in - (loop $out $in - (br $out) - (br $in) + (block $out + (loop $in + (block $out + (loop $in + (br $out) + (br $in) + ) + ) ) ) (block $out - (loop $out $in + (loop $in (br $out) (br $in) ) ) - (loop $out $in + (loop $in (block $out (br $out) (br $in) ) ) - (loop $loop-out0 $in + (loop $in (block $out (br $out) (br $in) ) ) (block $out - (loop $loop-out1 $in + (loop $in (br $out) (br $in) ) diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index f2425b364..60e07f3fb 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -319,7 +319,7 @@ (i32.const 1337) ) (drop - (loop $loop-out4 $loop-in5 + (loop $loop-in5 (drop (get_local $a) ) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 07d7ccd03..d74ebe054 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -366,7 +366,7 @@ (i32.const 1337) ) (drop - (loop $loop-out4 $loop-in5 + (loop $loop-in5 (drop (get_local $a) ) diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast index 7dc77eac6..7b8d6a08a 100644 --- a/test/passes/vacuum.wast +++ b/test/passes/vacuum.wast @@ -99,15 +99,15 @@ ) ) (func $loopy (type $1) (param $0 i32) - (loop $loop-out0 $loop-in1 + (loop $loop-in1 (nop) ) - (loop $loop-out2 $loop-in3 + (loop $loop-in3 (nop) (nop) ) (drop - (loop $loop-out4 $loop-in5 + (loop $loop-in5 (drop (get_local $0) ) diff --git a/test/unit.fromasm b/test/unit.fromasm index edb9f5ece..356c935c9 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -162,46 +162,42 @@ ) ) ) - (br $switch-default$16) ) - (br $switch-default$16) ) - (block $while-out$10 - ) - (br $switch-default$16) - ) - (loop - (br $switch-default$16) - ) - ) - (loop $label$break$L1 $label$continue$L1 - (loop $label$break$L3 $label$continue$L3 - (block $switch$17 - (block $switch-default$21 - (block $switch-case$20 - (block $switch-case$19 - (block $switch-case$18 - (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 - (i32.sub - (get_local $0) - (i32.const -1) + ) + ) + (loop $label$continue$L1 + (block $label$break$L1 + (loop $label$continue$L3 + (block $label$break$L3 + (block $switch$17 + (block $switch-default$21 + (block $switch-case$20 + (block $switch-case$19 + (block $switch-case$18 + (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 + (i32.sub + (get_local $0) + (i32.const -1) + ) + ) ) + (br $label$break$L1) ) + (br $switch$17) ) - (br $label$break$L1) + (br $label$break$L3) ) - (br $switch$17) + (br $label$break$L1) ) - (br $label$break$L3) + (br $label$continue$L3) ) - (br $label$break$L1) ) - (br $label$continue$L3) - ) - (call_import $h - (i32.const 120) + (call_import $h + (i32.const 120) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) (i32.const 0) ) @@ -290,23 +286,25 @@ (set_local $0 (i32.const 1) ) - (loop $for-out$0 $for-in$1 - (br_if $for-out$0 - (i32.ge_s - (get_local $0) - (i32.const 200) + (loop $for-in$1 + (block $for-out$0 + (br_if $for-out$0 + (i32.ge_s + (get_local $0) + (i32.const 200) + ) ) - ) - (call_import $h - (get_local $0) - ) - (set_local $0 - (i32.add + (call_import $h (get_local $0) - (i32.const 1) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (br $for-in$1) ) - (br $for-in$1) ) ) (func $ceiling_32_64 (param $0 f32) (param $1 f64) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index abb6c3317..160047635 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -150,46 +150,42 @@ ) ) ) - (br $switch-default$16) ) - (br $switch-default$16) ) - (block $while-out$10 - ) - (br $switch-default$16) - ) - (loop - (br $switch-default$16) - ) - ) - (loop $label$break$L1 $label$continue$L1 - (loop $label$break$L3 $label$continue$L3 - (block $switch$17 - (block $switch-default$21 - (block $switch-case$20 - (block $switch-case$19 - (block $switch-case$18 - (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 - (i32.sub - (get_local $0) - (i32.const -1) + ) + ) + (loop $label$continue$L1 + (block $label$break$L1 + (loop $label$continue$L3 + (block $label$break$L3 + (block $switch$17 + (block $switch-default$21 + (block $switch-case$20 + (block $switch-case$19 + (block $switch-case$18 + (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 + (i32.sub + (get_local $0) + (i32.const -1) + ) + ) ) + (br $label$break$L1) ) + (br $switch$17) ) - (br $label$break$L1) + (br $label$break$L3) ) - (br $switch$17) + (br $label$break$L1) ) - (br $label$break$L3) + (br $label$continue$L3) ) - (br $label$break$L1) ) - (br $label$continue$L3) - ) - (call_import $h - (i32.const 120) + (call_import $h + (i32.const 120) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) (i32.const 0) ) @@ -272,23 +268,25 @@ (set_local $0 (i32.const 1) ) - (loop $for-out$0 $for-in$1 - (br_if $for-out$0 - (i32.ge_s - (get_local $0) - (i32.const 200) + (loop $for-in$1 + (block $for-out$0 + (br_if $for-out$0 + (i32.ge_s + (get_local $0) + (i32.const 200) + ) ) - ) - (call_import $h - (get_local $0) - ) - (set_local $0 - (i32.add + (call_import $h (get_local $0) - (i32.const 1) ) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (br $for-in$1) ) - (br $for-in$1) ) ) (func $ceiling_32_64 (param $0 f32) (param $1 f64) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index b7f63c67b..65f556365 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -251,63 +251,71 @@ (br $label$break$Lout) ) (block - (loop $while-out$10 $while-in$11 - (br $while-out$10) - (br $while-in$11) + (loop $while-in$11 + (block $while-out$10 + (br $while-out$10) + (br $while-in$11) + ) ) (br $label$break$Lout) ) ) (block - (loop $while-out$13 $while-in$14 - (br $label$break$Lout) - (br $while-in$14) + (loop $while-in$14 + (block $while-out$13 + (br $label$break$Lout) + (br $while-in$14) + ) ) (br $label$break$Lout) ) ) ) - (loop $label$break$L1 $label$continue$L1 - (loop $label$break$L3 $label$continue$L3 - (block $switch$17 - (block $switch-default$21 - (block $switch-default$21 - (block $switch-case$20 - (block $switch-case$19 - (block $switch-case$18 - (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 - (i32.sub - (get_local $x) - (i32.const -1) + (loop $label$continue$L1 + (block $label$break$L1 + (loop $label$continue$L3 + (block $label$break$L3 + (block $switch$17 + (block $switch-default$21 + (block $switch-default$21 + (block $switch-case$20 + (block $switch-case$19 + (block $switch-case$18 + (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 + (i32.sub + (get_local $x) + (i32.const -1) + ) + ) + ) + (block + (br $label$break$L1) + (br $switch$17) + ) + ) + (block + (set_local $waka + (i32.const 1) ) + (br $switch$17) ) ) (block - (br $label$break$L1) + (br $label$break$L3) (br $switch$17) ) ) - (block - (set_local $waka - (i32.const 1) - ) - (br $switch$17) - ) - ) - (block - (br $label$break$L3) - (br $switch$17) + (br $label$break$L1) ) ) - (br $label$break$L1) + (br $label$continue$L3) ) ) - (br $label$continue$L3) - ) - (call_import $h - (i32.const 120) + (call_import $h + (i32.const 120) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) (return (i32.const 0) @@ -493,26 +501,28 @@ (set_local $i (i32.const 1) ) - (loop $for-out$0 $for-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $i) - (i32.const 200) + (loop $for-in$1 + (block $for-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $i) + (i32.const 200) + ) ) + (br $for-out$0) ) - (br $for-out$0) - ) - (call_import $h - (get_local $i) - ) - (set_local $i - (i32.add + (call_import $h (get_local $i) - (i32.const 1) ) + (set_local $i + (i32.add + (get_local $i) + (i32.const 1) + ) + ) + (br $for-in$1) ) - (br $for-in$1) ) ) (func $ceiling_32_64 (param $u f32) (param $B f64) @@ -557,23 +567,27 @@ ) ) (func $continues - (loop $while-out$0 $while-in$1 - (call_import $print - (i32.const 1) - ) - (loop $do-once$2 $unlikely-continue$3 + (loop $while-in$1 + (block $while-out$0 (call_import $print - (i32.const 5) + (i32.const 1) ) - (if - (i32.const 0) - (br $unlikely-continue$3) + (block $do-once$2 + (loop $unlikely-continue$3 + (call_import $print + (i32.const 5) + ) + (if + (i32.const 0) + (br $unlikely-continue$3) + ) + ) ) + (call_import $print + (i32.const 2) + ) + (br $while-in$1) ) - (call_import $print - (i32.const 2) - ) - (br $while-in$1) ) ) (func $bitcasts (param $i i32) (param $f f32) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 55966a172..a170b7676 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -257,63 +257,71 @@ (br $label$break$Lout) ) (block - (loop $while-out$10 $while-in$11 - (br $while-out$10) - (br $while-in$11) + (loop $while-in$11 + (block $while-out$10 + (br $while-out$10) + (br $while-in$11) + ) ) (br $label$break$Lout) ) ) (block - (loop $while-out$13 $while-in$14 - (br $label$break$Lout) - (br $while-in$14) + (loop $while-in$14 + (block $while-out$13 + (br $label$break$Lout) + (br $while-in$14) + ) ) (br $label$break$Lout) ) ) ) - (loop $label$break$L1 $label$continue$L1 - (loop $label$break$L3 $label$continue$L3 - (block $switch$17 - (block $switch-default$21 - (block $switch-default$21 - (block $switch-case$20 - (block $switch-case$19 - (block $switch-case$18 - (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 - (i32.sub - (get_local $x) - (i32.const -1) + (loop $label$continue$L1 + (block $label$break$L1 + (loop $label$continue$L3 + (block $label$break$L3 + (block $switch$17 + (block $switch-default$21 + (block $switch-default$21 + (block $switch-case$20 + (block $switch-case$19 + (block $switch-case$18 + (br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21 + (i32.sub + (get_local $x) + (i32.const -1) + ) + ) + ) + (block + (br $label$break$L1) + (br $switch$17) + ) + ) + (block + (set_local $waka + (i32.const 1) ) + (br $switch$17) ) ) (block - (br $label$break$L1) + (br $label$break$L3) (br $switch$17) ) ) - (block - (set_local $waka - (i32.const 1) - ) - (br $switch$17) - ) - ) - (block - (br $label$break$L3) - (br $switch$17) + (br $label$break$L1) ) ) - (br $label$break$L1) + (br $label$continue$L3) ) ) - (br $label$continue$L3) - ) - (call_import $h - (i32.const 120) + (call_import $h + (i32.const 120) + ) + (br $label$continue$L1) ) - (br $label$continue$L1) ) (return (i32.const 0) @@ -499,26 +507,28 @@ (set_local $i (i32.const 1) ) - (loop $for-out$0 $for-in$1 - (if - (i32.eqz - (i32.lt_s - (get_local $i) - (i32.const 200) + (loop $for-in$1 + (block $for-out$0 + (if + (i32.eqz + (i32.lt_s + (get_local $i) + (i32.const 200) + ) ) + (br $for-out$0) ) - (br $for-out$0) - ) - (call_import $h - (get_local $i) - ) - (set_local $i - (i32.add + (call_import $h (get_local $i) - (i32.const 1) ) + (set_local $i + (i32.add + (get_local $i) + (i32.const 1) + ) + ) + (br $for-in$1) ) - (br $for-in$1) ) ) (func $ceiling_32_64 (param $u f32) (param $B f64) @@ -563,23 +573,27 @@ ) ) (func $continues - (loop $while-out$0 $while-in$1 - (call_import $print - (i32.const 1) - ) - (loop $do-once$2 $unlikely-continue$3 + (loop $while-in$1 + (block $while-out$0 (call_import $print - (i32.const 5) + (i32.const 1) ) - (if - (i32.const 0) - (br $unlikely-continue$3) + (block $do-once$2 + (loop $unlikely-continue$3 + (call_import $print + (i32.const 5) + ) + (if + (i32.const 0) + (br $unlikely-continue$3) + ) + ) ) + (call_import $print + (i32.const 2) + ) + (br $while-in$1) ) - (call_import $print - (i32.const 2) - ) - (br $while-in$1) ) ) (func $bitcasts (param $i i32) (param $f f32) diff --git a/test/unit.wast b/test/unit.wast index b4105ed0b..ca0e811a9 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -253,8 +253,8 @@ ) (br $label$break$Lout) ) - (block $block0 - (loop $while-out$10 $while-in$11 + (block $while-out$10 + (loop $while-in$11 (block $block1 (br $while-out$10) (br $while-in$11) @@ -263,8 +263,8 @@ (br $label$break$Lout) ) ) - (block $block2 - (loop $while-out$13 $while-in$14 + (block $while-out$13 + (loop $while-in$14 (block $block3 (br $label$break$Lout) (br $while-in$14) @@ -429,7 +429,7 @@ (i32.const 0) ) (func $loop-roundtrip (type $7) (param $0 f64) (result f64) - (loop $loop-out0 $loop-in1 + (loop $loop-in1 (drop (get_local $0) ) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 971b89fb7..0e681de27 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -266,17 +266,17 @@ (br $label$9) ) (block $label$15 - (loop $label$16 $label$17 + (loop $label$16 + (br $label$15) (br $label$16) - (br $label$17) ) (br $label$9) ) ) - (block $label$18 - (loop $label$19 $label$20 + (block $label$17 + (loop $label$18 (br $label$9) - (br $label$20) + (br $label$18) ) (br $label$9) ) @@ -439,7 +439,7 @@ ) ) (func $loop-roundtrip (type $7) (param $var$0 f64) (result f64) - (loop $label$0 $label$1 + (loop $label$0 (drop (get_local $var$0) ) -- cgit v1.2.3 From 42155057a56a979eccb6d811671cfbf290cf429e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 3 Aug 2016 18:03:24 -0700 Subject: move drop into blocks, dropping all the breaks as well, when possible --- src/passes/MergeBlocks.cpp | 66 ++- src/wasm-traversal.h | 62 +++ test/passes/remove-unused-names_merge-blocks.txt | 498 ++++++++++------------- 3 files changed, 344 insertions(+), 282 deletions(-) (limited to 'src') diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index 4798ad28d..bde9397a8 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -64,9 +64,40 @@ #include #include #include +#include namespace wasm { +struct SwitchFinder : public ControlFlowWalker> { + Expression* origin; + bool found = false; + + void visitSwitch(Switch* curr) { + if (findBreakTarget(curr->default_) == origin) { + found = true; + return; + } + for (auto& target : curr->targets) { + if (findBreakTarget(target) == origin) { + found = true; + return; + } + } + } +}; + +struct BreakValueDropper : public ControlFlowWalker> { + Expression* origin; + + void visitBreak(Break* curr) { + if (curr->value && findBreakTarget(curr->name) == origin) { + Builder builder(*getModule()); + replaceCurrent(builder.makeSequence(builder.makeDrop(curr->value), curr)); + curr->value = nullptr; + } + } +}; + struct MergeBlocks : public WalkerPass>> { bool isFunctionParallel() override { return true; } @@ -80,20 +111,39 @@ struct MergeBlocks : public WalkerPasslist.size(); i++) { Block* child = curr->list[i]->dynCast(); if (!child) { - // TODO: if we have a child that is (drop (block ..)) then we can move the drop into the block, allowing more merging, - // but we must also drop values from brs - /* + // if we have a child that is (drop (block ..)) then we can move the drop into the block, and remove br values. this allows more merging, auto* drop = curr->list[i]->dynCast(); if (drop) { child = drop->value->dynCast(); if (child) { - // reuse the drop - drop->value = child->list.back(); - child->list.back() = drop; - curr->list[i] = child; + if (child->name.is()) { + Expression* expression = child; + // if there is a switch targeting us, we can't do it - we can't remove the value from other targets too + SwitchFinder finder; + finder.origin = child; + finder.walk(expression); + if (finder.found) { + child = nullptr; + } else { + // fix up breaks + BreakValueDropper fixer; + fixer.origin = child; + fixer.setModule(getModule()); + fixer.walk(expression); + } + } + if (child) { + // we can do it! + // reuse the drop + drop->value = child->list.back(); + child->list.back() = drop; + child->finalize(); + curr->list[i] = child; + more = true; + changed = true; + } } } - */ } if (!child) continue; if (child->name.is()) continue; // named blocks can have breaks to them (and certainly do, if we ran RemoveUnusedNames and RemoveUnusedBrs) diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index f9d3d8413..f4483644c 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -446,6 +446,68 @@ struct PostWalker : public Walker { } }; +// Traversal with a control-flow stack. + +template +struct ControlFlowWalker : public PostWalker { + ControlFlowWalker() {} + + std::vector controlFlowStack; // contains blocks, loops, and ifs + + // Uses the control flow stack to find the target of a break to a name + Expression* findBreakTarget(Name name) { + assert(!controlFlowStack.empty()); + Index i = controlFlowStack.size() - 1; + while (1) { + auto* curr = controlFlowStack[i]; + if (Block* block = curr->dynCast()) { + if (name == block->name) return curr; + } else if (Loop* loop = curr->dynCast()) { + if (name == loop->name) return curr; + } else { + WASM_UNREACHABLE(); + } + if (i == 0) return nullptr; + i--; + } + } + + static void doPreVisitControlFlow(SubType* self, Expression** currp) { + self->controlFlowStack.push_back(*currp); + } + + static void doPostVisitControlFlow(SubType* self, Expression** currp) { + assert(self->controlFlowStack.back() == *currp); + self->controlFlowStack.pop_back(); + } + + static void scan(SubType* self, Expression** currp) { + auto* curr = *currp; + + switch (curr->_id) { + case Expression::Id::BlockId: + case Expression::Id::IfId: + case Expression::Id::LoopId: { + self->pushTask(SubType::doPostVisitControlFlow, currp); + break; + } + default: {} + } + + PostWalker::scan(self, currp); + + switch (curr->_id) { + case Expression::Id::BlockId: + case Expression::Id::IfId: + case Expression::Id::LoopId: { + self->pushTask(SubType::doPreVisitControlFlow, currp); + break; + } + default: {} + } + } +}; + // Traversal in the order of execution. This is quick and simple, but // does not provide the same comprehensive information that a full // conversion to basic blocks would. What it does give is a quick diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index 43bbaf582..4557f3da4 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -132,26 +132,22 @@ ) ) (drop - (block - (drop - (i32.const 10) - ) - (i32.eqz - (i32.const 20) - ) + (i32.const 10) + ) + (drop + (i32.eqz + (i32.const 20) ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 20) - ) - (i32.eqz - (i32.const 30) - ) + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (drop + (i32.eqz + (i32.const 30) ) ) (drop @@ -161,13 +157,11 @@ (i32.const 20) ) (drop - (block - (drop - (i32.const 10) - ) - (i32.load - (i32.const 20) - ) + (i32.const 10) + ) + (drop + (i32.load + (i32.const 20) ) ) (drop @@ -187,28 +181,24 @@ ) ) (drop - (block - (drop - (i32.const 10) - ) - (i32.add - (i32.const 20) - (i32.const 30) - ) + (i32.const 10) + ) + (drop + (i32.add + (i32.const 20) + (i32.const 30) ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 20) - ) - (i32.add - (i32.const 30) - (i32.const 40) - ) + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (drop + (i32.add + (i32.const 30) + (i32.const 40) ) ) (drop @@ -220,28 +210,24 @@ ) ) (drop - (block - (drop - (i32.const 20) - ) - (i32.add - (i32.const 10) - (i32.const 30) - ) + (i32.const 20) + ) + (drop + (i32.add + (i32.const 10) + (i32.const 30) ) ) (drop - (block - (drop - (i32.const 20) - ) - (drop - (i32.const 30) - ) - (i32.add - (i32.const 10) - (i32.const 40) - ) + (i32.const 20) + ) + (drop + (i32.const 30) + ) + (drop + (i32.add + (i32.const 10) + (i32.const 40) ) ) (drop @@ -255,37 +241,33 @@ ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 30) - ) - (i32.add - (i32.const 20) - (i32.const 40) - ) + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.add + (i32.const 20) + (i32.const 40) ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 20) - ) - (drop - (i32.const 40) - ) - (drop - (i32.const 50) - ) - (i32.add - (i32.const 30) - (i32.const 60) - ) + (i32.const 10) + ) + (drop + (i32.const 20) + ) + (drop + (i32.const 40) + ) + (drop + (i32.const 50) + ) + (drop + (i32.add + (i32.const 30) + (i32.const 60) ) ) (drop @@ -313,255 +295,225 @@ ) ) ) + (unreachable) (drop - (block - (unreachable) - (drop - (i32.const 20) - ) - (i32.add - (i32.const 10) - (i32.const 30) - ) + (i32.const 20) + ) + (drop + (i32.add + (i32.const 10) + (i32.const 30) ) ) ) (func $trinary (type $3) (drop - (block - (drop + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) + (drop + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) + ) + ) + (drop + (i32.const 20) + ) + (drop + (i32.const 40) + ) + (drop + (select + (block (i32.const 10) ) - (drop + (i32.const 30) + (i32.const 50) + ) + ) + (drop + (i32.const 10) + ) + (drop + (i32.const 40) + ) + (drop + (select + (i32.const 20) + (block (i32.const 30) ) - (drop - (i32.const 50) - ) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) + (i32.const 50) ) ) (drop - (block - (drop - (i32.const 20) - ) - (drop - (i32.const 40) - ) - (select - (block - (i32.const 10) - ) - (i32.const 30) + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (select + (i32.const 20) + (i32.const 40) + (block (i32.const 50) ) ) ) (drop - (block - (drop + (i32.const 30) + ) + (drop + (select + (block (i32.const 10) ) - (drop - (i32.const 40) - ) - (select + (block (i32.const 20) - (block - (i32.const 30) - ) - (i32.const 50) ) + (i32.const 40) ) ) (drop - (block - (drop + (i32.const 20) + ) + (drop + (select + (block (i32.const 10) ) - (drop - (i32.const 30) - ) - (select - (i32.const 20) + (i32.const 30) + (block (i32.const 40) - (block - (i32.const 50) - ) ) ) ) (drop - (block - (drop + (i32.const 10) + ) + (drop + (select + (i32.const 20) + (block (i32.const 30) ) - (select - (block - (i32.const 10) - ) - (block - (i32.const 20) - ) + (block (i32.const 40) ) ) ) + (unreachable) (drop - (block - (drop - (i32.const 20) - ) - (select - (block - (i32.const 10) - ) - (i32.const 30) - (block - (i32.const 40) - ) - ) - ) + (i32.const 30) ) (drop - (block - (drop - (i32.const 10) - ) - (select - (i32.const 20) - (block - (i32.const 30) - ) - (block - (i32.const 40) - ) - ) + (i32.const 50) + ) + (drop + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) ) ) (drop - (block + (i32.const 10) + ) + (drop + (select (unreachable) - (drop - (i32.const 30) - ) - (drop - (i32.const 50) - ) - (select - (i32.const 20) + (block + (drop + (i32.const 30) + ) (i32.const 40) + ) + (block + (drop + (i32.const 50) + ) (i32.const 60) ) ) ) (drop - (block - (drop - (i32.const 10) - ) - (select - (unreachable) - (block - (drop - (i32.const 30) - ) - (i32.const 40) - ) - (block - (drop - (i32.const 50) - ) - (i32.const 60) - ) - ) + (i32.const 10) + ) + (unreachable) + (drop + (i32.const 50) + ) + (drop + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) ) ) (drop - (block - (drop - (i32.const 10) - ) + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (select + (i32.const 20) (unreachable) - (drop - (i32.const 50) - ) - (select - (i32.const 20) - (i32.const 40) + (block + (drop + (i32.const 50) + ) (i32.const 60) ) ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 30) - ) - (select - (i32.const 20) - (unreachable) - (block - (drop - (i32.const 50) - ) - (i32.const 60) - ) - ) - ) + (i32.const 10) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 30) - ) - (unreachable) - (select - (i32.const 20) - (i32.const 40) - (i32.const 60) - ) + (i32.const 30) + ) + (unreachable) + (drop + (select + (i32.const 20) + (i32.const 40) + (i32.const 60) ) ) (drop - (block - (drop - (i32.const 10) - ) - (drop - (i32.const 30) - ) - (drop - (i32.const 50) - ) - (select - (i32.const 20) - (i32.const 40) - (unreachable) - ) + (i32.const 10) + ) + (drop + (i32.const 30) + ) + (drop + (i32.const 50) + ) + (drop + (select + (i32.const 20) + (i32.const 40) + (unreachable) ) ) ) (func $breaks (type $3) (block $out (drop - (block - (drop - (i32.const 10) - ) - (i32.const 20) - ) + (i32.const 10) + ) + (drop + (i32.const 20) ) (br $out) (drop @@ -571,12 +523,10 @@ (i32.const 20) ) (drop - (block - (drop - (i32.const 10) - ) - (i32.const 20) - ) + (i32.const 10) + ) + (drop + (i32.const 20) ) (drop (i32.const 30) -- cgit v1.2.3 From f48690ceeea66cf44e8f64be6543d6ed6b9e6bb5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 5 Aug 2016 11:10:04 -0700 Subject: select values must be valid --- src/passes/RemoveUnusedBrs.cpp | 2 +- src/wasm-validator.h | 4 ++++ test/passes/remove-unused-brs.txt | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp index 263cea655..59d3af6fc 100644 --- a/src/passes/RemoveUnusedBrs.cpp +++ b/src/passes/RemoveUnusedBrs.cpp @@ -189,7 +189,7 @@ struct RemoveUnusedBrs : public WalkerPass>> { void visitIf(If* curr) { - if (curr->ifFalse) { + if (curr->ifFalse && isConcreteWasmType(curr->ifTrue->type) && isConcreteWasmType(curr->ifFalse->type)) { // if with else, consider turning it into a select if there is no control flow // TODO: estimate cost EffectAnalyzer condition(curr->condition); diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 5844dafcd..8e989c94d 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -280,6 +280,10 @@ public: default: abort(); } } + void visitSelect(Select* curr) { + shouldBeUnequal(curr->ifTrue->type, none, curr, "select left must be valid"); + shouldBeUnequal(curr->ifFalse->type, none, curr, "select right must be valid"); + } void visitReturn(Return* curr) { if (curr->value) { diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index de6dc4779..1c5c8e713 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -117,7 +117,8 @@ ) (func $b12-yes (type $1) (block $topmost - (select + (if + (i32.const 1) (block $block1 (drop (i32.const 12) @@ -138,7 +139,6 @@ ) ) ) - (i32.const 1) ) ) ) @@ -221,42 +221,42 @@ ) (func $b17 (type $1) (block $a - (select + (if + (i32.const 0) (block $block1 ) (block $block3 ) - (i32.const 0) ) ) (block $a - (select + (if + (i32.const 0) (drop (i32.const 1) ) (block $block6 ) - (i32.const 0) ) ) (block $a - (select + (if + (i32.const 0) (block $block8 ) (drop (i32.const 1) ) - (i32.const 0) ) ) (block $c (block $b - (select + (if + (i32.const 0) (block $block11 ) (block $block13 ) - (i32.const 0) ) ) ) @@ -272,11 +272,11 @@ ) (func $ret-3 (type $1) (block $block0 - (select + (if + (i32.const 0) (nop) (block $block3 ) - (i32.const 0) ) ) ) @@ -340,7 +340,10 @@ (i32.const 1) ) ) - (select + (if + (block $a + (i32.const 0) + ) (block $a (block $block11 (drop @@ -355,9 +358,6 @@ ) ) ) - (block $a - (i32.const 0) - ) ) ) ) -- cgit v1.2.3 From e9d057d097f3875be50bba44d874e66ad71e40f2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 7 Aug 2016 11:27:30 -0700 Subject: fix compilation error on recent clang --- src/wasm-traversal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index f4483644c..b69db1ea2 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -460,9 +460,9 @@ struct ControlFlowWalker : public PostWalker { Index i = controlFlowStack.size() - 1; while (1) { auto* curr = controlFlowStack[i]; - if (Block* block = curr->dynCast()) { + if (Block* block = curr->template dynCast()) { if (name == block->name) return curr; - } else if (Loop* loop = curr->dynCast()) { + } else if (Loop* loop = curr->template dynCast()) { if (name == loop->name) return curr; } else { WASM_UNREACHABLE(); -- cgit v1.2.3 From abb498167e4c8178a5cb6cd22dcf106959eaa7d4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 7 Aug 2016 12:04:25 -0700 Subject: don't depend on order of operations in calls, it varies by compiler --- src/asm2wasm.h | 4 +- test/emcc_O2_hello_world.fromasm | 178 +++++------ test/emcc_O2_hello_world.fromasm.imprecise | 178 +++++------ test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 226 +++++++------- test/emcc_O2_hello_world.fromasm.no-opts | 226 +++++++------- test/emcc_hello_world.fromasm | 282 +++++++++--------- test/emcc_hello_world.fromasm.imprecise | 282 +++++++++--------- test/emcc_hello_world.fromasm.imprecise.no-opts | 326 ++++++++++----------- test/emcc_hello_world.fromasm.no-opts | 326 ++++++++++----------- test/memorygrowth.fromasm | 178 +++++------ test/memorygrowth.fromasm.imprecise | 178 +++++------ test/memorygrowth.fromasm.imprecise.no-opts | 226 +++++++------- test/memorygrowth.fromasm.no-opts | 226 +++++++------- 13 files changed, 1419 insertions(+), 1417 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 2d0d1300e..4d2ddb0cd 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1277,7 +1277,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } abort_on("bad unary", ast); } else if (what == IF) { - return builder.makeIf(process(ast[1]), process(ast[2]), !!ast[3] ? process(ast[3]) : nullptr); + auto* condition = process(ast[1]); + auto* ifTrue = process(ast[2]); + return builder.makeIf(condition, ifTrue, !!ast[3] ? process(ast[3]) : nullptr); } else if (what == CALL) { if (ast[1][0] == NAME) { IString name = ast[1][1]->getIString(); diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 31e1ff280..fce0596e6 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -757,8 +757,8 @@ (set_local $1 (get_local $8) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (tee_local $8 (i32.load offset=16 @@ -784,7 +784,7 @@ (set_local $4 (get_local $1) ) - (br $while-out$23) + (br $while-out$6) ) ) ) @@ -821,7 +821,7 @@ (get_local $10) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -852,7 +852,7 @@ (get_local $4) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $9 @@ -899,12 +899,12 @@ (set_local $18 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (tee_local $19 (i32.load @@ -923,7 +923,7 @@ (set_local $10 (get_local $16) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -945,9 +945,9 @@ (get_local $16) ) ) - (br $while-out$27) + (br $while-out$10) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1023,7 +1023,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $2) (block @@ -1071,7 +1071,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1106,7 +1106,7 @@ (get_local $18) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eqz (get_local $18) ) @@ -1534,8 +1534,8 @@ (set_local $4 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $5 @@ -1639,7 +1639,7 @@ (set_local $9 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $8 @@ -1659,7 +1659,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -1854,8 +1854,8 @@ (get_local $9) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $9 (i32.const 0) ) @@ -1905,7 +1905,7 @@ (set_local $29 (get_local $4) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -1929,10 +1929,10 @@ (set_local $12 (get_local $4) ) - (br $while-out$5) + (br $while-out$19) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -1982,7 +1982,7 @@ (get_local $12) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $1 @@ -2029,12 +2029,12 @@ (set_local $11 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (tee_local $16 (i32.load @@ -2053,7 +2053,7 @@ (set_local $7 (get_local $0) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2075,9 +2075,9 @@ (get_local $0) ) ) - (br $while-out$9) + (br $while-out$23) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2153,7 +2153,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $5) (block @@ -2201,7 +2201,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2236,7 +2236,7 @@ (get_local $11) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eqz (get_local $11) ) @@ -2311,7 +2311,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.ge_u (get_local $6) @@ -2438,7 +2438,7 @@ (get_local $4) (get_local $10) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $5 @@ -2603,7 +2603,7 @@ (get_local $4) (get_local $4) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $7 @@ -2630,8 +2630,8 @@ (get_local $5) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -2649,7 +2649,7 @@ (set_local $9 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (if @@ -2693,10 +2693,10 @@ (set_local $9 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3635,8 +3635,8 @@ (set_local $3 (i32.const 624) ) - (loop $do-in$49 - (block $do-out$48 + (loop $do-in$47 + (block $do-out$46 (if (i32.eq (get_local $20) @@ -3674,10 +3674,10 @@ (set_local $9 (i32.const 203) ) - (br $do-out$48) + (br $do-out$46) ) ) - (br_if $do-in$49 + (br_if $do-in$47 (i32.ne (tee_local $3 (i32.load offset=8 @@ -3827,8 +3827,8 @@ (set_local $3 (i32.const 624) ) - (loop $while-in$51 - (block $while-out$50 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -3846,7 +3846,7 @@ (set_local $9 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (if @@ -3861,10 +3861,10 @@ (set_local $28 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) ) - (br $while-in$51) + (br $while-in$49) ) ) (if @@ -3977,7 +3977,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.ne (get_local $6) @@ -4021,7 +4021,7 @@ ) (get_local $1) ) - (br $do-once$52) + (br $do-once$50) ) ) (i32.store @@ -4064,7 +4064,7 @@ (get_local $6) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq (tee_local $21 @@ -4111,12 +4111,12 @@ (set_local $24 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) ) ) - (loop $while-in$62 - (block $while-out$61 + (loop $while-in$56 + (block $while-out$55 (if (tee_local $8 (i32.load @@ -4135,7 +4135,7 @@ (set_local $11 (get_local $2) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4157,9 +4157,9 @@ (get_local $2) ) ) - (br $while-out$61) + (br $while-out$55) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4240,7 +4240,7 @@ (get_local $23) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.ne (get_local $6) @@ -4302,7 +4302,7 @@ (get_local $2) (get_local $24) ) - (br_if $do-once$63 + (br_if $do-once$57 (get_local $24) ) (i32.store @@ -4403,7 +4403,7 @@ (get_local $6) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne (tee_local $11 @@ -4432,7 +4432,7 @@ ) (call_import $_abort) ) - (br_if $do-once$55 + (br_if $do-once$61 (i32.eq (i32.load offset=12 (get_local $11) @@ -4468,7 +4468,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $21) @@ -4504,7 +4504,7 @@ (set_local $42 (get_local $2) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -4583,7 +4583,7 @@ ) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.and (tee_local $23 @@ -4622,7 +4622,7 @@ (set_local $35 (get_local $8) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -4663,7 +4663,7 @@ (get_local $3) (get_local $1) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $2 @@ -4671,7 +4671,7 @@ (i32.const 480) (i32.shl (tee_local $0 - (block $do-once$69 + (block $do-once$67 (if (tee_local $2 (i32.shr_u @@ -4680,7 +4680,7 @@ ) ) (block - (br_if $do-once$69 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $15) @@ -4832,7 +4832,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $14 @@ -4859,8 +4859,8 @@ (get_local $2) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -4878,7 +4878,7 @@ (set_local $9 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (if @@ -4922,10 +4922,10 @@ (set_local $9 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) ) - (br $while-in$72) + (br $while-in$70) ) ) (if @@ -5051,8 +5051,8 @@ ) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$72 + (block $while-out$71 (if (if (i32.le_u @@ -5080,7 +5080,7 @@ (set_local $5 (get_local $15) ) - (br $while-out$73) + (br $while-out$71) ) ) (set_local $28 @@ -5088,7 +5088,7 @@ (get_local $28) ) ) - (br $while-in$74) + (br $while-in$72) ) ) (set_local $15 @@ -5262,7 +5262,7 @@ (i32.const 24) ) ) - (loop $do-in$76 + (loop $do-in$74 (i32.store (tee_local $3 (i32.add @@ -5272,7 +5272,7 @@ ) (i32.const 7) ) - (br_if $do-in$76 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $3) @@ -5599,8 +5599,8 @@ (get_local $6) ) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -5618,7 +5618,7 @@ (set_local $9 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (if @@ -5662,10 +5662,10 @@ (set_local $9 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) ) - (br $while-in$78) + (br $while-in$76) ) ) (if @@ -5804,7 +5804,7 @@ (set_local $2 (i32.const 0) ) - (loop $do-in$47 + (loop $do-in$78 (i32.store offset=12 (tee_local $1 (i32.add @@ -5824,7 +5824,7 @@ (get_local $1) (get_local $1) ) - (br_if $do-in$47 + (br_if $do-in$78 (i32.ne (tee_local $2 (i32.add diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 0b3963290..8ecf57704 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -756,8 +756,8 @@ (set_local $1 (get_local $8) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (tee_local $8 (i32.load offset=16 @@ -783,7 +783,7 @@ (set_local $4 (get_local $1) ) - (br $while-out$23) + (br $while-out$6) ) ) ) @@ -820,7 +820,7 @@ (get_local $10) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -851,7 +851,7 @@ (get_local $4) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $9 @@ -898,12 +898,12 @@ (set_local $18 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (tee_local $19 (i32.load @@ -922,7 +922,7 @@ (set_local $10 (get_local $16) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -944,9 +944,9 @@ (get_local $16) ) ) - (br $while-out$27) + (br $while-out$10) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1022,7 +1022,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $2) (block @@ -1070,7 +1070,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1105,7 +1105,7 @@ (get_local $18) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eqz (get_local $18) ) @@ -1533,8 +1533,8 @@ (set_local $4 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $5 @@ -1638,7 +1638,7 @@ (set_local $9 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $8 @@ -1658,7 +1658,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -1853,8 +1853,8 @@ (get_local $9) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $9 (i32.const 0) ) @@ -1904,7 +1904,7 @@ (set_local $29 (get_local $4) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -1928,10 +1928,10 @@ (set_local $12 (get_local $4) ) - (br $while-out$5) + (br $while-out$19) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -1981,7 +1981,7 @@ (get_local $12) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $1 @@ -2028,12 +2028,12 @@ (set_local $11 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (tee_local $16 (i32.load @@ -2052,7 +2052,7 @@ (set_local $7 (get_local $0) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2074,9 +2074,9 @@ (get_local $0) ) ) - (br $while-out$9) + (br $while-out$23) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2152,7 +2152,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $5) (block @@ -2200,7 +2200,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2235,7 +2235,7 @@ (get_local $11) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eqz (get_local $11) ) @@ -2310,7 +2310,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.ge_u (get_local $6) @@ -2437,7 +2437,7 @@ (get_local $4) (get_local $10) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $5 @@ -2602,7 +2602,7 @@ (get_local $4) (get_local $4) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $7 @@ -2629,8 +2629,8 @@ (get_local $5) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -2648,7 +2648,7 @@ (set_local $9 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (if @@ -2692,10 +2692,10 @@ (set_local $9 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3634,8 +3634,8 @@ (set_local $3 (i32.const 624) ) - (loop $do-in$49 - (block $do-out$48 + (loop $do-in$47 + (block $do-out$46 (if (i32.eq (get_local $20) @@ -3673,10 +3673,10 @@ (set_local $9 (i32.const 203) ) - (br $do-out$48) + (br $do-out$46) ) ) - (br_if $do-in$49 + (br_if $do-in$47 (i32.ne (tee_local $3 (i32.load offset=8 @@ -3826,8 +3826,8 @@ (set_local $3 (i32.const 624) ) - (loop $while-in$51 - (block $while-out$50 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -3845,7 +3845,7 @@ (set_local $9 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (if @@ -3860,10 +3860,10 @@ (set_local $28 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) ) - (br $while-in$51) + (br $while-in$49) ) ) (if @@ -3976,7 +3976,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.ne (get_local $6) @@ -4020,7 +4020,7 @@ ) (get_local $1) ) - (br $do-once$52) + (br $do-once$50) ) ) (i32.store @@ -4063,7 +4063,7 @@ (get_local $6) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq (tee_local $21 @@ -4110,12 +4110,12 @@ (set_local $24 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) ) ) - (loop $while-in$62 - (block $while-out$61 + (loop $while-in$56 + (block $while-out$55 (if (tee_local $8 (i32.load @@ -4134,7 +4134,7 @@ (set_local $11 (get_local $2) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4156,9 +4156,9 @@ (get_local $2) ) ) - (br $while-out$61) + (br $while-out$55) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4239,7 +4239,7 @@ (get_local $23) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.ne (get_local $6) @@ -4301,7 +4301,7 @@ (get_local $2) (get_local $24) ) - (br_if $do-once$63 + (br_if $do-once$57 (get_local $24) ) (i32.store @@ -4402,7 +4402,7 @@ (get_local $6) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne (tee_local $11 @@ -4431,7 +4431,7 @@ ) (call_import $_abort) ) - (br_if $do-once$55 + (br_if $do-once$61 (i32.eq (i32.load offset=12 (get_local $11) @@ -4467,7 +4467,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $21) @@ -4503,7 +4503,7 @@ (set_local $42 (get_local $2) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -4582,7 +4582,7 @@ ) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.and (tee_local $23 @@ -4621,7 +4621,7 @@ (set_local $35 (get_local $8) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -4662,7 +4662,7 @@ (get_local $3) (get_local $1) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $2 @@ -4670,7 +4670,7 @@ (i32.const 480) (i32.shl (tee_local $0 - (block $do-once$69 + (block $do-once$67 (if (tee_local $2 (i32.shr_u @@ -4679,7 +4679,7 @@ ) ) (block - (br_if $do-once$69 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $15) @@ -4831,7 +4831,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $14 @@ -4858,8 +4858,8 @@ (get_local $2) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -4877,7 +4877,7 @@ (set_local $9 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (if @@ -4921,10 +4921,10 @@ (set_local $9 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) ) - (br $while-in$72) + (br $while-in$70) ) ) (if @@ -5050,8 +5050,8 @@ ) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$72 + (block $while-out$71 (if (if (i32.le_u @@ -5079,7 +5079,7 @@ (set_local $5 (get_local $15) ) - (br $while-out$73) + (br $while-out$71) ) ) (set_local $28 @@ -5087,7 +5087,7 @@ (get_local $28) ) ) - (br $while-in$74) + (br $while-in$72) ) ) (set_local $15 @@ -5261,7 +5261,7 @@ (i32.const 24) ) ) - (loop $do-in$76 + (loop $do-in$74 (i32.store (tee_local $3 (i32.add @@ -5271,7 +5271,7 @@ ) (i32.const 7) ) - (br_if $do-in$76 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $3) @@ -5598,8 +5598,8 @@ (get_local $6) ) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -5617,7 +5617,7 @@ (set_local $9 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (if @@ -5661,10 +5661,10 @@ (set_local $9 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) ) - (br $while-in$78) + (br $while-in$76) ) ) (if @@ -5803,7 +5803,7 @@ (set_local $2 (i32.const 0) ) - (loop $do-in$47 + (loop $do-in$78 (i32.store offset=12 (tee_local $1 (i32.add @@ -5823,7 +5823,7 @@ (get_local $1) (get_local $1) ) - (br_if $do-in$47 + (br_if $do-in$78 (i32.ne (tee_local $2 (i32.add diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index af4655d11..163015994 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -227,7 +227,7 @@ (get_local $i10) ) ) - (block $do-once$19 + (block $do-once$2 (if (i32.ne (get_local $i7) @@ -265,7 +265,7 @@ (get_local $i8) (get_local $i11) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $_abort) ) @@ -498,7 +498,7 @@ (get_local $i12) ) ) - (block $do-once$21 + (block $do-once$4 (if (i32.ne (get_local $i15) @@ -541,7 +541,7 @@ (i32.const 184) ) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $_abort) ) @@ -880,8 +880,8 @@ (set_local $i7 (get_local $i10) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $i10 (i32.load (i32.add @@ -914,7 +914,7 @@ (set_local $i22 (get_local $i7) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $i23 (get_local $i15) @@ -962,7 +962,7 @@ (get_local $i7) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $i7 @@ -1006,7 +1006,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (get_local $i12) @@ -1048,7 +1048,7 @@ (set_local $i24 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $i25 @@ -1069,8 +1069,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $i14 (i32.add (get_local $i25) @@ -1091,7 +1091,7 @@ (set_local $i26 (get_local $i14) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $i14 @@ -1116,7 +1116,7 @@ (set_local $i28 (get_local $i26) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $i25 @@ -1127,7 +1127,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1144,7 +1144,7 @@ (set_local $i24 (get_local $i27) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -1204,14 +1204,14 @@ (set_local $i24 (get_local $i12) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $_abort) ) ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $i5) (block @@ -1264,7 +1264,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1307,7 +1307,7 @@ (i32.eqz (get_local $i24) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1338,7 +1338,7 @@ ) ) ) - (block $do-once$31 + (block $do-once$14 (if (get_local $i7) (if @@ -1362,7 +1362,7 @@ ) (get_local $i24) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -1400,7 +1400,7 @@ ) (get_local $i24) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1833,8 +1833,8 @@ (set_local $i8 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $i16 (i32.and (i32.load @@ -1957,7 +1957,7 @@ (set_local $i36 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $i12 @@ -1983,7 +1983,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -2185,8 +2185,8 @@ (get_local $i36) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $i36 (i32.const 0) ) @@ -2247,7 +2247,7 @@ (set_local $i36 (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $i38 @@ -2269,7 +2269,7 @@ (set_local $i44 (get_local $i8) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $i37 @@ -2283,7 +2283,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2346,7 +2346,7 @@ ) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (get_local $i7) @@ -2388,7 +2388,7 @@ (set_local $i45 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $i46 @@ -2409,8 +2409,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $i2 (i32.add (get_local $i46) @@ -2431,7 +2431,7 @@ (set_local $i47 (get_local $i2) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $i2 @@ -2456,7 +2456,7 @@ (set_local $i49 (get_local $i47) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $i46 @@ -2467,7 +2467,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2484,7 +2484,7 @@ (set_local $i45 (get_local $i48) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -2544,14 +2544,14 @@ (set_local $i45 (get_local $i7) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $_abort) ) ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $i3) (block @@ -2604,7 +2604,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2647,7 +2647,7 @@ (i32.eqz (get_local $i45) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2678,7 +2678,7 @@ ) ) ) - (block $do-once$13 + (block $do-once$27 (if (get_local $i15) (if @@ -2702,7 +2702,7 @@ ) (get_local $i45) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -2740,14 +2740,14 @@ ) (get_local $i45) ) - (br $do-once$11) + (br $do-once$25) ) ) ) ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.ge_u (get_local $i43) @@ -2895,7 +2895,7 @@ ) (get_local $i15) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $i15 @@ -3092,7 +3092,7 @@ ) (get_local $i8) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $i4 @@ -3119,8 +3119,8 @@ (get_local $i3) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -3141,7 +3141,7 @@ (set_local $i36 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $i3 @@ -3178,7 +3178,7 @@ (set_local $i36 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $i4 @@ -3192,7 +3192,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3234,7 +3234,7 @@ ) (get_local $i8) ) - (br $do-once$15) + (br $do-once$29) ) ) (if @@ -3303,7 +3303,7 @@ ) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $_abort) ) @@ -4283,8 +4283,8 @@ (set_local $i63 (i32.const 624) ) - (loop $do-in$49 - (block $do-out$48 + (loop $do-in$47 + (block $do-out$46 (set_local $i43 (i32.load (get_local $i63) @@ -4325,7 +4325,7 @@ (set_local $i36 (i32.const 203) ) - (br $do-out$48) + (br $do-out$46) ) ) (set_local $i63 @@ -4336,7 +4336,7 @@ ) ) ) - (br_if $do-in$49 + (br_if $do-in$47 (i32.ne (get_local $i63) (i32.const 0) @@ -4496,8 +4496,8 @@ (set_local $i63 (i32.const 624) ) - (loop $while-in$51 - (block $while-out$50 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -4515,7 +4515,7 @@ (set_local $i36 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (set_local $i63 @@ -4534,10 +4534,10 @@ (set_local $i71 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) ) - (br $while-in$51) + (br $while-in$49) ) ) (if @@ -4658,7 +4658,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.ne (get_local $i43) @@ -4706,7 +4706,7 @@ ) (get_local $i62) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i62 @@ -4761,7 +4761,7 @@ ) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq (get_local $i55) @@ -4803,7 +4803,7 @@ (set_local $i72 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $i73 @@ -4824,8 +4824,8 @@ ) ) ) - (loop $while-in$62 - (block $while-out$61 + (loop $while-in$56 + (block $while-out$55 (set_local $i5 (i32.add (get_local $i73) @@ -4846,7 +4846,7 @@ (set_local $i74 (get_local $i5) ) - (br $while-in$62) + (br $while-in$56) ) ) (set_local $i5 @@ -4871,7 +4871,7 @@ (set_local $i76 (get_local $i74) ) - (br $while-out$61) + (br $while-out$55) ) (block (set_local $i73 @@ -4882,7 +4882,7 @@ ) ) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4899,7 +4899,7 @@ (set_local $i72 (get_local $i75) ) - (br $do-once$59) + (br $do-once$53) ) ) ) @@ -4959,7 +4959,7 @@ (set_local $i72 (get_local $i55) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $_abort) ) @@ -4989,7 +4989,7 @@ ) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.ne (get_local $i43) @@ -5046,7 +5046,7 @@ ) (if (get_local $i72) - (br $do-once$63) + (br $do-once$57) ) (i32.store (i32.const 180) @@ -5097,7 +5097,7 @@ (get_local $i5) ) ) - (block $do-once$65 + (block $do-once$59 (if (get_local $i45) (if @@ -5121,7 +5121,7 @@ ) (get_local $i72) ) - (br $do-once$65) + (br $do-once$59) ) ) ) @@ -5196,7 +5196,7 @@ ) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne (get_local $i45) @@ -5220,7 +5220,7 @@ ) (get_local $i43) ) - (br $do-once$55) + (br $do-once$61) ) (call_import $_abort) ) @@ -5250,7 +5250,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $i55) @@ -5287,7 +5287,7 @@ (set_local $i77 (get_local $i5) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -5397,7 +5397,7 @@ (get_local $i56) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eqz (i32.and @@ -5449,7 +5449,7 @@ (set_local $i81 (get_local $i52) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -5481,7 +5481,7 @@ ) (get_local $i62) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i5 @@ -5490,7 +5490,7 @@ (i32.const 8) ) ) - (block $do-once$69 + (block $do-once$67 (if (i32.eqz (get_local $i5) @@ -5508,7 +5508,7 @@ (set_local $i82 (i32.const 31) ) - (br $do-once$69) + (br $do-once$67) ) ) (set_local $i54 @@ -5685,7 +5685,7 @@ ) (get_local $i63) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i50 @@ -5712,8 +5712,8 @@ (get_local $i5) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -5734,7 +5734,7 @@ (set_local $i36 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $i5 @@ -5771,7 +5771,7 @@ (set_local $i36 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $i50 @@ -5785,7 +5785,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) ) (if @@ -5827,7 +5827,7 @@ ) (get_local $i63) ) - (br $do-once$52) + (br $do-once$50) ) ) (if @@ -5896,7 +5896,7 @@ ) (i32.const 0) ) - (br $do-once$52) + (br $do-once$50) ) (call_import $_abort) ) @@ -5949,8 +5949,8 @@ ) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$72 + (block $while-out$71 (set_local $i63 (i32.load (get_local $i71) @@ -5985,7 +5985,7 @@ (set_local $i86 (get_local $i53) ) - (br $while-out$73) + (br $while-out$71) ) ) (set_local $i71 @@ -5996,7 +5996,7 @@ ) ) ) - (br $while-in$74) + (br $while-in$72) ) ) (set_local $i44 @@ -6194,8 +6194,8 @@ (i32.const 24) ) ) - (loop $do-in$76 - (block $do-out$75 + (loop $do-in$74 + (block $do-out$73 (set_local $i63 (i32.add (get_local $i63) @@ -6206,7 +6206,7 @@ (get_local $i63) (i32.const 7) ) - (br_if $do-in$76 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $i63) @@ -6584,8 +6584,8 @@ (get_local $i43) ) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -6606,7 +6606,7 @@ (set_local $i36 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $i43 @@ -6643,7 +6643,7 @@ (set_local $i36 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $i5 @@ -6657,7 +6657,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) ) (if @@ -6825,8 +6825,8 @@ (set_local $i5 (i32.const 0) ) - (loop $do-in$47 - (block $do-out$46 + (loop $do-in$78 + (block $do-out$77 (set_local $i62 (i32.add (i32.const 216) @@ -6859,7 +6859,7 @@ (i32.const 1) ) ) - (br_if $do-in$47 + (br_if $do-in$78 (i32.ne (get_local $i5) (i32.const 32) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 648738c11..d8589967a 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -228,7 +228,7 @@ (get_local $i10) ) ) - (block $do-once$19 + (block $do-once$2 (if (i32.ne (get_local $i7) @@ -266,7 +266,7 @@ (get_local $i8) (get_local $i11) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $_abort) ) @@ -499,7 +499,7 @@ (get_local $i12) ) ) - (block $do-once$21 + (block $do-once$4 (if (i32.ne (get_local $i15) @@ -542,7 +542,7 @@ (i32.const 184) ) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $_abort) ) @@ -881,8 +881,8 @@ (set_local $i7 (get_local $i10) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $i10 (i32.load (i32.add @@ -915,7 +915,7 @@ (set_local $i22 (get_local $i7) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $i23 (get_local $i15) @@ -963,7 +963,7 @@ (get_local $i7) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $i7 @@ -1007,7 +1007,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (get_local $i12) @@ -1049,7 +1049,7 @@ (set_local $i24 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $i25 @@ -1070,8 +1070,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $i14 (i32.add (get_local $i25) @@ -1092,7 +1092,7 @@ (set_local $i26 (get_local $i14) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $i14 @@ -1117,7 +1117,7 @@ (set_local $i28 (get_local $i26) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $i25 @@ -1128,7 +1128,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1145,7 +1145,7 @@ (set_local $i24 (get_local $i27) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -1205,14 +1205,14 @@ (set_local $i24 (get_local $i12) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $_abort) ) ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $i5) (block @@ -1265,7 +1265,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1308,7 +1308,7 @@ (i32.eqz (get_local $i24) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1339,7 +1339,7 @@ ) ) ) - (block $do-once$31 + (block $do-once$14 (if (get_local $i7) (if @@ -1363,7 +1363,7 @@ ) (get_local $i24) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -1401,7 +1401,7 @@ ) (get_local $i24) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1834,8 +1834,8 @@ (set_local $i8 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $i16 (i32.and (i32.load @@ -1958,7 +1958,7 @@ (set_local $i36 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $i12 @@ -1984,7 +1984,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -2186,8 +2186,8 @@ (get_local $i36) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $i36 (i32.const 0) ) @@ -2248,7 +2248,7 @@ (set_local $i36 (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $i38 @@ -2270,7 +2270,7 @@ (set_local $i44 (get_local $i8) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $i37 @@ -2284,7 +2284,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2347,7 +2347,7 @@ ) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (get_local $i7) @@ -2389,7 +2389,7 @@ (set_local $i45 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $i46 @@ -2410,8 +2410,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $i2 (i32.add (get_local $i46) @@ -2432,7 +2432,7 @@ (set_local $i47 (get_local $i2) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $i2 @@ -2457,7 +2457,7 @@ (set_local $i49 (get_local $i47) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $i46 @@ -2468,7 +2468,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2485,7 +2485,7 @@ (set_local $i45 (get_local $i48) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -2545,14 +2545,14 @@ (set_local $i45 (get_local $i7) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $_abort) ) ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $i3) (block @@ -2605,7 +2605,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2648,7 +2648,7 @@ (i32.eqz (get_local $i45) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2679,7 +2679,7 @@ ) ) ) - (block $do-once$13 + (block $do-once$27 (if (get_local $i15) (if @@ -2703,7 +2703,7 @@ ) (get_local $i45) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -2741,14 +2741,14 @@ ) (get_local $i45) ) - (br $do-once$11) + (br $do-once$25) ) ) ) ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.ge_u (get_local $i43) @@ -2896,7 +2896,7 @@ ) (get_local $i15) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $i15 @@ -3093,7 +3093,7 @@ ) (get_local $i8) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $i4 @@ -3120,8 +3120,8 @@ (get_local $i3) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -3142,7 +3142,7 @@ (set_local $i36 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $i3 @@ -3179,7 +3179,7 @@ (set_local $i36 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $i4 @@ -3193,7 +3193,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3235,7 +3235,7 @@ ) (get_local $i8) ) - (br $do-once$15) + (br $do-once$29) ) ) (if @@ -3304,7 +3304,7 @@ ) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $_abort) ) @@ -4284,8 +4284,8 @@ (set_local $i63 (i32.const 624) ) - (loop $do-in$49 - (block $do-out$48 + (loop $do-in$47 + (block $do-out$46 (set_local $i43 (i32.load (get_local $i63) @@ -4326,7 +4326,7 @@ (set_local $i36 (i32.const 203) ) - (br $do-out$48) + (br $do-out$46) ) ) (set_local $i63 @@ -4337,7 +4337,7 @@ ) ) ) - (br_if $do-in$49 + (br_if $do-in$47 (i32.ne (get_local $i63) (i32.const 0) @@ -4497,8 +4497,8 @@ (set_local $i63 (i32.const 624) ) - (loop $while-in$51 - (block $while-out$50 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -4516,7 +4516,7 @@ (set_local $i36 (i32.const 211) ) - (br $while-out$50) + (br $while-out$48) ) ) (set_local $i63 @@ -4535,10 +4535,10 @@ (set_local $i71 (i32.const 624) ) - (br $while-out$50) + (br $while-out$48) ) ) - (br $while-in$51) + (br $while-in$49) ) ) (if @@ -4659,7 +4659,7 @@ (i32.const 3) ) ) - (block $do-once$52 + (block $do-once$50 (if (i32.ne (get_local $i43) @@ -4707,7 +4707,7 @@ ) (get_local $i62) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i62 @@ -4762,7 +4762,7 @@ ) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.eq (get_local $i55) @@ -4804,7 +4804,7 @@ (set_local $i72 (i32.const 0) ) - (br $do-once$59) + (br $do-once$53) ) (block (set_local $i73 @@ -4825,8 +4825,8 @@ ) ) ) - (loop $while-in$62 - (block $while-out$61 + (loop $while-in$56 + (block $while-out$55 (set_local $i5 (i32.add (get_local $i73) @@ -4847,7 +4847,7 @@ (set_local $i74 (get_local $i5) ) - (br $while-in$62) + (br $while-in$56) ) ) (set_local $i5 @@ -4872,7 +4872,7 @@ (set_local $i76 (get_local $i74) ) - (br $while-out$61) + (br $while-out$55) ) (block (set_local $i73 @@ -4883,7 +4883,7 @@ ) ) ) - (br $while-in$62) + (br $while-in$56) ) ) (if @@ -4900,7 +4900,7 @@ (set_local $i72 (get_local $i75) ) - (br $do-once$59) + (br $do-once$53) ) ) ) @@ -4960,7 +4960,7 @@ (set_local $i72 (get_local $i55) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $_abort) ) @@ -4990,7 +4990,7 @@ ) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.ne (get_local $i43) @@ -5047,7 +5047,7 @@ ) (if (get_local $i72) - (br $do-once$63) + (br $do-once$57) ) (i32.store (i32.const 180) @@ -5098,7 +5098,7 @@ (get_local $i5) ) ) - (block $do-once$65 + (block $do-once$59 (if (get_local $i45) (if @@ -5122,7 +5122,7 @@ ) (get_local $i72) ) - (br $do-once$65) + (br $do-once$59) ) ) ) @@ -5197,7 +5197,7 @@ ) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.ne (get_local $i45) @@ -5221,7 +5221,7 @@ ) (get_local $i43) ) - (br $do-once$55) + (br $do-once$61) ) (call_import $_abort) ) @@ -5251,7 +5251,7 @@ (br $label$break$L331) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $i55) @@ -5288,7 +5288,7 @@ (set_local $i77 (get_local $i5) ) - (br $do-once$57) + (br $do-once$63) ) ) (call_import $_abort) @@ -5398,7 +5398,7 @@ (get_local $i56) ) ) - (block $do-once$67 + (block $do-once$65 (if (i32.eqz (i32.and @@ -5450,7 +5450,7 @@ (set_local $i81 (get_local $i52) ) - (br $do-once$67) + (br $do-once$65) ) ) (call_import $_abort) @@ -5482,7 +5482,7 @@ ) (get_local $i62) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i5 @@ -5491,7 +5491,7 @@ (i32.const 8) ) ) - (block $do-once$69 + (block $do-once$67 (if (i32.eqz (get_local $i5) @@ -5509,7 +5509,7 @@ (set_local $i82 (i32.const 31) ) - (br $do-once$69) + (br $do-once$67) ) ) (set_local $i54 @@ -5686,7 +5686,7 @@ ) (get_local $i63) ) - (br $do-once$52) + (br $do-once$50) ) ) (set_local $i50 @@ -5713,8 +5713,8 @@ (get_local $i5) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -5735,7 +5735,7 @@ (set_local $i36 (i32.const 281) ) - (br $while-out$71) + (br $while-out$69) ) ) (set_local $i5 @@ -5772,7 +5772,7 @@ (set_local $i36 (i32.const 278) ) - (br $while-out$71) + (br $while-out$69) ) (block (set_local $i50 @@ -5786,7 +5786,7 @@ ) ) ) - (br $while-in$72) + (br $while-in$70) ) ) (if @@ -5828,7 +5828,7 @@ ) (get_local $i63) ) - (br $do-once$52) + (br $do-once$50) ) ) (if @@ -5897,7 +5897,7 @@ ) (i32.const 0) ) - (br $do-once$52) + (br $do-once$50) ) (call_import $_abort) ) @@ -5950,8 +5950,8 @@ ) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$72 + (block $while-out$71 (set_local $i63 (i32.load (get_local $i71) @@ -5986,7 +5986,7 @@ (set_local $i86 (get_local $i53) ) - (br $while-out$73) + (br $while-out$71) ) ) (set_local $i71 @@ -5997,7 +5997,7 @@ ) ) ) - (br $while-in$74) + (br $while-in$72) ) ) (set_local $i44 @@ -6195,8 +6195,8 @@ (i32.const 24) ) ) - (loop $do-in$76 - (block $do-out$75 + (loop $do-in$74 + (block $do-out$73 (set_local $i63 (i32.add (get_local $i63) @@ -6207,7 +6207,7 @@ (get_local $i63) (i32.const 7) ) - (br_if $do-in$76 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $i63) @@ -6585,8 +6585,8 @@ (get_local $i43) ) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -6607,7 +6607,7 @@ (set_local $i36 (i32.const 307) ) - (br $while-out$77) + (br $while-out$75) ) ) (set_local $i43 @@ -6644,7 +6644,7 @@ (set_local $i36 (i32.const 304) ) - (br $while-out$77) + (br $while-out$75) ) (block (set_local $i5 @@ -6658,7 +6658,7 @@ ) ) ) - (br $while-in$78) + (br $while-in$76) ) ) (if @@ -6826,8 +6826,8 @@ (set_local $i5 (i32.const 0) ) - (loop $do-in$47 - (block $do-out$46 + (loop $do-in$78 + (block $do-out$77 (set_local $i62 (i32.add (i32.const 216) @@ -6860,7 +6860,7 @@ (i32.const 1) ) ) - (br_if $do-in$47 + (br_if $do-in$78 (i32.ne (get_local $i5) (i32.const 32) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 1475e4676..78c577bbf 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -7168,8 +7168,8 @@ ) ) ) - (loop $while-in$115 - (block $while-out$114 + (loop $while-in$109 + (block $while-out$108 (set_local $5 (call $_fmt_u (i32.load @@ -7179,7 +7179,7 @@ (get_local $45) ) ) - (block $do-once$116 + (block $do-once$110 (if (i32.eq (get_local $7) @@ -7191,7 +7191,7 @@ (get_local $5) (get_local $45) ) - (br $do-once$116) + (br $do-once$110) ) (i32.store8 (get_local $53) @@ -7207,10 +7207,10 @@ (get_local $5) (get_local $29) ) - (br $do-once$116) + (br $do-once$110) ) - (loop $while-in$119 - (block $while-out$118 + (loop $while-in$113 + (block $while-out$112 (i32.store8 (tee_local $5 (i32.add @@ -7225,9 +7225,9 @@ (get_local $5) (get_local $29) ) - (br $while-out$118) + (br $while-out$112) ) - (br $while-in$119) + (br $while-in$113) ) ) ) @@ -7266,20 +7266,20 @@ (set_local $5 (get_local $7) ) - (br $while-out$114) + (br $while-out$108) ) ) - (br $while-in$115) + (br $while-in$109) ) ) - (block $do-once$120 + (block $do-once$114 (if (i32.ne (get_local $1) (i32.const 0) ) (block - (br_if $do-once$120 + (br_if $do-once$114 (i32.ne (i32.and (i32.load @@ -7309,8 +7309,8 @@ (get_local $23) ) ) - (loop $while-in$123 - (block $while-out$122 + (loop $while-in$117 + (block $while-out$116 (if (i32.gt_u (tee_local $1 @@ -7324,8 +7324,8 @@ ) (get_local $29) ) - (loop $while-in$125 - (block $while-out$124 + (loop $while-in$119 + (block $while-out$118 (i32.store8 (tee_local $1 (i32.add @@ -7340,9 +7340,9 @@ (get_local $1) (get_local $29) ) - (br $while-out$124) + (br $while-out$118) ) - (br $while-in$125) + (br $while-in$119) ) ) ) @@ -7398,10 +7398,10 @@ (set_local $15 (get_local $1) ) - (br $while-out$122) + (br $while-out$116) ) ) - (br $while-in$123) + (br $while-in$117) ) ) ) @@ -7442,8 +7442,8 @@ (set_local $5 (get_local $7) ) - (loop $while-in$109 - (block $while-out$108 + (loop $while-in$121 + (block $while-out$120 (set_local $8 (if (i32.eq @@ -7468,7 +7468,7 @@ (get_local $1) ) ) - (block $do-once$110 + (block $do-once$122 (if (i32.eq (get_local $5) @@ -7505,7 +7505,7 @@ (i32.const 1) ) ) - (br $do-once$110) + (br $do-once$122) ) (if (i32.ne @@ -7517,7 +7517,7 @@ ) (i32.const 0) ) - (br $do-once$110) + (br $do-once$122) ) (call $___fwritex (i32.const 4143) @@ -7538,11 +7538,11 @@ (set_local $1 (get_local $8) ) - (br $do-once$110) + (br $do-once$122) ) ) - (loop $while-in$113 - (block $while-out$112 + (loop $while-in$125 + (block $while-out$124 (i32.store8 (tee_local $1 (i32.add @@ -7557,9 +7557,9 @@ (get_local $1) (get_local $29) ) - (br $while-out$112) + (br $while-out$124) ) - (br $while-in$113) + (br $while-in$125) ) ) ) @@ -7617,9 +7617,9 @@ ) ) ) - (br $while-out$108) + (br $while-out$120) ) - (br $while-in$109) + (br $while-in$121) ) ) ) @@ -7871,8 +7871,8 @@ (set_local $6 (get_local $28) ) - (loop $while-in$134 - (block $while-out$133 + (loop $while-in$130 + (block $while-out$129 (i32.store8 (tee_local $6 (i32.add @@ -7920,9 +7920,9 @@ (i32.const 0) ) ) - (br $while-out$133) + (br $while-out$129) ) - (br $while-in$134) + (br $while-in$130) ) ) (if @@ -8101,8 +8101,8 @@ (get_local $19) ) ) - (loop $while-in$130 - (block $while-out$129 + (loop $while-in$132 + (block $while-out$131 (if (i32.eq (tee_local $1 @@ -8112,7 +8112,7 @@ ) (i32.const 0) ) - (br $while-out$129) + (br $while-out$131) ) (if (i32.or @@ -8133,7 +8133,7 @@ ) ) ) - (br $while-out$129) + (br $while-out$131) ) (set_local $6 (i32.add @@ -8158,10 +8158,10 @@ (set_local $7 (get_local $1) ) - (br $while-out$129) + (br $while-out$131) ) ) - (br $while-in$130) + (br $while-in$132) ) ) (if @@ -8205,8 +8205,8 @@ (get_local $19) ) ) - (loop $while-in$132 - (block $while-out$131 + (loop $while-in$134 + (block $while-out$133 (if (i32.eq (tee_local $1 @@ -8288,10 +8288,10 @@ (set_local $12 (i32.const 98) ) - (br $while-out$131) + (br $while-out$133) ) ) - (br $while-in$132) + (br $while-in$134) ) ) ) @@ -10189,8 +10189,8 @@ (set_local $8 (get_local $0) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (i32.eq (tee_local $0 @@ -10216,7 +10216,7 @@ (set_local $10 (get_local $8) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $1 (get_local $0) @@ -10259,7 +10259,7 @@ (get_local $0) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -10290,7 +10290,7 @@ (get_local $10) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $2 @@ -10333,7 +10333,7 @@ (set_local $15 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (set_local $4 (get_local $2) @@ -10343,8 +10343,8 @@ (get_local $2) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (i32.ne (tee_local $2 @@ -10366,7 +10366,7 @@ (set_local $8 (get_local $5) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -10383,7 +10383,7 @@ ) (i32.const 0) ) - (br $while-out$27) + (br $while-out$10) (block (set_local $4 (get_local $2) @@ -10393,7 +10393,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -10469,7 +10469,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (i32.ne (get_local $1) @@ -10521,7 +10521,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -10556,7 +10556,7 @@ (get_local $15) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eq (get_local $15) (i32.const 0) @@ -11034,8 +11034,8 @@ (set_local $36 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $16 @@ -11152,7 +11152,7 @@ (set_local $11 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $7 @@ -11163,7 +11163,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -11351,8 +11351,8 @@ (get_local $11) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $11 (i32.const 0) ) @@ -11405,7 +11405,7 @@ (set_local $29 (get_local $3) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -11421,7 +11421,7 @@ (set_local $13 (get_local $3) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $26 @@ -11435,7 +11435,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -11486,7 +11486,7 @@ (get_local $13) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $2 @@ -11529,7 +11529,7 @@ (set_local $6 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (set_local $8 (get_local $2) @@ -11539,8 +11539,8 @@ (get_local $2) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (i32.ne (tee_local $2 @@ -11562,7 +11562,7 @@ (set_local $9 (get_local $7) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -11579,7 +11579,7 @@ ) (i32.const 0) ) - (br $while-out$9) + (br $while-out$23) (block (set_local $8 (get_local $2) @@ -11589,7 +11589,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -11665,7 +11665,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (i32.ne (get_local $1) @@ -11717,7 +11717,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -11752,7 +11752,7 @@ (get_local $6) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eq (get_local $6) (i32.const 0) @@ -11834,7 +11834,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $17) @@ -11998,7 +11998,7 @@ (get_local $3) (get_local $2) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $2 @@ -12172,7 +12172,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $1 @@ -12199,8 +12199,8 @@ (get_local $2) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -12218,7 +12218,7 @@ (set_local $11 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $4 @@ -12260,7 +12260,7 @@ (set_local $11 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $1 @@ -12271,7 +12271,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -13229,8 +13229,8 @@ (set_local $1 (i32.const 0) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$47 + (block $while-out$46 (i32.store offset=12 (tee_local $0 (i32.add @@ -13260,9 +13260,9 @@ ) (i32.const 32) ) - (br $while-out$77) + (br $while-out$46) ) - (br $while-in$78) + (br $while-in$47) ) ) (set_local $1 @@ -13337,8 +13337,8 @@ (set_local $7 (i32.const 624) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (get_local $14) @@ -13376,7 +13376,7 @@ (set_local $11 (i32.const 203) ) - (br $while-out$46) + (br $while-out$48) ) ) (if @@ -13388,12 +13388,12 @@ ) (i32.const 0) ) - (br $while-out$46) + (br $while-out$48) (set_local $7 (get_local $4) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -13535,8 +13535,8 @@ (set_local $1 (i32.const 624) ) - (loop $while-in$49 - (block $while-out$48 + (loop $while-in$51 + (block $while-out$50 (if (i32.eq (i32.load @@ -13554,7 +13554,7 @@ (set_local $11 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (if @@ -13570,10 +13570,10 @@ (set_local $27 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) ) (if @@ -13696,7 +13696,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.eq (get_local $3) @@ -13764,7 +13764,7 @@ ) (get_local $0) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $0 @@ -13809,7 +13809,7 @@ (get_local $3) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne (tee_local $0 @@ -13838,7 +13838,7 @@ ) (call_import $_abort) ) - (br_if $do-once$61 + (br_if $do-once$55 (i32.eq (i32.load offset=12 (get_local $0) @@ -13874,7 +13874,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $1) @@ -13910,7 +13910,7 @@ (set_local $39 (get_local $2) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -13932,7 +13932,7 @@ (get_local $3) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq (tee_local $1 @@ -13975,7 +13975,7 @@ (set_local $18 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $2 @@ -13990,8 +13990,8 @@ (get_local $1) ) ) - (loop $while-in$56 - (block $while-out$55 + (loop $while-in$62 + (block $while-out$61 (if (i32.ne (tee_local $1 @@ -14013,7 +14013,7 @@ (set_local $9 (get_local $20) ) - (br $while-in$56) + (br $while-in$62) ) ) (if @@ -14030,7 +14030,7 @@ ) (i32.const 0) ) - (br $while-out$55) + (br $while-out$61) (block (set_local $2 (get_local $1) @@ -14040,7 +14040,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) ) (if @@ -14122,7 +14122,7 @@ (i32.const 0) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $3) @@ -14147,7 +14147,7 @@ (get_local $2) (get_local $18) ) - (br_if $do-once$57 + (br_if $do-once$63 (i32.ne (get_local $18) (i32.const 0) @@ -14356,7 +14356,7 @@ ) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eq (i32.and @@ -14416,7 +14416,7 @@ (set_local $33 (get_local $1) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -14439,7 +14439,7 @@ (get_local $5) (get_local $2) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $2 @@ -14447,7 +14447,7 @@ (i32.const 480) (i32.shl (tee_local $1 - (block $do-once$67 + (block $do-once$69 (if (i32.eq (tee_local $0 @@ -14460,7 +14460,7 @@ ) (i32.const 0) (block - (br_if $do-once$67 + (br_if $do-once$69 (i32.const 31) (i32.gt_u (get_local $4) @@ -14615,7 +14615,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $1 @@ -14642,8 +14642,8 @@ (get_local $2) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (if (i32.eq (i32.and @@ -14661,7 +14661,7 @@ (set_local $11 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $8 @@ -14703,7 +14703,7 @@ (set_local $11 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $1 @@ -14714,7 +14714,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (if @@ -14819,8 +14819,8 @@ ) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$74 + (block $while-out$73 (if (i32.le_u (tee_local $1 @@ -14846,7 +14846,7 @@ (set_local $2 (get_local $1) ) - (br $while-out$71) + (br $while-out$73) ) ) ) @@ -14855,7 +14855,7 @@ (get_local $27) ) ) - (br $while-in$72) + (br $while-in$74) ) ) (set_local $8 @@ -15037,8 +15037,8 @@ (i32.const 24) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (i32.store (tee_local $1 (i32.add @@ -15056,9 +15056,9 @@ ) (get_local $2) ) - (br $while-out$73) + (br $while-out$75) ) - (br $while-in$74) + (br $while-in$76) ) ) (if @@ -15390,8 +15390,8 @@ (get_local $4) ) ) - (loop $while-in$76 - (block $while-out$75 + (loop $while-in$78 + (block $while-out$77 (if (i32.eq (i32.and @@ -15409,7 +15409,7 @@ (set_local $11 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $8 @@ -15451,7 +15451,7 @@ (set_local $11 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $2 @@ -15462,7 +15462,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) ) (if diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 1b3f505aa..d6c27e3c4 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -7162,8 +7162,8 @@ ) ) ) - (loop $while-in$115 - (block $while-out$114 + (loop $while-in$109 + (block $while-out$108 (set_local $5 (call $_fmt_u (i32.load @@ -7173,7 +7173,7 @@ (get_local $45) ) ) - (block $do-once$116 + (block $do-once$110 (if (i32.eq (get_local $7) @@ -7185,7 +7185,7 @@ (get_local $5) (get_local $45) ) - (br $do-once$116) + (br $do-once$110) ) (i32.store8 (get_local $53) @@ -7201,10 +7201,10 @@ (get_local $5) (get_local $29) ) - (br $do-once$116) + (br $do-once$110) ) - (loop $while-in$119 - (block $while-out$118 + (loop $while-in$113 + (block $while-out$112 (i32.store8 (tee_local $5 (i32.add @@ -7219,9 +7219,9 @@ (get_local $5) (get_local $29) ) - (br $while-out$118) + (br $while-out$112) ) - (br $while-in$119) + (br $while-in$113) ) ) ) @@ -7260,20 +7260,20 @@ (set_local $5 (get_local $7) ) - (br $while-out$114) + (br $while-out$108) ) ) - (br $while-in$115) + (br $while-in$109) ) ) - (block $do-once$120 + (block $do-once$114 (if (i32.ne (get_local $1) (i32.const 0) ) (block - (br_if $do-once$120 + (br_if $do-once$114 (i32.ne (i32.and (i32.load @@ -7303,8 +7303,8 @@ (get_local $23) ) ) - (loop $while-in$123 - (block $while-out$122 + (loop $while-in$117 + (block $while-out$116 (if (i32.gt_u (tee_local $1 @@ -7318,8 +7318,8 @@ ) (get_local $29) ) - (loop $while-in$125 - (block $while-out$124 + (loop $while-in$119 + (block $while-out$118 (i32.store8 (tee_local $1 (i32.add @@ -7334,9 +7334,9 @@ (get_local $1) (get_local $29) ) - (br $while-out$124) + (br $while-out$118) ) - (br $while-in$125) + (br $while-in$119) ) ) ) @@ -7392,10 +7392,10 @@ (set_local $15 (get_local $1) ) - (br $while-out$122) + (br $while-out$116) ) ) - (br $while-in$123) + (br $while-in$117) ) ) ) @@ -7436,8 +7436,8 @@ (set_local $5 (get_local $7) ) - (loop $while-in$109 - (block $while-out$108 + (loop $while-in$121 + (block $while-out$120 (set_local $8 (if (i32.eq @@ -7462,7 +7462,7 @@ (get_local $1) ) ) - (block $do-once$110 + (block $do-once$122 (if (i32.eq (get_local $5) @@ -7499,7 +7499,7 @@ (i32.const 1) ) ) - (br $do-once$110) + (br $do-once$122) ) (if (i32.ne @@ -7511,7 +7511,7 @@ ) (i32.const 0) ) - (br $do-once$110) + (br $do-once$122) ) (call $___fwritex (i32.const 4143) @@ -7532,11 +7532,11 @@ (set_local $1 (get_local $8) ) - (br $do-once$110) + (br $do-once$122) ) ) - (loop $while-in$113 - (block $while-out$112 + (loop $while-in$125 + (block $while-out$124 (i32.store8 (tee_local $1 (i32.add @@ -7551,9 +7551,9 @@ (get_local $1) (get_local $29) ) - (br $while-out$112) + (br $while-out$124) ) - (br $while-in$113) + (br $while-in$125) ) ) ) @@ -7611,9 +7611,9 @@ ) ) ) - (br $while-out$108) + (br $while-out$120) ) - (br $while-in$109) + (br $while-in$121) ) ) ) @@ -7865,8 +7865,8 @@ (set_local $6 (get_local $28) ) - (loop $while-in$134 - (block $while-out$133 + (loop $while-in$130 + (block $while-out$129 (i32.store8 (tee_local $6 (i32.add @@ -7914,9 +7914,9 @@ (i32.const 0) ) ) - (br $while-out$133) + (br $while-out$129) ) - (br $while-in$134) + (br $while-in$130) ) ) (if @@ -8095,8 +8095,8 @@ (get_local $19) ) ) - (loop $while-in$130 - (block $while-out$129 + (loop $while-in$132 + (block $while-out$131 (if (i32.eq (tee_local $1 @@ -8106,7 +8106,7 @@ ) (i32.const 0) ) - (br $while-out$129) + (br $while-out$131) ) (if (i32.or @@ -8127,7 +8127,7 @@ ) ) ) - (br $while-out$129) + (br $while-out$131) ) (set_local $6 (i32.add @@ -8152,10 +8152,10 @@ (set_local $7 (get_local $1) ) - (br $while-out$129) + (br $while-out$131) ) ) - (br $while-in$130) + (br $while-in$132) ) ) (if @@ -8199,8 +8199,8 @@ (get_local $19) ) ) - (loop $while-in$132 - (block $while-out$131 + (loop $while-in$134 + (block $while-out$133 (if (i32.eq (tee_local $1 @@ -8282,10 +8282,10 @@ (set_local $12 (i32.const 98) ) - (br $while-out$131) + (br $while-out$133) ) ) - (br $while-in$132) + (br $while-in$134) ) ) ) @@ -10183,8 +10183,8 @@ (set_local $8 (get_local $0) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (i32.eq (tee_local $0 @@ -10210,7 +10210,7 @@ (set_local $10 (get_local $8) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $1 (get_local $0) @@ -10253,7 +10253,7 @@ (get_local $0) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -10284,7 +10284,7 @@ (get_local $10) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $2 @@ -10327,7 +10327,7 @@ (set_local $15 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (set_local $4 (get_local $2) @@ -10337,8 +10337,8 @@ (get_local $2) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (i32.ne (tee_local $2 @@ -10360,7 +10360,7 @@ (set_local $8 (get_local $5) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -10377,7 +10377,7 @@ ) (i32.const 0) ) - (br $while-out$27) + (br $while-out$10) (block (set_local $4 (get_local $2) @@ -10387,7 +10387,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -10463,7 +10463,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (i32.ne (get_local $1) @@ -10515,7 +10515,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -10550,7 +10550,7 @@ (get_local $15) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eq (get_local $15) (i32.const 0) @@ -11028,8 +11028,8 @@ (set_local $36 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $16 @@ -11146,7 +11146,7 @@ (set_local $11 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $7 @@ -11157,7 +11157,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -11345,8 +11345,8 @@ (get_local $11) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $11 (i32.const 0) ) @@ -11399,7 +11399,7 @@ (set_local $29 (get_local $3) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -11415,7 +11415,7 @@ (set_local $13 (get_local $3) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $26 @@ -11429,7 +11429,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -11480,7 +11480,7 @@ (get_local $13) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $2 @@ -11523,7 +11523,7 @@ (set_local $6 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (set_local $8 (get_local $2) @@ -11533,8 +11533,8 @@ (get_local $2) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (i32.ne (tee_local $2 @@ -11556,7 +11556,7 @@ (set_local $9 (get_local $7) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -11573,7 +11573,7 @@ ) (i32.const 0) ) - (br $while-out$9) + (br $while-out$23) (block (set_local $8 (get_local $2) @@ -11583,7 +11583,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -11659,7 +11659,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (i32.ne (get_local $1) @@ -11711,7 +11711,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -11746,7 +11746,7 @@ (get_local $6) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eq (get_local $6) (i32.const 0) @@ -11828,7 +11828,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $17) @@ -11992,7 +11992,7 @@ (get_local $3) (get_local $2) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $2 @@ -12166,7 +12166,7 @@ (get_local $3) (get_local $3) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $1 @@ -12193,8 +12193,8 @@ (get_local $2) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -12212,7 +12212,7 @@ (set_local $11 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $4 @@ -12254,7 +12254,7 @@ (set_local $11 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $1 @@ -12265,7 +12265,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -13223,8 +13223,8 @@ (set_local $1 (i32.const 0) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$47 + (block $while-out$46 (i32.store offset=12 (tee_local $0 (i32.add @@ -13254,9 +13254,9 @@ ) (i32.const 32) ) - (br $while-out$77) + (br $while-out$46) ) - (br $while-in$78) + (br $while-in$47) ) ) (set_local $1 @@ -13331,8 +13331,8 @@ (set_local $7 (i32.const 624) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (get_local $14) @@ -13370,7 +13370,7 @@ (set_local $11 (i32.const 203) ) - (br $while-out$46) + (br $while-out$48) ) ) (if @@ -13382,12 +13382,12 @@ ) (i32.const 0) ) - (br $while-out$46) + (br $while-out$48) (set_local $7 (get_local $4) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -13529,8 +13529,8 @@ (set_local $1 (i32.const 624) ) - (loop $while-in$49 - (block $while-out$48 + (loop $while-in$51 + (block $while-out$50 (if (i32.eq (i32.load @@ -13548,7 +13548,7 @@ (set_local $11 (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (if @@ -13564,10 +13564,10 @@ (set_local $27 (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) ) - (br $while-in$49) + (br $while-in$51) ) ) (if @@ -13690,7 +13690,7 @@ (i32.const 3) ) ) - (block $do-once$50 + (block $do-once$52 (if (i32.eq (get_local $3) @@ -13758,7 +13758,7 @@ ) (get_local $0) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $0 @@ -13803,7 +13803,7 @@ (get_local $3) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.ne (tee_local $0 @@ -13832,7 +13832,7 @@ ) (call_import $_abort) ) - (br_if $do-once$61 + (br_if $do-once$55 (i32.eq (i32.load offset=12 (get_local $0) @@ -13868,7 +13868,7 @@ (br $label$break$L331) ) ) - (block $do-once$63 + (block $do-once$57 (if (i32.eq (get_local $1) @@ -13904,7 +13904,7 @@ (set_local $39 (get_local $2) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -13926,7 +13926,7 @@ (get_local $3) ) ) - (block $do-once$53 + (block $do-once$59 (if (i32.eq (tee_local $1 @@ -13969,7 +13969,7 @@ (set_local $18 (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $2 @@ -13984,8 +13984,8 @@ (get_local $1) ) ) - (loop $while-in$56 - (block $while-out$55 + (loop $while-in$62 + (block $while-out$61 (if (i32.ne (tee_local $1 @@ -14007,7 +14007,7 @@ (set_local $9 (get_local $20) ) - (br $while-in$56) + (br $while-in$62) ) ) (if @@ -14024,7 +14024,7 @@ ) (i32.const 0) ) - (br $while-out$55) + (br $while-out$61) (block (set_local $2 (get_local $1) @@ -14034,7 +14034,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) ) (if @@ -14116,7 +14116,7 @@ (i32.const 0) ) ) - (block $do-once$57 + (block $do-once$63 (if (i32.eq (get_local $3) @@ -14141,7 +14141,7 @@ (get_local $2) (get_local $18) ) - (br_if $do-once$57 + (br_if $do-once$63 (i32.ne (get_local $18) (i32.const 0) @@ -14350,7 +14350,7 @@ ) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eq (i32.and @@ -14410,7 +14410,7 @@ (set_local $33 (get_local $1) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -14433,7 +14433,7 @@ (get_local $5) (get_local $2) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $2 @@ -14441,7 +14441,7 @@ (i32.const 480) (i32.shl (tee_local $1 - (block $do-once$67 + (block $do-once$69 (if (i32.eq (tee_local $0 @@ -14454,7 +14454,7 @@ ) (i32.const 0) (block - (br_if $do-once$67 + (br_if $do-once$69 (i32.const 31) (i32.gt_u (get_local $4) @@ -14609,7 +14609,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $1 @@ -14636,8 +14636,8 @@ (get_local $2) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (if (i32.eq (i32.and @@ -14655,7 +14655,7 @@ (set_local $11 (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $8 @@ -14697,7 +14697,7 @@ (set_local $11 (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $1 @@ -14708,7 +14708,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (if @@ -14813,8 +14813,8 @@ ) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$74 + (block $while-out$73 (if (i32.le_u (tee_local $1 @@ -14840,7 +14840,7 @@ (set_local $2 (get_local $1) ) - (br $while-out$71) + (br $while-out$73) ) ) ) @@ -14849,7 +14849,7 @@ (get_local $27) ) ) - (br $while-in$72) + (br $while-in$74) ) ) (set_local $8 @@ -15031,8 +15031,8 @@ (i32.const 24) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (i32.store (tee_local $1 (i32.add @@ -15050,9 +15050,9 @@ ) (get_local $2) ) - (br $while-out$73) + (br $while-out$75) ) - (br $while-in$74) + (br $while-in$76) ) ) (if @@ -15384,8 +15384,8 @@ (get_local $4) ) ) - (loop $while-in$76 - (block $while-out$75 + (loop $while-in$78 + (block $while-out$77 (if (i32.eq (i32.and @@ -15403,7 +15403,7 @@ (set_local $11 (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $8 @@ -15445,7 +15445,7 @@ (set_local $11 (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $2 @@ -15456,7 +15456,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) ) (if diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index f37f143a9..298b05867 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -12288,8 +12288,8 @@ (set_local $$d$5494$i (get_local $$r$0$a$9$i) ) - (loop $while-in$115 - (block $while-out$114 + (loop $while-in$109 + (block $while-out$108 (set_local $$248 (i32.load (get_local $$d$5494$i) @@ -12308,7 +12308,7 @@ (get_local $$r$0$a$9$i) ) ) - (block $do-once$116 + (block $do-once$110 (if (get_local $$cmp673$i) (block @@ -12326,7 +12326,7 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$116) + (br $do-once$110) ) ) (i32.store8 @@ -12353,11 +12353,11 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$116) + (br $do-once$110) ) ) - (loop $while-in$119 - (block $while-out$118 + (loop $while-in$113 + (block $while-out$112 (set_local $$incdec$ptr681$i (i32.add (get_local $$s668$0492$i) @@ -12383,10 +12383,10 @@ (set_local $$s668$1$i (get_local $$incdec$ptr681$i) ) - (br $while-out$118) + (br $while-out$112) ) ) - (br $while-in$119) + (br $while-in$113) ) ) ) @@ -12446,13 +12446,13 @@ (set_local $$incdec$ptr698$i$lcssa (get_local $$incdec$ptr698$i) ) - (br $while-out$114) + (br $while-out$108) ) (set_local $$d$5494$i (get_local $$incdec$ptr698$i) ) ) - (br $while-in$115) + (br $while-in$109) ) ) (set_local $$251 @@ -12461,7 +12461,7 @@ (i32.const 0) ) ) - (block $do-once$120 + (block $do-once$114 (if (i32.eqz (get_local $$251) @@ -12488,7 +12488,7 @@ (i32.eqz (get_local $$tobool$i$449$i) ) - (br $do-once$120) + (br $do-once$114) ) (call $___fwritex (i32.const 4143) @@ -12525,8 +12525,8 @@ (set_local $$p$addr$4489$i (get_local $$p$addr$3$i) ) - (loop $while-in$123 - (block $while-out$122 + (loop $while-in$117 + (block $while-out$116 (set_local $$254 (i32.load (get_local $$d$6488$i) @@ -12551,8 +12551,8 @@ (set_local $$s715$0484$i (get_local $$255) ) - (loop $while-in$125 - (block $while-out$124 + (loop $while-in$119 + (block $while-out$118 (set_local $$incdec$ptr725$i (i32.add (get_local $$s715$0484$i) @@ -12578,10 +12578,10 @@ (set_local $$s715$0$lcssa$i (get_local $$incdec$ptr725$i) ) - (br $while-out$124) + (br $while-out$118) ) ) - (br $while-in$125) + (br $while-in$119) ) ) ) @@ -12673,10 +12673,10 @@ (set_local $$p$addr$4$lcssa$i (get_local $$sub735$i) ) - (br $while-out$122) + (br $while-out$116) ) ) - (br $while-in$123) + (br $while-in$117) ) ) ) @@ -12733,8 +12733,8 @@ (set_local $$p$addr$5501$i (get_local $$p$addr$3$i) ) - (loop $while-in$109 - (block $while-out$108 + (loop $while-in$121 + (block $while-out$120 (set_local $$258 (i32.load (get_local $$d$7500$i) @@ -12774,7 +12774,7 @@ (get_local $$a$9$ph$i) ) ) - (block $do-once$110 + (block $do-once$122 (if (get_local $$cmp765$i) (block @@ -12827,7 +12827,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) + (br $do-once$122) ) ) (set_local $$261 @@ -12855,7 +12855,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) + (br $do-once$122) ) ) (drop @@ -12885,11 +12885,11 @@ (set_local $$s753$2$i (get_local $$s753$0$i) ) - (br $do-once$110) + (br $do-once$122) ) ) - (loop $while-in$113 - (block $while-out$112 + (loop $while-in$125 + (block $while-out$124 (set_local $$incdec$ptr773$i (i32.add (get_local $$s753$1496$i) @@ -12915,10 +12915,10 @@ (set_local $$s753$2$i (get_local $$incdec$ptr773$i) ) - (br $while-out$112) + (br $while-out$124) ) ) - (br $while-in$113) + (br $while-in$125) ) ) ) @@ -13017,10 +13017,10 @@ (set_local $$p$addr$5$lcssa$i (get_local $$sub806$i) ) - (br $while-out$108) + (br $while-out$120) ) ) - (br $while-in$109) + (br $while-in$121) ) ) ) @@ -13399,8 +13399,8 @@ (set_local $$s$addr$06$i (get_local $$add$ptr205) ) - (loop $while-in$134 - (block $while-out$133 + (loop $while-in$130 + (block $while-out$129 (set_local $$idxprom$i (i32.and (get_local $$99) @@ -13482,7 +13482,7 @@ (set_local $$incdec$ptr$i$212$lcssa (get_local $$incdec$ptr$i$212) ) - (br $while-out$133) + (br $while-out$129) ) (block (set_local $$101 @@ -13496,7 +13496,7 @@ ) ) ) - (br $while-in$134) + (br $while-in$130) ) ) (set_local $$107 @@ -13749,8 +13749,8 @@ (set_local $$ws$0317 (get_local $$176) ) - (loop $while-in$130 - (block $while-out$129 + (loop $while-in$132 + (block $while-out$131 (set_local $$177 (i32.load (get_local $$ws$0317) @@ -13771,7 +13771,7 @@ (set_local $$l$2 (get_local $$l$1315) ) - (br $while-out$129) + (br $while-out$131) ) ) (set_local $$call384 @@ -13813,7 +13813,7 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$129) + (br $while-out$131) ) ) (set_local $$incdec$ptr383 @@ -13854,10 +13854,10 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$129) + (br $while-out$131) ) ) - (br $while-in$130) + (br $while-in$132) ) ) (set_local $$cmp397 @@ -13910,8 +13910,8 @@ (set_local $$ws$1326 (get_local $$178) ) - (loop $while-in$132 - (block $while-out$131 + (loop $while-in$134 + (block $while-out$133 (set_local $$179 (i32.load (get_local $$ws$1326) @@ -14019,10 +14019,10 @@ (set_local $label (i32.const 98) ) - (br $while-out$131) + (br $while-out$133) ) ) - (br $while-in$132) + (br $while-in$134) ) ) ) @@ -17782,7 +17782,7 @@ (get_local $$3) ) ) - (block $do-once$19 + (block $do-once$2 (if (get_local $$cmp10) (block @@ -17853,7 +17853,7 @@ (get_local $$1) (get_local $$3) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $_abort) ) @@ -18153,7 +18153,7 @@ (get_local $$10) ) ) - (block $do-once$21 + (block $do-once$4 (if (get_local $$cmp70) (block @@ -18235,7 +18235,7 @@ (set_local $$13 (get_local $$$pre) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $_abort) ) @@ -18678,8 +18678,8 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $$arrayidx23$i (i32.add (get_local $$t$0$i) @@ -18726,7 +18726,7 @@ (set_local $$v$0$i$lcssa (get_local $$v$0$i) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $$cond4$i (get_local $$23) @@ -18789,7 +18789,7 @@ (set_local $$v$0$i (get_local $$cond$v$0$i) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $$25 @@ -18853,7 +18853,7 @@ (get_local $$v$0$i$lcssa) ) ) - (block $do-once$25 + (block $do-once$8 (if (get_local $$cmp40$i) (block @@ -18900,7 +18900,7 @@ (set_local $$R$3$i (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $$R$1$i @@ -18921,8 +18921,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $$arrayidx71$i (i32.add (get_local $$R$1$i) @@ -18951,7 +18951,7 @@ (set_local $$RP$1$i (get_local $$arrayidx71$i) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $$arrayidx75$i @@ -18980,7 +18980,7 @@ (set_local $$RP$1$i$lcssa (get_local $$RP$1$i) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $$R$1$i @@ -18991,7 +18991,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $$cmp81$i @@ -19011,7 +19011,7 @@ (set_local $$R$3$i (get_local $$R$1$i$lcssa) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -19091,7 +19091,7 @@ (set_local $$R$3$i (get_local $$27) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $_abort) ) @@ -19104,7 +19104,7 @@ (i32.const 0) ) ) - (block $do-once$29 + (block $do-once$12 (if (i32.eqz (get_local $$cmp90$i) @@ -19184,7 +19184,7 @@ (i32.const 180) (get_local $$and103$i) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -19248,7 +19248,7 @@ ) (if (get_local $$cmp126$i) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -19294,7 +19294,7 @@ (i32.const 0) ) ) - (block $do-once$31 + (block $do-once$14 (if (i32.eqz (get_local $$cmp138$i) @@ -19330,7 +19330,7 @@ (get_local $$parent149$i) (get_local $$R$3$i) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -19393,7 +19393,7 @@ (get_local $$parent166$i) (get_local $$R$3$i) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -19998,8 +19998,8 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $$head$i$154 (i32.add (get_local $$t$0$i$151) @@ -20172,7 +20172,7 @@ (set_local $label (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $$rsize$0$i$152 @@ -20192,7 +20192,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -20462,8 +20462,8 @@ (get_local $label) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $label (i32.const 0) ) @@ -20544,7 +20544,7 @@ (set_local $label (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $$arrayidx113$i$159 @@ -20573,7 +20573,7 @@ (set_local $$v$4$lcssa$i (get_local $$t$4$v$4$i) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $$rsize$49$i @@ -20590,7 +20590,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -20687,7 +20687,7 @@ (get_local $$v$4$lcssa$i) ) ) - (block $do-once$7 + (block $do-once$21 (if (get_local $$cmp128$i) (block @@ -20734,7 +20734,7 @@ (set_local $$R$3$i$171 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $$R$1$i$168 @@ -20755,8 +20755,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $$arrayidx161$i (i32.add (get_local $$R$1$i$168) @@ -20785,7 +20785,7 @@ (set_local $$RP$1$i$167 (get_local $$arrayidx161$i) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $$arrayidx165$i$169 @@ -20814,7 +20814,7 @@ (set_local $$RP$1$i$167$lcssa (get_local $$RP$1$i$167) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $$R$1$i$168 @@ -20825,7 +20825,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $$cmp171$i @@ -20845,7 +20845,7 @@ (set_local $$R$3$i$171 (get_local $$R$1$i$168$lcssa) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -20925,7 +20925,7 @@ (set_local $$R$3$i$171 (get_local $$64) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $_abort) ) @@ -20938,7 +20938,7 @@ (i32.const 0) ) ) - (block $do-once$11 + (block $do-once$25 (if (i32.eqz (get_local $$cmp180$i) @@ -21018,7 +21018,7 @@ (i32.const 180) (get_local $$and194$i) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21082,7 +21082,7 @@ ) (if (get_local $$cmp217$i) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21128,7 +21128,7 @@ (i32.const 0) ) ) - (block $do-once$13 + (block $do-once$27 (if (i32.eqz (get_local $$cmp229$i) @@ -21164,7 +21164,7 @@ (get_local $$parent240$i) (get_local $$R$3$i$171) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -21227,7 +21227,7 @@ (get_local $$parent257$i) (get_local $$R$3$i$171) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21241,7 +21241,7 @@ (i32.const 16) ) ) - (block $do-once$15 + (block $do-once$29 (if (get_local $$cmp265$i) (block @@ -21488,7 +21488,7 @@ (get_local $$bk313$i) (get_local $$arrayidx289$i) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $$shr318$i @@ -21769,7 +21769,7 @@ (get_local $$fd371$i) (get_local $$add$ptr$i$161) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $$87 @@ -21814,8 +21814,8 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (set_local $$head386$i (i32.add (get_local $$T$0$i) @@ -21848,7 +21848,7 @@ (set_local $label (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $$shr391$i @@ -21898,7 +21898,7 @@ (set_local $label (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $$K373$0$i @@ -21909,7 +21909,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -21967,7 +21967,7 @@ (get_local $$fd408$i) (get_local $$add$ptr$i$161) ) - (br $do-once$15) + (br $do-once$29) ) ) ) @@ -22058,7 +22058,7 @@ (get_local $$parent433$i) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $_abort) ) @@ -23371,8 +23371,8 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$47 + (block $while-out$46 (set_local $$shl$i$i (i32.shl (get_local $$i$01$i$i) @@ -23422,12 +23422,12 @@ ) (if (get_local $$exitcond$i$i) - (br $while-out$77) + (br $while-out$46) (set_local $$i$01$i$i (get_local $$inc$i$i) ) ) - (br $while-in$78) + (br $while-in$47) ) ) (set_local $$sub172$i @@ -23542,8 +23542,8 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (set_local $$127 (i32.load (get_local $$sp$0108$i) @@ -23590,7 +23590,7 @@ (set_local $label (i32.const 203) ) - (br $while-out$46) + (br $while-out$48) ) ) (set_local $$next$i @@ -23612,12 +23612,12 @@ ) (if (get_local $$cmp186$i) - (br $while-out$46) + (br $while-out$48) (set_local $$sp$0108$i (get_local $$129) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -23837,8 +23837,8 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-in$49 - (block $while-out$48 + (loop $while-in$51 + (block $while-out$50 (set_local $$136 (i32.load (get_local $$sp$1107$i) @@ -23862,7 +23862,7 @@ (set_local $label (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (set_local $$next231$i @@ -23888,13 +23888,13 @@ (set_local $$sp$0$i$i$i (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) (set_local $$sp$1107$i (get_local $$137) ) ) - (br $while-in$49) + (br $while-in$51) ) ) (if @@ -24092,7 +24092,7 @@ (get_local $$119) ) ) - (block $do-once$50 + (block $do-once$52 (if (get_local $$cmp20$i$i) (block @@ -24192,7 +24192,7 @@ (get_local $$add$ptr30$i$i) (get_local $$add26$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$head32$i$i @@ -24286,7 +24286,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eqz (get_local $$cmp41$i$i) @@ -24321,7 +24321,7 @@ ) (if (get_local $$cmp44$i$i) - (br $do-once$61) + (br $do-once$55) ) (call_import $_abort) ) @@ -24372,7 +24372,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $$cmp54$i$i) (block @@ -24420,7 +24420,7 @@ (set_local $$fd68$pre$phi$i$iZ2D (get_local $$fd59$i$i) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -24471,7 +24471,7 @@ (get_local $$add$ptr16$i$i) ) ) - (block $do-once$53 + (block $do-once$59 (if (get_local $$cmp75$i$i) (block @@ -24518,7 +24518,7 @@ (set_local $$R$3$i$i (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $$R$1$i$i @@ -24539,8 +24539,8 @@ ) ) ) - (loop $while-in$56 - (block $while-out$55 + (loop $while-in$62 + (block $while-out$61 (set_local $$arrayidx103$i$i (i32.add (get_local $$R$1$i$i) @@ -24569,7 +24569,7 @@ (set_local $$RP$1$i$i (get_local $$arrayidx103$i$i) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $$arrayidx107$i$i @@ -24598,7 +24598,7 @@ (set_local $$RP$1$i$i$lcssa (get_local $$RP$1$i$i) ) - (br $while-out$55) + (br $while-out$61) ) (block (set_local $$R$1$i$i @@ -24609,7 +24609,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $$cmp112$i$i @@ -24629,7 +24629,7 @@ (set_local $$R$3$i$i (get_local $$R$1$i$i$lcssa) ) - (br $do-once$53) + (br $do-once$59) ) ) ) @@ -24709,7 +24709,7 @@ (set_local $$R$3$i$i (get_local $$155) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $_abort) ) @@ -24757,7 +24757,7 @@ (get_local $$164) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $$cmp124$i$i) (block @@ -24775,7 +24775,7 @@ (i32.eqz (get_local $$cond2$i$i) ) - (br $do-once$57) + (br $do-once$63) ) (set_local $$shl131$i$i (i32.shl @@ -24913,7 +24913,7 @@ (i32.const 0) ) ) - (block $do-once$59 + (block $do-once$65 (if (i32.eqz (get_local $$cmp168$i$i) @@ -24949,7 +24949,7 @@ (get_local $$parent179$i$i) (get_local $$R$3$i$i) ) - (br $do-once$59) + (br $do-once$65) ) ) ) @@ -25145,7 +25145,7 @@ (i32.const 0) ) ) - (block $do-once$65 + (block $do-once$67 (if (get_local $$tobool228$i$i) (block @@ -25206,7 +25206,7 @@ (set_local $$F224$0$i$i (get_local $$175) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -25247,7 +25247,7 @@ (get_local $$bk248$i$i) (get_local $$arrayidx223$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$shr253$i$i @@ -25262,7 +25262,7 @@ (i32.const 0) ) ) - (block $do-once$67 + (block $do-once$69 (if (get_local $$cmp254$i$i) (set_local $$I252$0$i$i @@ -25281,7 +25281,7 @@ (set_local $$I252$0$i$i (i32.const 31) ) - (br $do-once$67) + (br $do-once$69) ) ) (set_local $$sub262$i$i @@ -25531,7 +25531,7 @@ (get_local $$fd303$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$178 @@ -25576,8 +25576,8 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (set_local $$head317$i$i (i32.add (get_local $$T$0$i$58$i) @@ -25610,7 +25610,7 @@ (set_local $label (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $$shr322$i$i @@ -25660,7 +25660,7 @@ (set_local $label (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $$K305$0$i$i @@ -25671,7 +25671,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (if @@ -25729,7 +25729,7 @@ (get_local $$fd339$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) ) @@ -25820,7 +25820,7 @@ (get_local $$parent361$i$i) (i32.const 0) ) - (br $do-once$50) + (br $do-once$52) ) (call_import $_abort) ) @@ -25849,8 +25849,8 @@ ) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$74 + (block $while-out$73 (set_local $$185 (i32.load (get_local $$sp$0$i$i$i) @@ -25896,7 +25896,7 @@ (set_local $$add$ptr$i$i$i$lcssa (get_local $$add$ptr$i$i$i) ) - (br $while-out$71) + (br $while-out$73) ) ) ) @@ -25915,7 +25915,7 @@ (set_local $$sp$0$i$i$i (get_local $$187) ) - (br $while-in$72) + (br $while-in$74) ) ) (set_local $$add$ptr2$i$i @@ -26179,8 +26179,8 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (set_local $$add$ptr24$i$i (i32.add (get_local $$p$0$i$i) @@ -26208,9 +26208,9 @@ (set_local $$p$0$i$i (get_local $$add$ptr24$i$i) ) - (br $while-out$73) + (br $while-out$75) ) - (br $while-in$74) + (br $while-in$76) ) ) (set_local $$cmp28$i$i @@ -26741,8 +26741,8 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-in$76 - (block $while-out$75 + (loop $while-in$78 + (block $while-out$77 (set_local $$head118$i$i (i32.add (get_local $$T$0$i$i) @@ -26775,7 +26775,7 @@ (set_local $label (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $$shr123$i$i @@ -26825,7 +26825,7 @@ (set_local $label (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $$K105$0$i$i @@ -26836,7 +26836,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) ) (if diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 53111ec31..28e44d8f0 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -12294,8 +12294,8 @@ (set_local $$d$5494$i (get_local $$r$0$a$9$i) ) - (loop $while-in$115 - (block $while-out$114 + (loop $while-in$109 + (block $while-out$108 (set_local $$248 (i32.load (get_local $$d$5494$i) @@ -12314,7 +12314,7 @@ (get_local $$r$0$a$9$i) ) ) - (block $do-once$116 + (block $do-once$110 (if (get_local $$cmp673$i) (block @@ -12332,7 +12332,7 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$116) + (br $do-once$110) ) ) (i32.store8 @@ -12359,11 +12359,11 @@ (set_local $$s668$1$i (get_local $$249) ) - (br $do-once$116) + (br $do-once$110) ) ) - (loop $while-in$119 - (block $while-out$118 + (loop $while-in$113 + (block $while-out$112 (set_local $$incdec$ptr681$i (i32.add (get_local $$s668$0492$i) @@ -12389,10 +12389,10 @@ (set_local $$s668$1$i (get_local $$incdec$ptr681$i) ) - (br $while-out$118) + (br $while-out$112) ) ) - (br $while-in$119) + (br $while-in$113) ) ) ) @@ -12452,13 +12452,13 @@ (set_local $$incdec$ptr698$i$lcssa (get_local $$incdec$ptr698$i) ) - (br $while-out$114) + (br $while-out$108) ) (set_local $$d$5494$i (get_local $$incdec$ptr698$i) ) ) - (br $while-in$115) + (br $while-in$109) ) ) (set_local $$251 @@ -12467,7 +12467,7 @@ (i32.const 0) ) ) - (block $do-once$120 + (block $do-once$114 (if (i32.eqz (get_local $$251) @@ -12494,7 +12494,7 @@ (i32.eqz (get_local $$tobool$i$449$i) ) - (br $do-once$120) + (br $do-once$114) ) (call $___fwritex (i32.const 4143) @@ -12531,8 +12531,8 @@ (set_local $$p$addr$4489$i (get_local $$p$addr$3$i) ) - (loop $while-in$123 - (block $while-out$122 + (loop $while-in$117 + (block $while-out$116 (set_local $$254 (i32.load (get_local $$d$6488$i) @@ -12557,8 +12557,8 @@ (set_local $$s715$0484$i (get_local $$255) ) - (loop $while-in$125 - (block $while-out$124 + (loop $while-in$119 + (block $while-out$118 (set_local $$incdec$ptr725$i (i32.add (get_local $$s715$0484$i) @@ -12584,10 +12584,10 @@ (set_local $$s715$0$lcssa$i (get_local $$incdec$ptr725$i) ) - (br $while-out$124) + (br $while-out$118) ) ) - (br $while-in$125) + (br $while-in$119) ) ) ) @@ -12679,10 +12679,10 @@ (set_local $$p$addr$4$lcssa$i (get_local $$sub735$i) ) - (br $while-out$122) + (br $while-out$116) ) ) - (br $while-in$123) + (br $while-in$117) ) ) ) @@ -12739,8 +12739,8 @@ (set_local $$p$addr$5501$i (get_local $$p$addr$3$i) ) - (loop $while-in$109 - (block $while-out$108 + (loop $while-in$121 + (block $while-out$120 (set_local $$258 (i32.load (get_local $$d$7500$i) @@ -12780,7 +12780,7 @@ (get_local $$a$9$ph$i) ) ) - (block $do-once$110 + (block $do-once$122 (if (get_local $$cmp765$i) (block @@ -12833,7 +12833,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) + (br $do-once$122) ) ) (set_local $$261 @@ -12861,7 +12861,7 @@ (set_local $$s753$2$i (get_local $$incdec$ptr776$i) ) - (br $do-once$110) + (br $do-once$122) ) ) (drop @@ -12891,11 +12891,11 @@ (set_local $$s753$2$i (get_local $$s753$0$i) ) - (br $do-once$110) + (br $do-once$122) ) ) - (loop $while-in$113 - (block $while-out$112 + (loop $while-in$125 + (block $while-out$124 (set_local $$incdec$ptr773$i (i32.add (get_local $$s753$1496$i) @@ -12921,10 +12921,10 @@ (set_local $$s753$2$i (get_local $$incdec$ptr773$i) ) - (br $while-out$112) + (br $while-out$124) ) ) - (br $while-in$113) + (br $while-in$125) ) ) ) @@ -13023,10 +13023,10 @@ (set_local $$p$addr$5$lcssa$i (get_local $$sub806$i) ) - (br $while-out$108) + (br $while-out$120) ) ) - (br $while-in$109) + (br $while-in$121) ) ) ) @@ -13405,8 +13405,8 @@ (set_local $$s$addr$06$i (get_local $$add$ptr205) ) - (loop $while-in$134 - (block $while-out$133 + (loop $while-in$130 + (block $while-out$129 (set_local $$idxprom$i (i32.and (get_local $$99) @@ -13488,7 +13488,7 @@ (set_local $$incdec$ptr$i$212$lcssa (get_local $$incdec$ptr$i$212) ) - (br $while-out$133) + (br $while-out$129) ) (block (set_local $$101 @@ -13502,7 +13502,7 @@ ) ) ) - (br $while-in$134) + (br $while-in$130) ) ) (set_local $$107 @@ -13755,8 +13755,8 @@ (set_local $$ws$0317 (get_local $$176) ) - (loop $while-in$130 - (block $while-out$129 + (loop $while-in$132 + (block $while-out$131 (set_local $$177 (i32.load (get_local $$ws$0317) @@ -13777,7 +13777,7 @@ (set_local $$l$2 (get_local $$l$1315) ) - (br $while-out$129) + (br $while-out$131) ) ) (set_local $$call384 @@ -13819,7 +13819,7 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$129) + (br $while-out$131) ) ) (set_local $$incdec$ptr383 @@ -13860,10 +13860,10 @@ (set_local $$l$2 (get_local $$call384) ) - (br $while-out$129) + (br $while-out$131) ) ) - (br $while-in$130) + (br $while-in$132) ) ) (set_local $$cmp397 @@ -13916,8 +13916,8 @@ (set_local $$ws$1326 (get_local $$178) ) - (loop $while-in$132 - (block $while-out$131 + (loop $while-in$134 + (block $while-out$133 (set_local $$179 (i32.load (get_local $$ws$1326) @@ -14025,10 +14025,10 @@ (set_local $label (i32.const 98) ) - (br $while-out$131) + (br $while-out$133) ) ) - (br $while-in$132) + (br $while-in$134) ) ) ) @@ -17788,7 +17788,7 @@ (get_local $$3) ) ) - (block $do-once$19 + (block $do-once$2 (if (get_local $$cmp10) (block @@ -17859,7 +17859,7 @@ (get_local $$1) (get_local $$3) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $_abort) ) @@ -18159,7 +18159,7 @@ (get_local $$10) ) ) - (block $do-once$21 + (block $do-once$4 (if (get_local $$cmp70) (block @@ -18241,7 +18241,7 @@ (set_local $$13 (get_local $$$pre) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $_abort) ) @@ -18684,8 +18684,8 @@ (set_local $$v$0$i (get_local $$20) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $$arrayidx23$i (i32.add (get_local $$t$0$i) @@ -18732,7 +18732,7 @@ (set_local $$v$0$i$lcssa (get_local $$v$0$i) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $$cond4$i (get_local $$23) @@ -18795,7 +18795,7 @@ (set_local $$v$0$i (get_local $$cond$v$0$i) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $$25 @@ -18859,7 +18859,7 @@ (get_local $$v$0$i$lcssa) ) ) - (block $do-once$25 + (block $do-once$8 (if (get_local $$cmp40$i) (block @@ -18906,7 +18906,7 @@ (set_local $$R$3$i (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $$R$1$i @@ -18927,8 +18927,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $$arrayidx71$i (i32.add (get_local $$R$1$i) @@ -18957,7 +18957,7 @@ (set_local $$RP$1$i (get_local $$arrayidx71$i) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $$arrayidx75$i @@ -18986,7 +18986,7 @@ (set_local $$RP$1$i$lcssa (get_local $$RP$1$i) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $$R$1$i @@ -18997,7 +18997,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $$cmp81$i @@ -19017,7 +19017,7 @@ (set_local $$R$3$i (get_local $$R$1$i$lcssa) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -19097,7 +19097,7 @@ (set_local $$R$3$i (get_local $$27) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $_abort) ) @@ -19110,7 +19110,7 @@ (i32.const 0) ) ) - (block $do-once$29 + (block $do-once$12 (if (i32.eqz (get_local $$cmp90$i) @@ -19190,7 +19190,7 @@ (i32.const 180) (get_local $$and103$i) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -19254,7 +19254,7 @@ ) (if (get_local $$cmp126$i) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -19300,7 +19300,7 @@ (i32.const 0) ) ) - (block $do-once$31 + (block $do-once$14 (if (i32.eqz (get_local $$cmp138$i) @@ -19336,7 +19336,7 @@ (get_local $$parent149$i) (get_local $$R$3$i) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -19399,7 +19399,7 @@ (get_local $$parent166$i) (get_local $$R$3$i) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -20004,8 +20004,8 @@ (set_local $$v$0$i$153 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $$head$i$154 (i32.add (get_local $$t$0$i$151) @@ -20178,7 +20178,7 @@ (set_local $label (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $$rsize$0$i$152 @@ -20198,7 +20198,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -20468,8 +20468,8 @@ (get_local $label) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $label (i32.const 0) ) @@ -20550,7 +20550,7 @@ (set_local $label (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $$arrayidx113$i$159 @@ -20579,7 +20579,7 @@ (set_local $$v$4$lcssa$i (get_local $$t$4$v$4$i) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $$rsize$49$i @@ -20596,7 +20596,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -20693,7 +20693,7 @@ (get_local $$v$4$lcssa$i) ) ) - (block $do-once$7 + (block $do-once$21 (if (get_local $$cmp128$i) (block @@ -20740,7 +20740,7 @@ (set_local $$R$3$i$171 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $$R$1$i$168 @@ -20761,8 +20761,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $$arrayidx161$i (i32.add (get_local $$R$1$i$168) @@ -20791,7 +20791,7 @@ (set_local $$RP$1$i$167 (get_local $$arrayidx161$i) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $$arrayidx165$i$169 @@ -20820,7 +20820,7 @@ (set_local $$RP$1$i$167$lcssa (get_local $$RP$1$i$167) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $$R$1$i$168 @@ -20831,7 +20831,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $$cmp171$i @@ -20851,7 +20851,7 @@ (set_local $$R$3$i$171 (get_local $$R$1$i$168$lcssa) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -20931,7 +20931,7 @@ (set_local $$R$3$i$171 (get_local $$64) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $_abort) ) @@ -20944,7 +20944,7 @@ (i32.const 0) ) ) - (block $do-once$11 + (block $do-once$25 (if (i32.eqz (get_local $$cmp180$i) @@ -21024,7 +21024,7 @@ (i32.const 180) (get_local $$and194$i) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21088,7 +21088,7 @@ ) (if (get_local $$cmp217$i) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21134,7 +21134,7 @@ (i32.const 0) ) ) - (block $do-once$13 + (block $do-once$27 (if (i32.eqz (get_local $$cmp229$i) @@ -21170,7 +21170,7 @@ (get_local $$parent240$i) (get_local $$R$3$i$171) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -21233,7 +21233,7 @@ (get_local $$parent257$i) (get_local $$R$3$i$171) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -21247,7 +21247,7 @@ (i32.const 16) ) ) - (block $do-once$15 + (block $do-once$29 (if (get_local $$cmp265$i) (block @@ -21494,7 +21494,7 @@ (get_local $$bk313$i) (get_local $$arrayidx289$i) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $$shr318$i @@ -21775,7 +21775,7 @@ (get_local $$fd371$i) (get_local $$add$ptr$i$161) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $$87 @@ -21820,8 +21820,8 @@ (set_local $$T$0$i (get_local $$87) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (set_local $$head386$i (i32.add (get_local $$T$0$i) @@ -21854,7 +21854,7 @@ (set_local $label (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $$shr391$i @@ -21904,7 +21904,7 @@ (set_local $label (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $$K373$0$i @@ -21915,7 +21915,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -21973,7 +21973,7 @@ (get_local $$fd408$i) (get_local $$add$ptr$i$161) ) - (br $do-once$15) + (br $do-once$29) ) ) ) @@ -22064,7 +22064,7 @@ (get_local $$parent433$i) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $_abort) ) @@ -23377,8 +23377,8 @@ (set_local $$i$01$i$i (i32.const 0) ) - (loop $while-in$78 - (block $while-out$77 + (loop $while-in$47 + (block $while-out$46 (set_local $$shl$i$i (i32.shl (get_local $$i$01$i$i) @@ -23428,12 +23428,12 @@ ) (if (get_local $$exitcond$i$i) - (br $while-out$77) + (br $while-out$46) (set_local $$i$01$i$i (get_local $$inc$i$i) ) ) - (br $while-in$78) + (br $while-in$47) ) ) (set_local $$sub172$i @@ -23548,8 +23548,8 @@ (set_local $$sp$0108$i (i32.const 624) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (set_local $$127 (i32.load (get_local $$sp$0108$i) @@ -23596,7 +23596,7 @@ (set_local $label (i32.const 203) ) - (br $while-out$46) + (br $while-out$48) ) ) (set_local $$next$i @@ -23618,12 +23618,12 @@ ) (if (get_local $$cmp186$i) - (br $while-out$46) + (br $while-out$48) (set_local $$sp$0108$i (get_local $$129) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -23843,8 +23843,8 @@ (set_local $$sp$1107$i (i32.const 624) ) - (loop $while-in$49 - (block $while-out$48 + (loop $while-in$51 + (block $while-out$50 (set_local $$136 (i32.load (get_local $$sp$1107$i) @@ -23868,7 +23868,7 @@ (set_local $label (i32.const 211) ) - (br $while-out$48) + (br $while-out$50) ) ) (set_local $$next231$i @@ -23894,13 +23894,13 @@ (set_local $$sp$0$i$i$i (i32.const 624) ) - (br $while-out$48) + (br $while-out$50) ) (set_local $$sp$1107$i (get_local $$137) ) ) - (br $while-in$49) + (br $while-in$51) ) ) (if @@ -24098,7 +24098,7 @@ (get_local $$119) ) ) - (block $do-once$50 + (block $do-once$52 (if (get_local $$cmp20$i$i) (block @@ -24198,7 +24198,7 @@ (get_local $$add$ptr30$i$i) (get_local $$add26$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$head32$i$i @@ -24292,7 +24292,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eqz (get_local $$cmp41$i$i) @@ -24327,7 +24327,7 @@ ) (if (get_local $$cmp44$i$i) - (br $do-once$61) + (br $do-once$55) ) (call_import $_abort) ) @@ -24378,7 +24378,7 @@ (get_local $$arrayidx$i$48$i) ) ) - (block $do-once$63 + (block $do-once$57 (if (get_local $$cmp54$i$i) (block @@ -24426,7 +24426,7 @@ (set_local $$fd68$pre$phi$i$iZ2D (get_local $$fd59$i$i) ) - (br $do-once$63) + (br $do-once$57) ) ) (call_import $_abort) @@ -24477,7 +24477,7 @@ (get_local $$add$ptr16$i$i) ) ) - (block $do-once$53 + (block $do-once$59 (if (get_local $$cmp75$i$i) (block @@ -24524,7 +24524,7 @@ (set_local $$R$3$i$i (i32.const 0) ) - (br $do-once$53) + (br $do-once$59) ) (block (set_local $$R$1$i$i @@ -24545,8 +24545,8 @@ ) ) ) - (loop $while-in$56 - (block $while-out$55 + (loop $while-in$62 + (block $while-out$61 (set_local $$arrayidx103$i$i (i32.add (get_local $$R$1$i$i) @@ -24575,7 +24575,7 @@ (set_local $$RP$1$i$i (get_local $$arrayidx103$i$i) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $$arrayidx107$i$i @@ -24604,7 +24604,7 @@ (set_local $$RP$1$i$i$lcssa (get_local $$RP$1$i$i) ) - (br $while-out$55) + (br $while-out$61) ) (block (set_local $$R$1$i$i @@ -24615,7 +24615,7 @@ ) ) ) - (br $while-in$56) + (br $while-in$62) ) ) (set_local $$cmp112$i$i @@ -24635,7 +24635,7 @@ (set_local $$R$3$i$i (get_local $$R$1$i$i$lcssa) ) - (br $do-once$53) + (br $do-once$59) ) ) ) @@ -24715,7 +24715,7 @@ (set_local $$R$3$i$i (get_local $$155) ) - (br $do-once$53) + (br $do-once$59) ) (call_import $_abort) ) @@ -24763,7 +24763,7 @@ (get_local $$164) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $$cmp124$i$i) (block @@ -24781,7 +24781,7 @@ (i32.eqz (get_local $$cond2$i$i) ) - (br $do-once$57) + (br $do-once$63) ) (set_local $$shl131$i$i (i32.shl @@ -24919,7 +24919,7 @@ (i32.const 0) ) ) - (block $do-once$59 + (block $do-once$65 (if (i32.eqz (get_local $$cmp168$i$i) @@ -24955,7 +24955,7 @@ (get_local $$parent179$i$i) (get_local $$R$3$i$i) ) - (br $do-once$59) + (br $do-once$65) ) ) ) @@ -25151,7 +25151,7 @@ (i32.const 0) ) ) - (block $do-once$65 + (block $do-once$67 (if (get_local $$tobool228$i$i) (block @@ -25212,7 +25212,7 @@ (set_local $$F224$0$i$i (get_local $$175) ) - (br $do-once$65) + (br $do-once$67) ) ) (call_import $_abort) @@ -25253,7 +25253,7 @@ (get_local $$bk248$i$i) (get_local $$arrayidx223$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$shr253$i$i @@ -25268,7 +25268,7 @@ (i32.const 0) ) ) - (block $do-once$67 + (block $do-once$69 (if (get_local $$cmp254$i$i) (set_local $$I252$0$i$i @@ -25287,7 +25287,7 @@ (set_local $$I252$0$i$i (i32.const 31) ) - (br $do-once$67) + (br $do-once$69) ) ) (set_local $$sub262$i$i @@ -25537,7 +25537,7 @@ (get_local $$fd303$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) (set_local $$178 @@ -25582,8 +25582,8 @@ (set_local $$T$0$i$58$i (get_local $$178) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (set_local $$head317$i$i (i32.add (get_local $$T$0$i$58$i) @@ -25616,7 +25616,7 @@ (set_local $label (i32.const 281) ) - (br $while-out$69) + (br $while-out$71) ) ) (set_local $$shr322$i$i @@ -25666,7 +25666,7 @@ (set_local $label (i32.const 278) ) - (br $while-out$69) + (br $while-out$71) ) (block (set_local $$K305$0$i$i @@ -25677,7 +25677,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (if @@ -25735,7 +25735,7 @@ (get_local $$fd339$i$i) (get_local $$add$ptr17$i$i) ) - (br $do-once$50) + (br $do-once$52) ) ) ) @@ -25826,7 +25826,7 @@ (get_local $$parent361$i$i) (i32.const 0) ) - (br $do-once$50) + (br $do-once$52) ) (call_import $_abort) ) @@ -25855,8 +25855,8 @@ ) ) ) - (loop $while-in$72 - (block $while-out$71 + (loop $while-in$74 + (block $while-out$73 (set_local $$185 (i32.load (get_local $$sp$0$i$i$i) @@ -25902,7 +25902,7 @@ (set_local $$add$ptr$i$i$i$lcssa (get_local $$add$ptr$i$i$i) ) - (br $while-out$71) + (br $while-out$73) ) ) ) @@ -25921,7 +25921,7 @@ (set_local $$sp$0$i$i$i (get_local $$187) ) - (br $while-in$72) + (br $while-in$74) ) ) (set_local $$add$ptr2$i$i @@ -26185,8 +26185,8 @@ (set_local $$p$0$i$i (get_local $$add$ptr15$i$i) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (set_local $$add$ptr24$i$i (i32.add (get_local $$p$0$i$i) @@ -26214,9 +26214,9 @@ (set_local $$p$0$i$i (get_local $$add$ptr24$i$i) ) - (br $while-out$73) + (br $while-out$75) ) - (br $while-in$74) + (br $while-in$76) ) ) (set_local $$cmp28$i$i @@ -26747,8 +26747,8 @@ (set_local $$T$0$i$i (get_local $$200) ) - (loop $while-in$76 - (block $while-out$75 + (loop $while-in$78 + (block $while-out$77 (set_local $$head118$i$i (i32.add (get_local $$T$0$i$i) @@ -26781,7 +26781,7 @@ (set_local $label (i32.const 307) ) - (br $while-out$75) + (br $while-out$77) ) ) (set_local $$shr123$i$i @@ -26831,7 +26831,7 @@ (set_local $label (i32.const 304) ) - (br $while-out$75) + (br $while-out$77) ) (block (set_local $$K105$0$i$i @@ -26842,7 +26842,7 @@ ) ) ) - (br $while-in$76) + (br $while-in$78) ) ) (if diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 2f3294438..7a7a98113 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -784,8 +784,8 @@ (set_local $3 (get_local $25) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (tee_local $25 (i32.load offset=16 @@ -811,7 +811,7 @@ (set_local $26 (get_local $3) ) - (br $while-out$23) + (br $while-out$6) ) ) ) @@ -848,7 +848,7 @@ (get_local $16) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -879,7 +879,7 @@ (get_local $26) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $19 @@ -932,12 +932,12 @@ (set_local $27 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (tee_local $7 (i32.load @@ -956,7 +956,7 @@ (set_local $0 (get_local $8) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -978,9 +978,9 @@ (get_local $8) ) ) - (br $while-out$27) + (br $while-out$10) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1056,7 +1056,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $2) (block @@ -1104,7 +1104,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1139,7 +1139,7 @@ (get_local $27) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eqz (get_local $27) ) @@ -1583,8 +1583,8 @@ (set_local $5 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $29 @@ -1696,7 +1696,7 @@ (set_local $7 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $7 @@ -1722,7 +1722,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -1920,8 +1920,8 @@ (get_local $7) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $7 (i32.const 0) ) @@ -1971,7 +1971,7 @@ (set_local $17 (get_local $5) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -1995,10 +1995,10 @@ (set_local $9 (get_local $5) ) - (br $while-out$5) + (br $while-out$19) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2043,7 +2043,7 @@ (get_local $9) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $3 @@ -2091,12 +2091,12 @@ (set_local $20 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (tee_local $16 (i32.load @@ -2115,7 +2115,7 @@ (set_local $0 (get_local $14) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2137,9 +2137,9 @@ (get_local $14) ) ) - (br $while-out$9) + (br $while-out$23) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2215,7 +2215,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $12) (block @@ -2263,7 +2263,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2298,7 +2298,7 @@ (get_local $20) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eqz (get_local $20) ) @@ -2373,7 +2373,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $22) @@ -2531,7 +2531,7 @@ (get_local $5) (get_local $12) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $0 @@ -2696,7 +2696,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $8 @@ -2723,8 +2723,8 @@ (get_local $0) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -2742,7 +2742,7 @@ (set_local $7 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (if @@ -2786,10 +2786,10 @@ (set_local $7 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3701,8 +3701,8 @@ (set_local $1 (i32.const 1656) ) - (loop $do-in$45 - (block $do-out$44 + (loop $do-in$47 + (block $do-out$46 (if (i32.eq (get_local $28) @@ -3740,10 +3740,10 @@ (set_local $7 (i32.const 201) ) - (br $do-out$44) + (br $do-out$46) ) ) - (br_if $do-in$45 + (br_if $do-in$47 (i32.ne (tee_local $1 (i32.load offset=8 @@ -3890,8 +3890,8 @@ (set_local $1 (i32.const 1656) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -3909,7 +3909,7 @@ (set_local $7 (i32.const 209) ) - (br $while-out$46) + (br $while-out$48) ) ) (if @@ -3924,10 +3924,10 @@ (set_local $37 (i32.const 1656) ) - (br $while-out$46) + (br $while-out$48) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -4040,7 +4040,7 @@ (i32.const 3) ) ) - (block $do-once$48 + (block $do-once$50 (if (i32.eq (get_local $4) @@ -4108,7 +4108,7 @@ ) (get_local $6) ) - (br $do-once$48) + (br $do-once$50) ) ) (i32.store @@ -4151,7 +4151,7 @@ (get_local $4) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.ne (tee_local $6 @@ -4180,7 +4180,7 @@ ) (call_import $qa) ) - (br_if $do-once$59 + (br_if $do-once$53 (i32.eq (i32.load offset=12 (get_local $6) @@ -4216,7 +4216,7 @@ (br $label$break$e) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $9) @@ -4252,7 +4252,7 @@ (set_local $46 (get_local $2) ) - (br $do-once$61) + (br $do-once$55) ) ) (call_import $qa) @@ -4274,7 +4274,7 @@ (get_local $4) ) ) - (block $do-once$51 + (block $do-once$57 (if (i32.eq (tee_local $2 @@ -4327,12 +4327,12 @@ (set_local $30 (i32.const 0) ) - (br $do-once$51) + (br $do-once$57) ) ) ) - (loop $while-in$54 - (block $while-out$53 + (loop $while-in$60 + (block $while-out$59 (if (tee_local $20 (i32.load @@ -4351,7 +4351,7 @@ (set_local $0 (get_local $13) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -4373,9 +4373,9 @@ (get_local $13) ) ) - (br $while-out$53) + (br $while-out$59) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -4456,7 +4456,7 @@ (get_local $23) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $4) @@ -4481,7 +4481,7 @@ (get_local $6) (get_local $30) ) - (br_if $do-once$55 + (br_if $do-once$61 (get_local $30) ) (i32.store @@ -4681,7 +4681,7 @@ ) ) ) - (block $do-once$63 + (block $do-once$65 (if (i32.and (tee_local $9 @@ -4720,7 +4720,7 @@ (set_local $41 (get_local $23) ) - (br $do-once$63) + (br $do-once$65) ) ) (call_import $qa) @@ -4761,7 +4761,7 @@ (get_local $1) (get_local $6) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $2 @@ -4769,7 +4769,7 @@ (i32.const 1512) (i32.shl (tee_local $0 - (block $do-once$65 + (block $do-once$67 (if (tee_local $2 (i32.shr_u @@ -4778,7 +4778,7 @@ ) ) (block - (br_if $do-once$65 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $11) @@ -4930,7 +4930,7 @@ (get_local $1) (get_local $1) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $13 @@ -4957,8 +4957,8 @@ (get_local $2) ) ) - (loop $while-in$68 - (block $while-out$67 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -4976,7 +4976,7 @@ (set_local $7 (i32.const 279) ) - (br $while-out$67) + (br $while-out$69) ) ) (if @@ -5020,10 +5020,10 @@ (set_local $7 (i32.const 276) ) - (br $while-out$67) + (br $while-out$69) ) ) - (br $while-in$68) + (br $while-in$70) ) ) (if @@ -5129,8 +5129,8 @@ ) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (if (i32.le_u (tee_local $1 @@ -5156,7 +5156,7 @@ (set_local $0 (get_local $24) ) - (br $while-out$69) + (br $while-out$71) ) ) ) @@ -5165,7 +5165,7 @@ (get_local $37) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (set_local $24 @@ -5339,7 +5339,7 @@ (i32.const 24) ) ) - (loop $do-in$72 + (loop $do-in$74 (i32.store (tee_local $1 (i32.add @@ -5349,7 +5349,7 @@ ) (i32.const 7) ) - (br_if $do-in$72 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $1) @@ -5676,8 +5676,8 @@ (get_local $2) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -5695,7 +5695,7 @@ (set_local $7 (i32.const 305) ) - (br $while-out$73) + (br $while-out$75) ) ) (if @@ -5739,10 +5739,10 @@ (set_local $7 (i32.const 302) ) - (br $while-out$73) + (br $while-out$75) ) ) - (br $while-in$74) + (br $while-in$76) ) ) (if @@ -5881,7 +5881,7 @@ (set_local $4 (i32.const 0) ) - (loop $do-in$76 + (loop $do-in$45 (i32.store offset=12 (tee_local $15 (i32.add @@ -5901,7 +5901,7 @@ (get_local $15) (get_local $15) ) - (br_if $do-in$76 + (br_if $do-in$45 (i32.ne (tee_local $4 (i32.add diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 2ae9ff495..220266314 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -783,8 +783,8 @@ (set_local $3 (get_local $25) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (if (tee_local $25 (i32.load offset=16 @@ -810,7 +810,7 @@ (set_local $26 (get_local $3) ) - (br $while-out$23) + (br $while-out$6) ) ) ) @@ -847,7 +847,7 @@ (get_local $16) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (if @@ -878,7 +878,7 @@ (get_local $26) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (tee_local $19 @@ -931,12 +931,12 @@ (set_local $27 (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (if (tee_local $7 (i32.load @@ -955,7 +955,7 @@ (set_local $0 (get_local $8) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -977,9 +977,9 @@ (get_local $8) ) ) - (br $while-out$27) + (br $while-out$10) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1055,7 +1055,7 @@ ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $2) (block @@ -1103,7 +1103,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1138,7 +1138,7 @@ (get_local $27) ) ) - (br_if $do-once$29 + (br_if $do-once$12 (i32.eqz (get_local $27) ) @@ -1582,8 +1582,8 @@ (set_local $5 (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (if (i32.lt_u (tee_local $29 @@ -1695,7 +1695,7 @@ (set_local $7 (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $7 @@ -1721,7 +1721,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -1919,8 +1919,8 @@ (get_local $7) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $7 (i32.const 0) ) @@ -1970,7 +1970,7 @@ (set_local $17 (get_local $5) ) - (br $while-in$6) + (br $while-in$20) ) ) (if @@ -1994,10 +1994,10 @@ (set_local $9 (get_local $5) ) - (br $while-out$5) + (br $while-out$19) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2042,7 +2042,7 @@ (get_local $9) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (tee_local $3 @@ -2090,12 +2090,12 @@ (set_local $20 (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (if (tee_local $16 (i32.load @@ -2114,7 +2114,7 @@ (set_local $0 (get_local $14) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2136,9 +2136,9 @@ (get_local $14) ) ) - (br $while-out$9) + (br $while-out$23) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2214,7 +2214,7 @@ ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $12) (block @@ -2262,7 +2262,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2297,7 +2297,7 @@ (get_local $20) ) ) - (br_if $do-once$11 + (br_if $do-once$25 (i32.eqz (get_local $20) ) @@ -2372,7 +2372,7 @@ ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $22) @@ -2530,7 +2530,7 @@ (get_local $5) (get_local $12) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $0 @@ -2695,7 +2695,7 @@ (get_local $5) (get_local $5) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $8 @@ -2722,8 +2722,8 @@ (get_local $0) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -2741,7 +2741,7 @@ (set_local $7 (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (if @@ -2785,10 +2785,10 @@ (set_local $7 (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3700,8 +3700,8 @@ (set_local $1 (i32.const 1656) ) - (loop $do-in$45 - (block $do-out$44 + (loop $do-in$47 + (block $do-out$46 (if (i32.eq (get_local $28) @@ -3739,10 +3739,10 @@ (set_local $7 (i32.const 201) ) - (br $do-out$44) + (br $do-out$46) ) ) - (br_if $do-in$45 + (br_if $do-in$47 (i32.ne (tee_local $1 (i32.load offset=8 @@ -3889,8 +3889,8 @@ (set_local $1 (i32.const 1656) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -3908,7 +3908,7 @@ (set_local $7 (i32.const 209) ) - (br $while-out$46) + (br $while-out$48) ) ) (if @@ -3923,10 +3923,10 @@ (set_local $37 (i32.const 1656) ) - (br $while-out$46) + (br $while-out$48) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -4039,7 +4039,7 @@ (i32.const 3) ) ) - (block $do-once$48 + (block $do-once$50 (if (i32.eq (get_local $4) @@ -4107,7 +4107,7 @@ ) (get_local $6) ) - (br $do-once$48) + (br $do-once$50) ) ) (i32.store @@ -4150,7 +4150,7 @@ (get_local $4) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.ne (tee_local $6 @@ -4179,7 +4179,7 @@ ) (call_import $qa) ) - (br_if $do-once$59 + (br_if $do-once$53 (i32.eq (i32.load offset=12 (get_local $6) @@ -4215,7 +4215,7 @@ (br $label$break$e) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $9) @@ -4251,7 +4251,7 @@ (set_local $46 (get_local $2) ) - (br $do-once$61) + (br $do-once$55) ) ) (call_import $qa) @@ -4273,7 +4273,7 @@ (get_local $4) ) ) - (block $do-once$51 + (block $do-once$57 (if (i32.eq (tee_local $2 @@ -4326,12 +4326,12 @@ (set_local $30 (i32.const 0) ) - (br $do-once$51) + (br $do-once$57) ) ) ) - (loop $while-in$54 - (block $while-out$53 + (loop $while-in$60 + (block $while-out$59 (if (tee_local $20 (i32.load @@ -4350,7 +4350,7 @@ (set_local $0 (get_local $13) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -4372,9 +4372,9 @@ (get_local $13) ) ) - (br $while-out$53) + (br $while-out$59) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -4455,7 +4455,7 @@ (get_local $23) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $4) @@ -4480,7 +4480,7 @@ (get_local $6) (get_local $30) ) - (br_if $do-once$55 + (br_if $do-once$61 (get_local $30) ) (i32.store @@ -4680,7 +4680,7 @@ ) ) ) - (block $do-once$63 + (block $do-once$65 (if (i32.and (tee_local $9 @@ -4719,7 +4719,7 @@ (set_local $41 (get_local $23) ) - (br $do-once$63) + (br $do-once$65) ) ) (call_import $qa) @@ -4760,7 +4760,7 @@ (get_local $1) (get_local $6) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $2 @@ -4768,7 +4768,7 @@ (i32.const 1512) (i32.shl (tee_local $0 - (block $do-once$65 + (block $do-once$67 (if (tee_local $2 (i32.shr_u @@ -4777,7 +4777,7 @@ ) ) (block - (br_if $do-once$65 + (br_if $do-once$67 (i32.const 31) (i32.gt_u (get_local $11) @@ -4929,7 +4929,7 @@ (get_local $1) (get_local $1) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $13 @@ -4956,8 +4956,8 @@ (get_local $2) ) ) - (loop $while-in$68 - (block $while-out$67 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -4975,7 +4975,7 @@ (set_local $7 (i32.const 279) ) - (br $while-out$67) + (br $while-out$69) ) ) (if @@ -5019,10 +5019,10 @@ (set_local $7 (i32.const 276) ) - (br $while-out$67) + (br $while-out$69) ) ) - (br $while-in$68) + (br $while-in$70) ) ) (if @@ -5128,8 +5128,8 @@ ) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (if (i32.le_u (tee_local $1 @@ -5155,7 +5155,7 @@ (set_local $0 (get_local $24) ) - (br $while-out$69) + (br $while-out$71) ) ) ) @@ -5164,7 +5164,7 @@ (get_local $37) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (set_local $24 @@ -5338,7 +5338,7 @@ (i32.const 24) ) ) - (loop $do-in$72 + (loop $do-in$74 (i32.store (tee_local $1 (i32.add @@ -5348,7 +5348,7 @@ ) (i32.const 7) ) - (br_if $do-in$72 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $1) @@ -5675,8 +5675,8 @@ (get_local $2) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -5694,7 +5694,7 @@ (set_local $7 (i32.const 305) ) - (br $while-out$73) + (br $while-out$75) ) ) (if @@ -5738,10 +5738,10 @@ (set_local $7 (i32.const 302) ) - (br $while-out$73) + (br $while-out$75) ) ) - (br $while-in$74) + (br $while-in$76) ) ) (if @@ -5880,7 +5880,7 @@ (set_local $4 (i32.const 0) ) - (loop $do-in$76 + (loop $do-in$45 (i32.store offset=12 (tee_local $15 (i32.add @@ -5900,7 +5900,7 @@ (get_local $15) (get_local $15) ) - (br_if $do-in$76 + (br_if $do-in$45 (i32.ne (tee_local $4 (i32.add diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index ab9a5c6c0..a25625c64 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -244,7 +244,7 @@ (get_local $m) ) ) - (block $do-once$19 + (block $do-once$2 (if (i32.eq (get_local $i) @@ -295,7 +295,7 @@ (get_local $j) (get_local $n) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $qa) ) @@ -519,7 +519,7 @@ (get_local $o) ) ) - (block $do-once$21 + (block $do-once$4 (if (i32.eq (get_local $s) @@ -580,7 +580,7 @@ (i32.const 1216) ) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $qa) ) @@ -912,8 +912,8 @@ (set_local $s (get_local $j) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $j (i32.load (i32.add @@ -946,7 +946,7 @@ (set_local $A (get_local $s) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $B (get_local $f) @@ -994,7 +994,7 @@ (get_local $s) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $s @@ -1038,7 +1038,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (get_local $o) @@ -1080,7 +1080,7 @@ (set_local $C (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $D @@ -1101,8 +1101,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $q (i32.add (get_local $D) @@ -1123,7 +1123,7 @@ (set_local $E (get_local $q) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $q @@ -1148,7 +1148,7 @@ (set_local $G (get_local $E) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $D @@ -1159,7 +1159,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1176,7 +1176,7 @@ (set_local $C (get_local $F) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -1236,14 +1236,14 @@ (set_local $C (get_local $o) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $qa) ) ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $e) (block @@ -1296,7 +1296,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1339,7 +1339,7 @@ (i32.eqz (get_local $C) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1370,7 +1370,7 @@ ) ) ) - (block $do-once$31 + (block $do-once$14 (if (get_local $s) (if @@ -1394,7 +1394,7 @@ ) (get_local $C) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -1432,7 +1432,7 @@ ) (get_local $C) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1878,8 +1878,8 @@ (set_local $i (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $m (i32.and (i32.load @@ -2002,7 +2002,7 @@ (set_local $N (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $u @@ -2028,7 +2028,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -2230,8 +2230,8 @@ (get_local $N) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $N (i32.const 0) ) @@ -2292,7 +2292,7 @@ (set_local $N (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $P @@ -2314,7 +2314,7 @@ (set_local $V (get_local $i) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $O @@ -2328,7 +2328,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2391,7 +2391,7 @@ ) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (get_local $s) @@ -2433,7 +2433,7 @@ (set_local $W (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $X @@ -2454,8 +2454,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $d (i32.add (get_local $X) @@ -2476,7 +2476,7 @@ (set_local $Y (get_local $d) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $d @@ -2501,7 +2501,7 @@ (set_local $_ (get_local $Y) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $X @@ -2512,7 +2512,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2529,7 +2529,7 @@ (set_local $W (get_local $Z) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -2589,14 +2589,14 @@ (set_local $W (get_local $s) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $qa) ) ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $g) (block @@ -2649,7 +2649,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2692,7 +2692,7 @@ (i32.eqz (get_local $W) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2723,7 +2723,7 @@ ) ) ) - (block $do-once$13 + (block $do-once$27 (if (get_local $q) (if @@ -2747,7 +2747,7 @@ ) (get_local $W) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -2785,14 +2785,14 @@ ) (get_local $W) ) - (br $do-once$11) + (br $do-once$25) ) ) ) ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $U) @@ -2978,7 +2978,7 @@ ) (get_local $g) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $g @@ -3177,7 +3177,7 @@ ) (get_local $i) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $q @@ -3204,8 +3204,8 @@ (get_local $t) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -3226,7 +3226,7 @@ (set_local $N (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $t @@ -3263,7 +3263,7 @@ (set_local $N (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $q @@ -3277,7 +3277,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3319,7 +3319,7 @@ ) (get_local $i) ) - (br $do-once$15) + (br $do-once$29) ) ) (if @@ -3388,7 +3388,7 @@ ) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $qa) ) @@ -4360,8 +4360,8 @@ (set_local $ma (i32.const 0) ) - (loop $do-in$76 - (block $do-out$75 + (loop $do-in$45 + (block $do-out$44 (set_local $c (i32.add (i32.const 1248) @@ -4394,7 +4394,7 @@ (i32.const 1) ) ) - (br_if $do-in$76 + (br_if $do-in$45 (i32.ne (get_local $ma) (i32.const 32) @@ -4481,8 +4481,8 @@ (set_local $ka (i32.const 1656) ) - (loop $do-in$45 - (block $do-out$44 + (loop $do-in$47 + (block $do-out$46 (set_local $ma (i32.load (get_local $ka) @@ -4523,7 +4523,7 @@ (set_local $N (i32.const 201) ) - (br $do-out$44) + (br $do-out$46) ) ) (set_local $ka @@ -4534,7 +4534,7 @@ ) ) ) - (br_if $do-in$45 + (br_if $do-in$47 (i32.ne (get_local $ka) (i32.const 0) @@ -4691,8 +4691,8 @@ (set_local $ka (i32.const 1656) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -4710,7 +4710,7 @@ (set_local $N (i32.const 209) ) - (br $while-out$46) + (br $while-out$48) ) ) (set_local $ka @@ -4729,10 +4729,10 @@ (set_local $wa (i32.const 1656) ) - (br $while-out$46) + (br $while-out$48) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -4853,7 +4853,7 @@ (i32.const 3) ) ) - (block $do-once$48 + (block $do-once$50 (if (i32.eq (get_local $ma) @@ -4929,7 +4929,7 @@ ) (get_local $la) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $la @@ -4996,7 +4996,7 @@ ) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.ne (get_local $da) @@ -5020,7 +5020,7 @@ ) (get_local $ma) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $qa) ) @@ -5050,7 +5050,7 @@ (br $label$break$e) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $V) @@ -5087,7 +5087,7 @@ (set_local $xa (get_local $e) ) - (br $do-once$61) + (br $do-once$55) ) ) (call_import $qa) @@ -5123,7 +5123,7 @@ ) ) ) - (block $do-once$51 + (block $do-once$57 (if (i32.eq (get_local $e) @@ -5165,7 +5165,7 @@ (set_local $ya (i32.const 0) ) - (br $do-once$51) + (br $do-once$57) ) (block (set_local $za @@ -5186,8 +5186,8 @@ ) ) ) - (loop $while-in$54 - (block $while-out$53 + (loop $while-in$60 + (block $while-out$59 (set_local $aa (i32.add (get_local $za) @@ -5208,7 +5208,7 @@ (set_local $Aa (get_local $aa) ) - (br $while-in$54) + (br $while-in$60) ) ) (set_local $aa @@ -5233,7 +5233,7 @@ (set_local $Ca (get_local $Aa) ) - (br $while-out$53) + (br $while-out$59) ) (block (set_local $za @@ -5244,7 +5244,7 @@ ) ) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -5261,7 +5261,7 @@ (set_local $ya (get_local $Ba) ) - (br $do-once$51) + (br $do-once$57) ) ) ) @@ -5321,7 +5321,7 @@ (set_local $ya (get_local $e) ) - (br $do-once$51) + (br $do-once$57) ) (call_import $qa) ) @@ -5351,7 +5351,7 @@ ) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $ma) @@ -5366,7 +5366,7 @@ ) (if (get_local $ya) - (br $do-once$55) + (br $do-once$61) ) (i32.store (i32.const 1212) @@ -5459,7 +5459,7 @@ (get_local $da) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $V) (if @@ -5483,7 +5483,7 @@ ) (get_local $ya) ) - (br $do-once$57) + (br $do-once$63) ) ) ) @@ -5620,7 +5620,7 @@ (get_local $fa) ) ) - (block $do-once$63 + (block $do-once$65 (if (i32.eqz (i32.and @@ -5672,7 +5672,7 @@ (set_local $Ga (get_local $$) ) - (br $do-once$63) + (br $do-once$65) ) ) (call_import $qa) @@ -5704,7 +5704,7 @@ ) (get_local $la) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $e @@ -5713,7 +5713,7 @@ (i32.const 8) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eqz (get_local $e) @@ -5731,7 +5731,7 @@ (set_local $Ha (i32.const 31) ) - (br $do-once$65) + (br $do-once$67) ) ) (set_local $V @@ -5908,7 +5908,7 @@ ) (get_local $ka) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $aa @@ -5935,8 +5935,8 @@ (get_local $e) ) ) - (loop $while-in$68 - (block $while-out$67 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -5957,7 +5957,7 @@ (set_local $N (i32.const 279) ) - (br $while-out$67) + (br $while-out$69) ) ) (set_local $e @@ -5994,7 +5994,7 @@ (set_local $N (i32.const 276) ) - (br $while-out$67) + (br $while-out$69) ) (block (set_local $aa @@ -6008,7 +6008,7 @@ ) ) ) - (br $while-in$68) + (br $while-in$70) ) ) (if @@ -6050,7 +6050,7 @@ ) (get_local $ka) ) - (br $do-once$48) + (br $do-once$50) ) ) (if @@ -6119,7 +6119,7 @@ ) (i32.const 0) ) - (br $do-once$48) + (br $do-once$50) ) (call_import $qa) ) @@ -6148,8 +6148,8 @@ ) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (set_local $ka (i32.load (get_local $wa) @@ -6181,7 +6181,7 @@ (set_local $La (get_local $ea) ) - (br $while-out$69) + (br $while-out$71) ) ) ) @@ -6194,7 +6194,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (set_local $ca @@ -6392,8 +6392,8 @@ (i32.const 24) ) ) - (loop $do-in$72 - (block $do-out$71 + (loop $do-in$74 + (block $do-out$73 (set_local $ka (i32.add (get_local $ka) @@ -6404,7 +6404,7 @@ (get_local $ka) (i32.const 7) ) - (br_if $do-in$72 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $ka) @@ -6786,8 +6786,8 @@ (get_local $e) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -6808,7 +6808,7 @@ (set_local $N (i32.const 305) ) - (br $while-out$73) + (br $while-out$75) ) ) (set_local $e @@ -6845,7 +6845,7 @@ (set_local $N (i32.const 302) ) - (br $while-out$73) + (br $while-out$75) ) (block (set_local $ma @@ -6859,7 +6859,7 @@ ) ) ) - (br $while-in$74) + (br $while-in$76) ) ) (if diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 5a993bcd0..f2cf43833 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -245,7 +245,7 @@ (get_local $m) ) ) - (block $do-once$19 + (block $do-once$2 (if (i32.eq (get_local $i) @@ -296,7 +296,7 @@ (get_local $j) (get_local $n) ) - (br $do-once$19) + (br $do-once$2) ) (call_import $qa) ) @@ -520,7 +520,7 @@ (get_local $o) ) ) - (block $do-once$21 + (block $do-once$4 (if (i32.eq (get_local $s) @@ -581,7 +581,7 @@ (i32.const 1216) ) ) - (br $do-once$21) + (br $do-once$4) ) (call_import $qa) ) @@ -913,8 +913,8 @@ (set_local $s (get_local $j) ) - (loop $while-in$24 - (block $while-out$23 + (loop $while-in$7 + (block $while-out$6 (set_local $j (i32.load (i32.add @@ -947,7 +947,7 @@ (set_local $A (get_local $s) ) - (br $while-out$23) + (br $while-out$6) ) (set_local $B (get_local $f) @@ -995,7 +995,7 @@ (get_local $s) ) ) - (br $while-in$24) + (br $while-in$7) ) ) (set_local $s @@ -1039,7 +1039,7 @@ ) ) ) - (block $do-once$25 + (block $do-once$8 (if (i32.eq (get_local $o) @@ -1081,7 +1081,7 @@ (set_local $C (i32.const 0) ) - (br $do-once$25) + (br $do-once$8) ) (block (set_local $D @@ -1102,8 +1102,8 @@ ) ) ) - (loop $while-in$28 - (block $while-out$27 + (loop $while-in$11 + (block $while-out$10 (set_local $q (i32.add (get_local $D) @@ -1124,7 +1124,7 @@ (set_local $E (get_local $q) ) - (br $while-in$28) + (br $while-in$11) ) ) (set_local $q @@ -1149,7 +1149,7 @@ (set_local $G (get_local $E) ) - (br $while-out$27) + (br $while-out$10) ) (block (set_local $D @@ -1160,7 +1160,7 @@ ) ) ) - (br $while-in$28) + (br $while-in$11) ) ) (if @@ -1177,7 +1177,7 @@ (set_local $C (get_local $F) ) - (br $do-once$25) + (br $do-once$8) ) ) ) @@ -1237,14 +1237,14 @@ (set_local $C (get_local $o) ) - (br $do-once$25) + (br $do-once$8) ) (call_import $qa) ) ) ) ) - (block $do-once$29 + (block $do-once$12 (if (get_local $e) (block @@ -1297,7 +1297,7 @@ ) ) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1340,7 +1340,7 @@ (i32.eqz (get_local $C) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1371,7 +1371,7 @@ ) ) ) - (block $do-once$31 + (block $do-once$14 (if (get_local $s) (if @@ -1395,7 +1395,7 @@ ) (get_local $C) ) - (br $do-once$31) + (br $do-once$14) ) ) ) @@ -1433,7 +1433,7 @@ ) (get_local $C) ) - (br $do-once$29) + (br $do-once$12) ) ) ) @@ -1879,8 +1879,8 @@ (set_local $i (i32.const 0) ) - (loop $while-in$4 - (block $while-out$3 + (loop $while-in$18 + (block $while-out$17 (set_local $m (i32.and (i32.load @@ -2003,7 +2003,7 @@ (set_local $N (i32.const 86) ) - (br $while-out$3) + (br $while-out$17) ) (block (set_local $u @@ -2029,7 +2029,7 @@ ) ) ) - (br $while-in$4) + (br $while-in$18) ) ) ) @@ -2231,8 +2231,8 @@ (get_local $N) (i32.const 90) ) - (loop $while-in$6 - (block $while-out$5 + (loop $while-in$20 + (block $while-out$19 (set_local $N (i32.const 0) ) @@ -2293,7 +2293,7 @@ (set_local $N (i32.const 90) ) - (br $while-in$6) + (br $while-in$20) ) ) (set_local $P @@ -2315,7 +2315,7 @@ (set_local $V (get_local $i) ) - (br $while-out$5) + (br $while-out$19) ) (block (set_local $O @@ -2329,7 +2329,7 @@ ) ) ) - (br $while-in$6) + (br $while-in$20) ) ) ) @@ -2392,7 +2392,7 @@ ) ) ) - (block $do-once$7 + (block $do-once$21 (if (i32.eq (get_local $s) @@ -2434,7 +2434,7 @@ (set_local $W (i32.const 0) ) - (br $do-once$7) + (br $do-once$21) ) (block (set_local $X @@ -2455,8 +2455,8 @@ ) ) ) - (loop $while-in$10 - (block $while-out$9 + (loop $while-in$24 + (block $while-out$23 (set_local $d (i32.add (get_local $X) @@ -2477,7 +2477,7 @@ (set_local $Y (get_local $d) ) - (br $while-in$10) + (br $while-in$24) ) ) (set_local $d @@ -2502,7 +2502,7 @@ (set_local $_ (get_local $Y) ) - (br $while-out$9) + (br $while-out$23) ) (block (set_local $X @@ -2513,7 +2513,7 @@ ) ) ) - (br $while-in$10) + (br $while-in$24) ) ) (if @@ -2530,7 +2530,7 @@ (set_local $W (get_local $Z) ) - (br $do-once$7) + (br $do-once$21) ) ) ) @@ -2590,14 +2590,14 @@ (set_local $W (get_local $s) ) - (br $do-once$7) + (br $do-once$21) ) (call_import $qa) ) ) ) ) - (block $do-once$11 + (block $do-once$25 (if (get_local $g) (block @@ -2650,7 +2650,7 @@ ) ) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2693,7 +2693,7 @@ (i32.eqz (get_local $W) ) - (br $do-once$11) + (br $do-once$25) ) ) ) @@ -2724,7 +2724,7 @@ ) ) ) - (block $do-once$13 + (block $do-once$27 (if (get_local $q) (if @@ -2748,7 +2748,7 @@ ) (get_local $W) ) - (br $do-once$13) + (br $do-once$27) ) ) ) @@ -2786,14 +2786,14 @@ ) (get_local $W) ) - (br $do-once$11) + (br $do-once$25) ) ) ) ) ) ) - (block $do-once$15 + (block $do-once$29 (if (i32.lt_u (get_local $U) @@ -2979,7 +2979,7 @@ ) (get_local $g) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $g @@ -3178,7 +3178,7 @@ ) (get_local $i) ) - (br $do-once$15) + (br $do-once$29) ) ) (set_local $q @@ -3205,8 +3205,8 @@ (get_local $t) ) ) - (loop $while-in$18 - (block $while-out$17 + (loop $while-in$32 + (block $while-out$31 (if (i32.eq (i32.and @@ -3227,7 +3227,7 @@ (set_local $N (i32.const 148) ) - (br $while-out$17) + (br $while-out$31) ) ) (set_local $t @@ -3264,7 +3264,7 @@ (set_local $N (i32.const 145) ) - (br $while-out$17) + (br $while-out$31) ) (block (set_local $q @@ -3278,7 +3278,7 @@ ) ) ) - (br $while-in$18) + (br $while-in$32) ) ) (if @@ -3320,7 +3320,7 @@ ) (get_local $i) ) - (br $do-once$15) + (br $do-once$29) ) ) (if @@ -3389,7 +3389,7 @@ ) (i32.const 0) ) - (br $do-once$15) + (br $do-once$29) ) (call_import $qa) ) @@ -4361,8 +4361,8 @@ (set_local $ma (i32.const 0) ) - (loop $do-in$76 - (block $do-out$75 + (loop $do-in$45 + (block $do-out$44 (set_local $c (i32.add (i32.const 1248) @@ -4395,7 +4395,7 @@ (i32.const 1) ) ) - (br_if $do-in$76 + (br_if $do-in$45 (i32.ne (get_local $ma) (i32.const 32) @@ -4482,8 +4482,8 @@ (set_local $ka (i32.const 1656) ) - (loop $do-in$45 - (block $do-out$44 + (loop $do-in$47 + (block $do-out$46 (set_local $ma (i32.load (get_local $ka) @@ -4524,7 +4524,7 @@ (set_local $N (i32.const 201) ) - (br $do-out$44) + (br $do-out$46) ) ) (set_local $ka @@ -4535,7 +4535,7 @@ ) ) ) - (br_if $do-in$45 + (br_if $do-in$47 (i32.ne (get_local $ka) (i32.const 0) @@ -4692,8 +4692,8 @@ (set_local $ka (i32.const 1656) ) - (loop $while-in$47 - (block $while-out$46 + (loop $while-in$49 + (block $while-out$48 (if (i32.eq (i32.load @@ -4711,7 +4711,7 @@ (set_local $N (i32.const 209) ) - (br $while-out$46) + (br $while-out$48) ) ) (set_local $ka @@ -4730,10 +4730,10 @@ (set_local $wa (i32.const 1656) ) - (br $while-out$46) + (br $while-out$48) ) ) - (br $while-in$47) + (br $while-in$49) ) ) (if @@ -4854,7 +4854,7 @@ (i32.const 3) ) ) - (block $do-once$48 + (block $do-once$50 (if (i32.eq (get_local $ma) @@ -4930,7 +4930,7 @@ ) (get_local $la) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $la @@ -4997,7 +4997,7 @@ ) ) ) - (block $do-once$59 + (block $do-once$53 (if (i32.ne (get_local $da) @@ -5021,7 +5021,7 @@ ) (get_local $ma) ) - (br $do-once$59) + (br $do-once$53) ) (call_import $qa) ) @@ -5051,7 +5051,7 @@ (br $label$break$e) ) ) - (block $do-once$61 + (block $do-once$55 (if (i32.eq (get_local $V) @@ -5088,7 +5088,7 @@ (set_local $xa (get_local $e) ) - (br $do-once$61) + (br $do-once$55) ) ) (call_import $qa) @@ -5124,7 +5124,7 @@ ) ) ) - (block $do-once$51 + (block $do-once$57 (if (i32.eq (get_local $e) @@ -5166,7 +5166,7 @@ (set_local $ya (i32.const 0) ) - (br $do-once$51) + (br $do-once$57) ) (block (set_local $za @@ -5187,8 +5187,8 @@ ) ) ) - (loop $while-in$54 - (block $while-out$53 + (loop $while-in$60 + (block $while-out$59 (set_local $aa (i32.add (get_local $za) @@ -5209,7 +5209,7 @@ (set_local $Aa (get_local $aa) ) - (br $while-in$54) + (br $while-in$60) ) ) (set_local $aa @@ -5234,7 +5234,7 @@ (set_local $Ca (get_local $Aa) ) - (br $while-out$53) + (br $while-out$59) ) (block (set_local $za @@ -5245,7 +5245,7 @@ ) ) ) - (br $while-in$54) + (br $while-in$60) ) ) (if @@ -5262,7 +5262,7 @@ (set_local $ya (get_local $Ba) ) - (br $do-once$51) + (br $do-once$57) ) ) ) @@ -5322,7 +5322,7 @@ (set_local $ya (get_local $e) ) - (br $do-once$51) + (br $do-once$57) ) (call_import $qa) ) @@ -5352,7 +5352,7 @@ ) ) ) - (block $do-once$55 + (block $do-once$61 (if (i32.eq (get_local $ma) @@ -5367,7 +5367,7 @@ ) (if (get_local $ya) - (br $do-once$55) + (br $do-once$61) ) (i32.store (i32.const 1212) @@ -5460,7 +5460,7 @@ (get_local $da) ) ) - (block $do-once$57 + (block $do-once$63 (if (get_local $V) (if @@ -5484,7 +5484,7 @@ ) (get_local $ya) ) - (br $do-once$57) + (br $do-once$63) ) ) ) @@ -5621,7 +5621,7 @@ (get_local $fa) ) ) - (block $do-once$63 + (block $do-once$65 (if (i32.eqz (i32.and @@ -5673,7 +5673,7 @@ (set_local $Ga (get_local $$) ) - (br $do-once$63) + (br $do-once$65) ) ) (call_import $qa) @@ -5705,7 +5705,7 @@ ) (get_local $la) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $e @@ -5714,7 +5714,7 @@ (i32.const 8) ) ) - (block $do-once$65 + (block $do-once$67 (if (i32.eqz (get_local $e) @@ -5732,7 +5732,7 @@ (set_local $Ha (i32.const 31) ) - (br $do-once$65) + (br $do-once$67) ) ) (set_local $V @@ -5909,7 +5909,7 @@ ) (get_local $ka) ) - (br $do-once$48) + (br $do-once$50) ) ) (set_local $aa @@ -5936,8 +5936,8 @@ (get_local $e) ) ) - (loop $while-in$68 - (block $while-out$67 + (loop $while-in$70 + (block $while-out$69 (if (i32.eq (i32.and @@ -5958,7 +5958,7 @@ (set_local $N (i32.const 279) ) - (br $while-out$67) + (br $while-out$69) ) ) (set_local $e @@ -5995,7 +5995,7 @@ (set_local $N (i32.const 276) ) - (br $while-out$67) + (br $while-out$69) ) (block (set_local $aa @@ -6009,7 +6009,7 @@ ) ) ) - (br $while-in$68) + (br $while-in$70) ) ) (if @@ -6051,7 +6051,7 @@ ) (get_local $ka) ) - (br $do-once$48) + (br $do-once$50) ) ) (if @@ -6120,7 +6120,7 @@ ) (i32.const 0) ) - (br $do-once$48) + (br $do-once$50) ) (call_import $qa) ) @@ -6149,8 +6149,8 @@ ) ) ) - (loop $while-in$70 - (block $while-out$69 + (loop $while-in$72 + (block $while-out$71 (set_local $ka (i32.load (get_local $wa) @@ -6182,7 +6182,7 @@ (set_local $La (get_local $ea) ) - (br $while-out$69) + (br $while-out$71) ) ) ) @@ -6195,7 +6195,7 @@ ) ) ) - (br $while-in$70) + (br $while-in$72) ) ) (set_local $ca @@ -6393,8 +6393,8 @@ (i32.const 24) ) ) - (loop $do-in$72 - (block $do-out$71 + (loop $do-in$74 + (block $do-out$73 (set_local $ka (i32.add (get_local $ka) @@ -6405,7 +6405,7 @@ (get_local $ka) (i32.const 7) ) - (br_if $do-in$72 + (br_if $do-in$74 (i32.lt_u (i32.add (get_local $ka) @@ -6787,8 +6787,8 @@ (get_local $e) ) ) - (loop $while-in$74 - (block $while-out$73 + (loop $while-in$76 + (block $while-out$75 (if (i32.eq (i32.and @@ -6809,7 +6809,7 @@ (set_local $N (i32.const 305) ) - (br $while-out$73) + (br $while-out$75) ) ) (set_local $e @@ -6846,7 +6846,7 @@ (set_local $N (i32.const 302) ) - (br $while-out$73) + (br $while-out$75) ) (block (set_local $ma @@ -6860,7 +6860,7 @@ ) ) ) - (br $while-in$74) + (br $while-in$76) ) ) (if -- cgit v1.2.3 From 15240ea1537d00f03af1abec8633e3890918be8e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 09:20:22 -0700 Subject: update binary version to 0x0c --- src/wasm-binary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 373465296..5d81f01f6 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -234,7 +234,7 @@ namespace BinaryConsts { enum Meta { Magic = 0x6d736100, - Version = 11 + Version = 0x0c }; namespace Section { -- cgit v1.2.3 From ef82c858b9ca6e1a9e34e79398195e7b549507aa Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 10:05:01 -0700 Subject: wasm-shell improvements: print out which module is built, add option to skip lines --- src/tools/wasm-shell.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 32bc746b2..a95ced87f 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -136,9 +136,8 @@ static void run_asserts(size_t* i, bool* checked, Module* wasm, assert(wasm); Invocation invocation(curr, instance.get(), *builder->get()); invocation.invoke(); - } else { + } else if (wasm) { // if no wasm, we skipped the module // an invoke test - assert(wasm); bool trapped = false; WASM_UNUSED(trapped); Literal result; @@ -175,6 +174,7 @@ static void run_asserts(size_t* i, bool* checked, Module* wasm, int main(int argc, const char* argv[]) { Name entry; + std::set skipped; Options options("wasm-shell", "Execute .wast files"); options @@ -182,6 +182,21 @@ int main(int argc, const char* argv[]) { "--entry", "-e", "call the entry point after parsing the module", Options::Arguments::One, [&entry](Options*, const std::string& argument) { entry = argument; }) + .add( + "--skip", "-s", "skip input on certain lines (comma-separated-list)", + Options::Arguments::One, + [&skipped](Options*, const std::string& argument) { + size_t i = 0; + while (i < argument.size()) { + auto ending = argument.find(',', i); + if (ending == std::string::npos) { + ending = argument.size(); + } + auto sub = argument.substr(i, ending - i); + skipped.insert(atoi(sub.c_str())); + i = ending + 1; + } + }) .add_positional("INFILE", Options::Arguments::One, [](Options* o, const std::string& argument) { o->extra["infile"] = argument; @@ -201,9 +216,19 @@ int main(int argc, const char* argv[]) { size_t i = 0; while (i < root.size()) { Element& curr = *root[i]; + if (skipped.count(curr.line) > 0) { + Colors::green(std::cerr); + std::cerr << "SKIPPING [line: " << curr.line << "]\n"; + Colors::normal(std::cerr); + i++; + continue; + } IString id = curr[0]->str(); if (id == MODULE) { if (options.debug) std::cerr << "parsing s-expressions to wasm...\n"; + Colors::green(std::cerr); + std::cerr << "BUILDING MODULE [line: " << curr.line << "]\n"; + Colors::normal(std::cerr); Module wasm; std::unique_ptr builder; builder = wasm::make_unique(wasm, *root[i]); -- cgit v1.2.3 From 0b6faf409ff92f6c4f81b5dd2474f43a4238878c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 11:54:31 -0700 Subject: throw a parse error on bad result arities --- src/wasm-s-parser.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 28975c7e3..61ddbd48a 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -319,10 +319,11 @@ private: Element& curr = *s[i]; IString id = curr[0]->str(); if (id == RESULT) { + if (curr.size() > 2) throw ParseException("invalid result arity", curr.line, curr.col); functionTypes[name] = stringToWasmType(curr[1]->str()); } else if (id == TYPE) { Name typeName = curr[1]->str(); - if (!wasm.checkFunctionType(typeName)) throw ParseException("unknown function"); + if (!wasm.checkFunctionType(typeName)) throw ParseException("unknown function", curr.line, curr.col); type = wasm.getFunctionType(typeName); functionTypes[name] = type->result; } else if (id == PARAM && curr.size() > 1) { @@ -494,6 +495,7 @@ private: currLocalTypes[name] = type; } } else if (id == RESULT) { + if (curr.size() > 2) throw ParseException("invalid result arity", curr.line, curr.col); result = stringToWasmType(curr[1]->str()); } else if (id == TYPE) { Name name = curr[1]->str(); @@ -1505,6 +1507,7 @@ private: type->params.push_back(stringToWasmType(curr[j]->str())); } } else if (curr[0]->str() == RESULT) { + if (curr.size() > 2) throw ParseException("invalid result arity", curr.line, curr.col); type->result = stringToWasmType(curr[1]->str()); } } -- cgit v1.2.3 From af7985c92a79f46eb1e10cd2964ad03c581e745e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 12:09:23 -0700 Subject: tolerate returning a nop --- src/wasm-validator.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 8e989c94d..afa7b5d9c 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -287,7 +287,6 @@ public: void visitReturn(Return* curr) { if (curr->value) { - shouldBeFalse(curr->value->is(), curr, "cannot return a nop"); if (returnType == unreachable) { returnType = curr->value->type; } else if (curr->value->type != unreachable && returnType != curr->value->type) { -- cgit v1.2.3 From 08293f0f451b398d3fa816c4d1bc6c87bbe6f102 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 13:47:17 -0700 Subject: ignore unused return values in functions --- src/wasm-validator.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index afa7b5d9c..b4d604c2c 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -339,8 +339,10 @@ public: if (curr->body->type != unreachable) { shouldBeEqual(curr->result, curr->body->type, curr->body, "function body type must match, if function returns"); } - if (returnType != unreachable) { - shouldBeEqual(curr->result, returnType, curr->body, "function result must match, if function returns"); + if (curr->result != none) { // TODO: over previous too? + if (returnType != unreachable) { + shouldBeEqual(curr->result, returnType, curr->body, "function result must match, if function returns"); + } } returnType = unreachable; } -- cgit v1.2.3 From 5d1af1e3b6836a4cd621d114ef30b6cf52882356 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 14:18:53 -0700 Subject: parse s-expression quoted strings more carefully --- src/wasm-s-parser.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 61ddbd48a..4baab0121 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -60,6 +60,7 @@ class Element { List list_; IString str_; bool dollared_; + bool quoted_; public: Element(MixedArena& allocator) : isList_(true), list_(allocator), line(-1), col(-1) {} @@ -67,6 +68,7 @@ public: bool isList() { return isList_; } bool isStr() { return !isList_; } bool dollared() { return dollared_; } + bool quoted() { return quoted_; } size_t line, col; @@ -98,10 +100,11 @@ public: return str_.str; } - Element* setString(IString str__, bool dollared__) { + Element* setString(IString str__, bool dollared__, bool quoted__) { isList_ = false; str_ = str__; dollared_ = dollared__; + quoted_ = quoted__; return this; } @@ -242,13 +245,13 @@ private: input++; } input++; - return allocator.alloc()->setString(IString(str.c_str(), false), dollared)->setMetadata(line, start - lineStart); + return allocator.alloc()->setString(IString(str.c_str(), false), dollared, true)->setMetadata(line, start - lineStart); } while (input[0] && !isspace(input[0]) && input[0] != ')' && input[0] != '(' && input[0] != ';') input++; if (start == input) throw ParseException("expected string", line, input - lineStart); char temp = input[0]; input[0] = 0; - auto ret = allocator.alloc()->setString(IString(start, false), dollared)->setMetadata(line, start - lineStart); + auto ret = allocator.alloc()->setString(IString(start, false), dollared, false)->setMetadata(line, start - lineStart); input[0] = temp; return ret; } @@ -413,14 +416,16 @@ private: // returns the next index in s size_t parseFunctionNames(Element& s, Name& name, Name& exportName) { size_t i = 1; - while (i < s.size() && s[i]->isStr()) { - if (!s[i]->dollared()) { + while (i < s.size() && i < 3 && s[i]->isStr()) { + if (s[i]->quoted()) { // an export name exportName = s[i]->str(); i++; - } else { + } else if (s[i]->dollared()) { name = s[i]->str(); i++; + } else { + break; } } return i; @@ -581,6 +586,7 @@ public: #define abort_on(str) { throw ParseException(std::string("abort_on ") + str); } Expression* parseExpression(Element& s) { + if (!s.isList()) throw ParseException("invalid node for parseExpression, needed list", s.line, s.col); IString id = s[0]->str(); const char *str = id.str; const char *dot = strchr(str, '.'); -- cgit v1.2.3 From b19f9feb9f45774272fa0f26f7a561b3b1bd9e3a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 14:31:27 -0700 Subject: print wasm types in full mode --- src/passes/Print.cpp | 31 ++++++++++++++++--------------- src/wasm-printing.h | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 4fb9274c7..4f5701f10 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -32,8 +32,8 @@ struct PrintSExpression : public Visitor { const char *maybeSpace; const char *maybeNewLine; - bool fullAST = false; // whether to not elide nodes in output when possible - // (like implicit blocks) + bool full = false; // whether to not elide nodes in output when possible + // (like implicit blocks) and to emit types Module* currModule = nullptr; Function* currFunction = nullptr; @@ -48,7 +48,7 @@ struct PrintSExpression : public Visitor { maybeNewLine = minify ? "" : "\n"; } - void setFullAST(bool fullAST_) { fullAST = fullAST_; } + void setFull(bool full_) { full = full_; } void incIndent() { if (minify) return; @@ -64,9 +64,9 @@ struct PrintSExpression : public Visitor { } void printFullLine(Expression *expression) { !minify && doIndent(o, indent); -#ifdef DEBUG_TYPES - o << "[" << printWasmType(expression->type) << "] "; -#endif + if (full) { + o << "[" << printWasmType(expression->type) << "] "; + } visit(expression); o << maybeNewLine; } @@ -138,13 +138,13 @@ struct PrintSExpression : public Visitor { incIndent(); printFullLine(curr->condition); // ifTrue and False have implict blocks, avoid printing them if possible - if (!fullAST && curr->ifTrue->is() && curr->ifTrue->dynCast()->name.isNull() && curr->ifTrue->dynCast()->list.size() == 1) { + if (!full && curr->ifTrue->is() && curr->ifTrue->dynCast()->name.isNull() && curr->ifTrue->dynCast()->list.size() == 1) { printFullLine(curr->ifTrue->dynCast()->list.back()); } else { printFullLine(curr->ifTrue); } if (curr->ifFalse) { - if (!fullAST && curr->ifFalse->is() && curr->ifFalse->dynCast()->name.isNull() && curr->ifFalse->dynCast()->list.size() == 1) { + if (!full && curr->ifFalse->is() && curr->ifFalse->dynCast()->name.isNull() && curr->ifFalse->dynCast()->list.size() == 1) { printFullLine(curr->ifFalse->dynCast()->list.back()); } else { printFullLine(curr->ifFalse); @@ -159,7 +159,7 @@ struct PrintSExpression : public Visitor { } incIndent(); auto block = curr->body->dynCast(); - if (!fullAST && block && block->name.isNull()) { + if (!full && block && block->name.isNull()) { // wasm spec has loops containing children directly, while our ast // has a single child for simplicity. print out the optimal form. for (auto expression : block->list) { @@ -575,7 +575,7 @@ struct PrintSExpression : public Visitor { } // It is ok to emit a block here, as a function can directly contain a list, even if our // ast avoids that for simplicity. We can just do that optimization here.. - if (!fullAST && curr->body->is() && curr->body->cast()->name.isNull()) { + if (!full && curr->body->is() && curr->body->cast()->name.isNull()) { Block* block = curr->body->cast(); for (auto item : block->list) { printFullLine(item); @@ -718,7 +718,7 @@ public: void run(PassRunner* runner, Module* module) override { PrintSExpression print(o); - print.setFullAST(true); + print.setFull(true); print.visitModule(module); } }; @@ -729,12 +729,13 @@ Pass *createFullPrinterPass() { // Print individual expressions -std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify) { +std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify, bool full) { PrintSExpression print(o); print.setMinify(minify); -#ifdef DEBUG_TYPES - o << "[" << printWasmType(expression->type) << "] "; -#endif + if (full) { + print.setFull(true); + o << "[" << printWasmType(expression->type) << "] "; + } print.visit(expression); return o; } diff --git a/src/wasm-printing.h b/src/wasm-printing.h index 2f1c97831..830f2dda2 100644 --- a/src/wasm-printing.h +++ b/src/wasm-printing.h @@ -36,7 +36,7 @@ struct WasmPrinter { return printModule(module, std::cout); } - static std::ostream& printExpression(Expression* expression, std::ostream& o, bool minify = false); + static std::ostream& printExpression(Expression* expression, std::ostream& o, bool minify = false, bool full = false); }; } -- cgit v1.2.3 From 8014a63b064a497ee4c18a70500f89fa51f75c79 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Aug 2016 15:04:25 -0700 Subject: check store value type, and validation printing improvements --- src/passes/Print.cpp | 4 ++++ src/wasm-validator.h | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 4f5701f10..c0d7ed345 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -730,6 +730,10 @@ Pass *createFullPrinterPass() { // Print individual expressions std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify, bool full) { + if (!expression) { + o << "(null expression)"; + return o; + } PrintSExpression print(o); print.setMinify(minify); if (full) { diff --git a/src/wasm-validator.h b/src/wasm-validator.h index b4d604c2c..5e58ab408 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -203,7 +203,7 @@ public: validateAlignment(curr->align); shouldBeEqualOrFirstIsUnreachable(curr->ptr->type, i32, curr, "store pointer type must be i32"); shouldBeUnequal(curr->value->type, none, curr, "store value type must not be none"); - // TODO: enable a check that replaces this, for type being none shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->type, curr, "store value type must match"); + shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->valueType, curr, "store value type must match"); } void visitBinary(Binary *curr) { if (curr->left->type != unreachable && curr->right->type != unreachable) { @@ -330,7 +330,7 @@ public: void visitGlobal(Global* curr) { shouldBeTrue(curr->init->is(), curr->name, "global init must be valid"); - shouldBeEqual(curr->type, curr->init->type, curr, "global init must have correct type"); + shouldBeEqual(curr->type, curr->init->type, nullptr, "global init must have correct type"); } void visitFunction(Function *curr) { @@ -422,7 +422,8 @@ private: template bool shouldBeEqual(S left, S right, T curr, const char* text) { if (left != right) { - fail() << "" << left << " != " << right << ": " << text << ", on \n" << curr << std::endl; + fail() << "" << left << " != " << right << ": " << text << ", on \n"; + WasmPrinter::printExpression(curr, std::cerr, false, true) << std::endl; valid = false; return false; } @@ -441,7 +442,8 @@ private: template bool shouldBeEqualOrFirstIsUnreachable(S left, S right, T curr, const char* text) { if (left != unreachable && left != right) { - fail() << "" << left << " != " << right << ": " << text << ", on \n" << curr << std::endl; + fail() << "" << left << " != " << right << ": " << text << ", on \n"; + WasmPrinter::printExpression(curr, std::cerr, false, true) << std::endl; valid = false; return false; } -- cgit v1.2.3 From 34d614a7e9026b793dd5b34d268fa7176d3771bd Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 14:54:01 -0700 Subject: call_indirect is now structural, so no need to pass the type name around --- src/shell-interface.h | 3 +-- src/wasm-interpreter.h | 4 ++-- src/wasm-js.cpp | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/shell-interface.h b/src/shell-interface.h index 2b0c491b9..f9afe21fb 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -126,10 +126,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { abort(); } - Literal callTable(Index index, Name type, LiteralList& arguments, ModuleInstance& instance) override { + Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instance) override { if (index >= table.size()) trap("callTable overflow"); auto* func = instance.wasm.getFunction(table[index]); - if (func->type.is() && func->type != type) trap("callIndirect: bad type"); if (func->params.size() != arguments.size()) trap("callIndirect: bad # of arguments"); for (size_t i = 0; i < func->params.size(); i++) { if (func->params[i] != arguments[i].type) { diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 247d34500..f237f63db 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -542,7 +542,7 @@ public: struct ExternalInterface { virtual void init(Module& wasm) {} virtual Literal callImport(Import* import, LiteralList& arguments) = 0; - virtual Literal callTable(Index index, Name type, LiteralList& arguments, ModuleInstance& instance) = 0; + virtual Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instance) = 0; virtual Literal load(Load* load, Address addr) = 0; virtual void store(Store* store, Address addr, Literal value) = 0; virtual void growMemory(Address oldSize, Address newSize) = 0; @@ -681,7 +681,7 @@ public: Flow target = visit(curr->target); if (target.breaking()) return target; Index index = target.value.geti32(); - return instance.externalInterface->callTable(index, curr->fullType, arguments, instance); + return instance.externalInterface->callTable(index, arguments, curr->type, instance); } Flow visitGetLocal(GetLocal *curr) { diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 66dcb4864..3c3c4eec7 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -255,7 +255,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { return getResultFromJS(ret, import->type->result); } - Literal callTable(Index index, Name type, LiteralList& arguments, ModuleInstance& instance) override { + Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instance) override { void* ptr = (void*)EM_ASM_INT({ var value = Module['outside']['wasmTable'][$0]; return typeof value === "number" ? value : -1; @@ -264,7 +264,6 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { if (ptr != (void*)-1) { // a Function we can call Function* func = (Function*)ptr; - if (func->type.is() && func->type != type) trap("callIndirect: bad type"); if (func->params.size() != arguments.size()) trap("callIndirect: bad # of arguments"); for (size_t i = 0; i < func->params.size(); i++) { if (func->params[i] != arguments[i].type) { @@ -281,7 +280,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { Module['tempArguments'] = null; return func.apply(null, tempArguments); }, index); - return getResultFromJS(ret, instance.wasm.getFunctionType(type)->result); + return getResultFromJS(ret, result); } } -- cgit v1.2.3 From c774db526decf16bfd69d322afc45cc41b4ec070 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 15:17:25 -0700 Subject: a table is needed if there is a call_indirect --- src/wasm-validator.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 5e58ab408..0c3acaf6d 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -176,6 +176,7 @@ public: } } void visitCallIndirect(CallIndirect *curr) { + shouldBeTrue(getModule()->table.segments.size() > 0, curr, "no table"); auto* type = getModule()->checkFunctionType(curr->fullType); if (!shouldBeTrue(!!type, curr, "call_indirect type must exist")) return; shouldBeEqualOrFirstIsUnreachable(curr->target->type, i32, curr, "indirect call target must be an i32"); -- cgit v1.2.3 From a8356e139ffcbaa17715a2213a47a4c75051396a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 15:17:49 -0700 Subject: support (memory (data ..)) notation --- src/wasm-s-parser.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 4baab0121..3f61b113f 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1347,6 +1347,12 @@ private: void parseMemory(Element& s) { hasMemory = true; + if (s[1]->isList()) { + // (memory (data ..)) format + parseData(*s[1]); + wasm.memory.initial = wasm.memory.segments[0].data.size(); + return; + } wasm.memory.initial = atoi(s[1]->c_str()); if (s.size() == 2) return; size_t i = 2; @@ -1381,8 +1387,15 @@ private: } void parseData(Element& s) { - auto* offset = parseExpression(s[1]); - const char *input = s[2]->c_str(); + Index i = 1; + Expression* offset; + if (s[i]->isList()) { + // there is an init expression + offset = parseExpression(s[i++]); + } else { + offset = allocator.alloc()->set(Literal(int32_t(0))); + } + const char *input = s[i]->c_str(); if (auto size = strlen(input)) { std::vector data; stringToBinary(input, size, data); -- cgit v1.2.3 From ccec65e3d0c980bb1079fd0946f48dea069d224e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 15:40:22 -0700 Subject: some additional validations --- src/wasm-s-parser.h | 5 +++++ src/wasm-validator.h | 11 +++++++++++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 3f61b113f..a4dd60532 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1472,7 +1472,11 @@ private: wasm.addGlobal(global.release()); } + bool seenTable = false; + void parseTable(Element& s) { + seenTable = true; + if (s.size() == 1) return; // empty table in old notation if (!s[1]->dollared()) { if (s[1]->str() == ANYFUNC) { @@ -1495,6 +1499,7 @@ private: } void parseElem(Element& s) { + if (!seenTable) throw ParseException("elem without table", s.line, s.col); Index i = 1; Expression* offset; if (s[i]->isList()) { diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 0c3acaf6d..ffdd2a2b7 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -347,10 +347,21 @@ public: } returnType = unreachable; } + + bool isConstant(Expression* curr) { + return curr->is(); + } + void visitMemory(Memory *curr) { shouldBeFalse(curr->initial > curr->max, "memory", "memory max >= initial"); shouldBeTrue(curr->max <= Memory::kMaxSize, "memory", "max memory must be <= 4GB"); } + void visitTable(Table* curr) { + for (auto& segment : curr->segments) { + shouldBeEqual(segment.offset->type, i32, segment.offset, "segment offset should be i32"); + shouldBeTrue(isConstant(segment.offset), segment.offset, "segment offset should be constant"); + } + } void visitModule(Module *curr) { // exports std::set exportNames; -- cgit v1.2.3 From 2f5c81810d827be6412056fc33188bdae622d55d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 16:21:55 -0700 Subject: SetGlobal should not return a value --- src/wasm-binary.h | 1 - src/wasm-builder.h | 1 - src/wasm-interpreter.h | 2 +- src/wasm-s-parser.h | 1 - src/wasm.h | 4 ---- 5 files changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 5d81f01f6..fa4b78c9d 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1945,7 +1945,6 @@ public: curr->index = getU32LEB(); assert(curr->index < wasm.globals.size()); curr->value = popExpression(); - curr->type = curr->value->type; } void readMemoryAccess(Address& alignment, size_t bytes, Address& offset) { diff --git a/src/wasm-builder.h b/src/wasm-builder.h index e68fd5ef2..d5e94a25b 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -162,7 +162,6 @@ public: auto* ret = allocator.alloc(); ret->index = index; ret->value = value; - ret->type = value->type; return ret; } Load* makeLoad(unsigned bytes, bool signed_, uint32_t offset, unsigned align, Expression *ptr, WasmType type) { diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index f237f63db..096b28f5e 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -719,7 +719,7 @@ public: NOTE_EVAL1(flow.value); assert(flow.value.type == curr->type); instance.globals[index] = flow.value; - return flow; + return Flow(); } Flow visitLoad(Load *curr) { diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index a4dd60532..7ea9a521e 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -969,7 +969,6 @@ private: auto ret = allocator.alloc(); ret->index = getGlobalIndex(*s[1]); ret->value = parseExpression(s[2]); - ret->type = wasm.getGlobal(ret->index)->type; return ret; } diff --git a/src/wasm.h b/src/wasm.h index de86ebba0..43c8b192b 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1135,10 +1135,6 @@ public: Index index; Expression *value; - - void finalize() { - type = value->type; - } }; class Load : public SpecificExpression { -- cgit v1.2.3 From 38fdfdd800bc9c029ebd334ac9a08649b4d4d42e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 16:57:01 -0700 Subject: globals printing fix, handle the case with no module --- src/passes/Print.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index c0d7ed345..02e9b9065 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -83,7 +83,8 @@ struct PrintSExpression : public Visitor { } Name printableGlobal(Index index) { - return currModule->getGlobal(index)->name; + if (currModule) return currModule->getGlobal(index)->name; + return Name::fromInt(index); } std::ostream& printName(Name name) { -- cgit v1.2.3 From 99410c94d3a03aad24a9a6f53f5fc137bd336e71 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 16:58:03 -0700 Subject: interpreter debug and asserts fixing --- src/wasm-interpreter.h | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 096b28f5e..805886a30 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -31,8 +31,6 @@ #ifdef WASM_INTERPRETER_DEBUG #include "wasm-printing.h" - -int indent = 0; #endif @@ -77,32 +75,11 @@ typedef std::vector LiteralList; // Debugging helpers #ifdef WASM_INTERPRETER_DEBUG -struct IndentHandler { - const char *name; - IndentHandler(const char *name, Expression *expression) : name(name) { - doIndent(std::cout, indent); - std::cout << "visit " << name << " :\n"; - indent++; -#if WASM_INTERPRETER_DEBUG == 2 - doIndent(std::cout, indent); - if (expression) std::cout << "\n" << expression << '\n'; - indent++; -#endif - } - ~IndentHandler() { -#if WASM_INTERPRETER_DEBUG == 2 - indent--; -#endif - indent--; - doIndent(std::cout, indent); - std::cout << "exit " << name << '\n'; - } -}; -#define NOTE_ENTER(x) IndentHandler indentHandler(x, curr); -#define NOTE_ENTER_(x) IndentHandler indentHandler(x, nullptr); -#define NOTE_NAME(p0) { doIndent(std::cout, indent); std::cout << "name in " << indentHandler.name << '(' << Name(p0) << ")\n"; } -#define NOTE_EVAL1(p0) { doIndent(std::cout, indent); std::cout << "eval in " << indentHandler.name << '(' << p0 << ")\n"; } -#define NOTE_EVAL2(p0, p1) { doIndent(std::cout, indent); std::cout << "eval in " << indentHandler.name << '(' << p0 << ", " << p1 << ")\n"; } +#define NOTE_ENTER(x) { std::cout << "visit " << x << " : " << curr << "\n"; } +#define NOTE_ENTER_(x) { std::cout << "visit " << x << "\n"; } +#define NOTE_NAME(p0) { std::cout << "name " << '(' << Name(p0) << ")\n"; } +#define NOTE_EVAL1(p0) { std::cout << "eval " << '(' << p0 << ")\n"; } +#define NOTE_EVAL2(p0, p1) { std::cout << "eval " << '(' << p0 << ", " << p1 << ")\n"; } #else // WASM_INTERPRETER_DEBUG #define NOTE_ENTER(x) #define NOTE_ENTER_(x) @@ -717,7 +694,6 @@ public: if (flow.breaking()) return flow; NOTE_EVAL1(index); NOTE_EVAL1(flow.value); - assert(flow.value.type == curr->type); instance.globals[index] = flow.value; return Flow(); } -- cgit v1.2.3 From 1780339679e771f8ffe94ea5f7c38cb1272e0994 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 17:01:28 -0700 Subject: grow_memory no longer traps --- src/wasm-interpreter.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 805886a30..ae42ca648 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -720,14 +720,15 @@ public: case PageSize: return Literal((int32_t)Memory::kPageSize); case CurrentMemory: return Literal(int32_t(instance.memorySize)); case GrowMemory: { + auto fail = Literal(int32_t(-1)); Flow flow = visit(curr->operands[0]); if (flow.breaking()) return flow; int32_t ret = instance.memorySize; uint32_t delta = flow.value.geti32(); - if (delta > uint32_t(-1) /Memory::kPageSize) trap("growMemory: delta relatively too big"); - if (instance.memorySize >= uint32_t(-1) - delta) trap("growMemory: delta objectively too big"); + if (delta > uint32_t(-1) /Memory::kPageSize) return fail; + if (instance.memorySize >= uint32_t(-1) - delta) return fail; uint32_t newSize = instance.memorySize + delta; - if (newSize > instance.wasm.memory.max) trap("growMemory: exceeds max"); + if (newSize > instance.wasm.memory.max) return fail; instance.externalInterface->growMemory(instance.memorySize * Memory::kPageSize, newSize * Memory::kPageSize); instance.memorySize = newSize; return Literal(int32_t(ret)); -- cgit v1.2.3 From 15a264ee9c67816693d92a5454ad7469f1f255ff Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 18:24:35 -0700 Subject: add an ExpressionStack traversal --- src/passes/Vacuum.cpp | 21 +-------------------- src/wasm-traversal.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 1b0887181..bb005e36c 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -25,13 +25,11 @@ namespace wasm { -struct Vacuum : public WalkerPass>> { +struct Vacuum : public WalkerPass>> { bool isFunctionParallel() override { return true; } Pass* create() override { return new Vacuum; } - std::vector expressionStack; - // returns nullptr if curr is dead, curr if it must stay as is, or another node if it can be replaced Expression* optimize(Expression* curr, bool resultUsed) { while (1) { @@ -206,23 +204,6 @@ struct Vacuum : public WalkerPass>> { } } - static void visitPre(Vacuum* self, Expression** currp) { - self->expressionStack.push_back(*currp); - } - - static void visitPost(Vacuum* self, Expression** currp) { - self->expressionStack.pop_back(); - } - - // override scan to add a pre and a post check task to all nodes - static void scan(Vacuum* self, Expression** currp) { - self->pushTask(visitPost, currp); - - WalkerPass>>::scan(self, currp); - - self->pushTask(visitPre, currp); - } - void visitFunction(Function* curr) { auto* optimized = optimize(curr->body, curr->result != none); if (optimized) { diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index b69db1ea2..a345a7f4b 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -508,6 +508,49 @@ struct ControlFlowWalker : public PostWalker { } }; +// Traversal with an expression stack. + +template +struct ExpressionStackWalker : public PostWalker { + ExpressionStackWalker() {} + + std::vector expressionStack; + + // Uses the control flow stack to find the target of a break to a name + Expression* findBreakTarget(Name name) { + assert(!expressionStack.empty()); + Index i = expressionStack.size() - 1; + while (1) { + auto* curr = expressionStack[i]; + if (Block* block = curr->template dynCast()) { + if (name == block->name) return curr; + } else if (Loop* loop = curr->template dynCast()) { + if (name == loop->name) return curr; + } else { + WASM_UNREACHABLE(); + } + if (i == 0) return nullptr; + i--; + } + } + + static void doPreVisit(SubType* self, Expression** currp) { + self->expressionStack.push_back(*currp); + } + + static void doPostVisit(SubType* self, Expression** currp) { + self->expressionStack.pop_back(); + } + + static void scan(SubType* self, Expression** currp) { + self->pushTask(SubType::doPostVisit, currp); + + PostWalker::scan(self, currp); + + self->pushTask(SubType::doPreVisit, currp); + } +}; + // Traversal in the order of execution. This is quick and simple, but // does not provide the same comprehensive information that a full // conversion to basic blocks would. What it does give is a quick -- cgit v1.2.3 From ada1e2671ac3095e62f52932d3358489fdf195f0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 18:25:12 -0700 Subject: add a drop for final elements in blocks if they are not used --- src/ast_utils.h | 8 ++- test/emcc_hello_world.fromasm | 42 +++++++------ test/emcc_hello_world.fromasm.imprecise | 42 +++++++------ test/emcc_hello_world.fromasm.imprecise.no-opts | 80 +++++++++++++++---------- test/emcc_hello_world.fromasm.no-opts | 80 +++++++++++++++---------- test/min.fromasm.imprecise.no-opts | 6 +- test/min.fromasm.no-opts | 6 +- test/unit.fromasm.imprecise.no-opts | 32 ++++++---- test/unit.fromasm.no-opts | 32 ++++++---- 9 files changed, 203 insertions(+), 125 deletions(-) (limited to 'src') diff --git a/src/ast_utils.h b/src/ast_utils.h index 30e1d9a36..ea27c640f 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -789,7 +789,7 @@ struct ExpressionAnalyzer { // Adds drop() operations where necessary. This lets you not worry about adding drop when // generating code. -struct AutoDrop : public WalkerPass>> { +struct AutoDrop : public WalkerPass>> { bool isFunctionParallel() override { return true; } Pass* create() override { return new AutoDrop; } @@ -802,6 +802,12 @@ struct AutoDrop : public WalkerPass>> { curr->list[i] = Builder(*getModule()).makeDrop(child); } } + auto* last = curr->list.back(); + expressionStack.push_back(last); + if (isConcreteWasmType(last->type) && !ExpressionAnalyzer::isResultUsed(expressionStack, getFunction())) { + curr->list.back() = Builder(*getModule()).makeDrop(last); + } + expressionStack.pop_back(); } void visitFunction(Function* curr) { diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 78c577bbf..ea3485584 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -7290,10 +7290,12 @@ (i32.const 0) ) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) ) ) @@ -7519,10 +7521,12 @@ ) (br $do-once$122) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) ) (block @@ -7645,13 +7649,15 @@ (i32.const 0) ) ) - (call $___fwritex - (get_local $13) - (i32.sub - (get_local $40) + (drop + (call $___fwritex (get_local $13) + (i32.sub + (get_local $40) + (get_local $13) + ) + (get_local $0) ) - (get_local $0) ) ) ) @@ -9446,10 +9452,12 @@ (br $do-once$0) ) ) - (call $___fwritex - (get_local $6) - (get_local $1) - (get_local $0) + (drop + (call $___fwritex + (get_local $6) + (get_local $1) + (get_local $0) + ) ) ) ) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index d6c27e3c4..06efe55d2 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -7284,10 +7284,12 @@ (i32.const 0) ) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) ) ) @@ -7513,10 +7515,12 @@ ) (br $do-once$122) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $0) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $0) + ) ) ) (block @@ -7639,13 +7643,15 @@ (i32.const 0) ) ) - (call $___fwritex - (get_local $13) - (i32.sub - (get_local $40) + (drop + (call $___fwritex (get_local $13) + (i32.sub + (get_local $40) + (get_local $13) + ) + (get_local $0) ) - (get_local $0) ) ) ) @@ -9440,10 +9446,12 @@ (br $do-once$0) ) ) - (call $___fwritex - (get_local $6) - (get_local $1) - (get_local $0) + (drop + (call $___fwritex + (get_local $6) + (get_local $1) + (get_local $0) + ) ) ) ) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 298b05867..5e469d9bb 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -4670,16 +4670,18 @@ (get_local $$sub$ptr$rhs$cast) ) ) - (call_indirect $FUNCSIG$iiii - (get_local $$f) - (get_local $$sub$ptr$sub) - (i32.const 1) - (i32.add - (i32.and - (get_local $$6) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$sub$ptr$sub) + (i32.const 1) + (i32.add + (i32.and + (get_local $$6) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -12421,10 +12423,12 @@ (get_local $$sub$ptr$rhs$cast695$i) ) ) - (call $___fwritex - (get_local $$s668$1$i) - (get_local $$sub$ptr$sub696$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s668$1$i) + (get_local $$sub$ptr$sub696$i) + (get_local $$f) + ) ) ) ) @@ -12490,10 +12494,12 @@ ) (br $do-once$114) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) ) ) ) @@ -12622,10 +12628,12 @@ (get_local $$p$addr$4489$i) ) ) - (call $___fwritex - (get_local $$s715$0$lcssa$i) - (get_local $$cond732$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s715$0$lcssa$i) + (get_local $$cond732$i) + (get_local $$f) + ) ) ) ) @@ -12966,10 +12974,12 @@ (get_local $$p$addr$5501$i) ) ) - (call $___fwritex - (get_local $$s753$2$i) - (get_local $$cond800$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s753$2$i) + (get_local $$cond800$i) + (get_local $$f) + ) ) ) ) @@ -13073,10 +13083,12 @@ (get_local $$sub$ptr$rhs$cast812$i) ) ) - (call $___fwritex - (get_local $$estr$2$i) - (get_local $$sub$ptr$sub813$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$estr$2$i) + (get_local $$sub$ptr$sub813$i) + (get_local $$f) + ) ) ) ) @@ -16443,10 +16455,12 @@ (br $do-once$0) ) ) - (call $___fwritex - (get_local $$pad) - (get_local $$l$addr$0$lcssa21) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$pad) + (get_local $$l$addr$0$lcssa21) + (get_local $$f) + ) ) ) ) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 28e44d8f0..d1295a8bd 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -4676,16 +4676,18 @@ (get_local $$sub$ptr$rhs$cast) ) ) - (call_indirect $FUNCSIG$iiii - (get_local $$f) - (get_local $$sub$ptr$sub) - (i32.const 1) - (i32.add - (i32.and - (get_local $$6) - (i32.const 7) + (drop + (call_indirect $FUNCSIG$iiii + (get_local $$f) + (get_local $$sub$ptr$sub) + (i32.const 1) + (i32.add + (i32.and + (get_local $$6) + (i32.const 7) + ) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -12427,10 +12429,12 @@ (get_local $$sub$ptr$rhs$cast695$i) ) ) - (call $___fwritex - (get_local $$s668$1$i) - (get_local $$sub$ptr$sub696$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s668$1$i) + (get_local $$sub$ptr$sub696$i) + (get_local $$f) + ) ) ) ) @@ -12496,10 +12500,12 @@ ) (br $do-once$114) ) - (call $___fwritex - (i32.const 4143) - (i32.const 1) - (get_local $$f) + (drop + (call $___fwritex + (i32.const 4143) + (i32.const 1) + (get_local $$f) + ) ) ) ) @@ -12628,10 +12634,12 @@ (get_local $$p$addr$4489$i) ) ) - (call $___fwritex - (get_local $$s715$0$lcssa$i) - (get_local $$cond732$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s715$0$lcssa$i) + (get_local $$cond732$i) + (get_local $$f) + ) ) ) ) @@ -12972,10 +12980,12 @@ (get_local $$p$addr$5501$i) ) ) - (call $___fwritex - (get_local $$s753$2$i) - (get_local $$cond800$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$s753$2$i) + (get_local $$cond800$i) + (get_local $$f) + ) ) ) ) @@ -13079,10 +13089,12 @@ (get_local $$sub$ptr$rhs$cast812$i) ) ) - (call $___fwritex - (get_local $$estr$2$i) - (get_local $$sub$ptr$sub813$i) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$estr$2$i) + (get_local $$sub$ptr$sub813$i) + (get_local $$f) + ) ) ) ) @@ -16449,10 +16461,12 @@ (br $do-once$0) ) ) - (call $___fwritex - (get_local $$pad) - (get_local $$l$addr$0$lcssa21) - (get_local $$f) + (drop + (call $___fwritex + (get_local $$pad) + (get_local $$l$addr$0$lcssa21) + (get_local $$f) + ) ) ) ) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 9b9d6a353..bde70a203 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -45,8 +45,10 @@ ) ) ) - (i32.reinterpret/f32 - (get_local $f) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) ) ) ) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 9b9d6a353..bde70a203 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -45,8 +45,10 @@ ) ) ) - (i32.reinterpret/f32 - (get_local $f) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) ) ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 65f556365..05e93926b 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -371,7 +371,9 @@ (drop (f32.const 5) ) - (f32.const 0) + (drop + (f32.const 0) + ) ) ) ) @@ -611,9 +613,11 @@ (get_local $f) ) ) - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) + (drop + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) ) ) ) @@ -646,10 +650,14 @@ (drop (i32.const 4) ) - (i32.const 5) + (drop + (i32.const 5) + ) ) ) - (i32.const 6) + (drop + (i32.const 6) + ) ) ) (i32.const 7) @@ -712,13 +720,17 @@ (i32.const 4) ) ) - (call $lb - (i32.const 5) + (drop + (call $lb + (i32.const 5) + ) ) ) ) - (call $lb - (i32.const 6) + (drop + (call $lb + (i32.const 6) + ) ) ) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index a170b7676..ae894c99e 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -377,7 +377,9 @@ (drop (f32.const 5) ) - (f32.const 0) + (drop + (f32.const 0) + ) ) ) ) @@ -617,9 +619,11 @@ (get_local $f) ) ) - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) + (drop + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) ) ) ) @@ -652,10 +656,14 @@ (drop (i32.const 4) ) - (i32.const 5) + (drop + (i32.const 5) + ) ) ) - (i32.const 6) + (drop + (i32.const 6) + ) ) ) (i32.const 7) @@ -718,13 +726,17 @@ (i32.const 4) ) ) - (call $lb - (i32.const 5) + (drop + (call $lb + (i32.const 5) + ) ) ) ) - (call $lb - (i32.const 6) + (drop + (call $lb + (i32.const 6) + ) ) ) ) -- cgit v1.2.3 From e0809680bb82ecfc950aef97537827442b559fcf Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 16 Aug 2016 21:23:29 -0700 Subject: support (data .. ..), separate strings in a data() --- src/wasm-s-parser.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 7ea9a521e..429dde417 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1394,14 +1394,14 @@ private: } else { offset = allocator.alloc()->set(Literal(int32_t(0))); } - const char *input = s[i]->c_str(); - if (auto size = strlen(input)) { - std::vector data; - stringToBinary(input, size, data); - wasm.memory.segments.emplace_back(offset, data.data(), data.size()); - } else { - wasm.memory.segments.emplace_back(offset, "", 0); + std::vector data; + while (i < s.size()) { + const char *input = s[i++]->c_str(); + if (auto size = strlen(input)) { + stringToBinary(input, size, data); + } } + wasm.memory.segments.emplace_back(offset, data.data(), data.size()); } void parseExport(Element& s) { -- cgit v1.2.3 From 2e2e0241a10c0eccb89365c1b50217d6d0d3a386 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 18 Aug 2016 11:15:39 -0700 Subject: export kinds --- src/asm2wasm.h | 8 ++++- src/binaryen-c.cpp | 8 ++++- src/passes/Print.cpp | 15 +++++---- src/wasm-binary.h | 39 +++++++++++++++++----- src/wasm-linker.cpp | 7 +++- src/wasm-linker.h | 1 + src/wasm-s-parser.h | 28 ++++++++++++---- src/wasm-validator.h | 14 ++++---- src/wasm.h | 9 ++++- test/emcc_O2_hello_world.fromasm | 2 +- test/emcc_O2_hello_world.fromasm.imprecise | 2 +- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 2 +- test/emcc_O2_hello_world.fromasm.no-opts | 2 +- test/emcc_hello_world.fromasm | 2 +- test/emcc_hello_world.fromasm.imprecise | 2 +- test/emcc_hello_world.fromasm.imprecise.no-opts | 2 +- test/emcc_hello_world.fromasm.no-opts | 2 +- test/example/c-api-kitchen-sink.txt | 4 +-- test/example/c-api-kitchen-sink.txt.txt | 2 +- test/example/relooper-fuzz.txt | 4 +-- test/example/relooper-fuzz1.txt | 4 +-- test/hello_world.fromasm | 2 +- test/hello_world.fromasm.imprecise | 2 +- test/hello_world.fromasm.imprecise.no-opts | 2 +- test/hello_world.fromasm.no-opts | 2 +- test/memorygrowth.fromasm | 2 +- test/memorygrowth.fromasm.imprecise | 2 +- test/memorygrowth.fromasm.imprecise.no-opts | 2 +- test/memorygrowth.fromasm.no-opts | 2 +- test/min.fromasm | 2 +- test/min.fromasm.imprecise | 2 +- test/min.fromasm.imprecise.no-opts | 2 +- test/min.fromasm.no-opts | 2 +- test/two_sides.fromasm | 2 +- test/two_sides.fromasm.imprecise | 2 +- test/two_sides.fromasm.imprecise.no-opts | 2 +- test/two_sides.fromasm.no-opts | 2 +- test/unit.fromasm | 2 +- test/unit.fromasm.imprecise | 2 +- test/unit.fromasm.imprecise.no-opts | 2 +- test/unit.fromasm.no-opts | 2 +- 41 files changed, 131 insertions(+), 68 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 4d2ddb0cd..c88563109 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -710,6 +710,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { auto* export_ = new Export; export_->name = key; export_->value = value; + export_->kind = Export::Function; wasm.addExport(export_); exported[key] = export_; } @@ -813,10 +814,15 @@ void Asm2WasmBuilder::processAsm(Ref ast) { )); auto export_ = new Export; export_->name = export_->value = GROW_WASM_MEMORY; + export_->kind = Export::Function; wasm.addExport(export_); } - wasm.memory.exportName = MEMORY; + auto memoryExport = make_unique(); + memoryExport->name = MEMORY; + memoryExport->value = Name::fromInt(0); + memoryExport->kind = Export::Memory; + wasm.addExport(memoryExport.release()); #if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm if (udivmoddi4.is() && getTempRet0.is()) { diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 8703237d5..e333f64d8 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -805,7 +805,13 @@ void BinaryenSetMemory(BinaryenModuleRef module, BinaryenIndex initial, Binaryen auto* wasm = (Module*)module; wasm->memory.initial = initial; wasm->memory.max = maximum; - if (exportName) wasm->memory.exportName = exportName; + if (exportName) { + auto memoryExport = make_unique(); + memoryExport->name = exportName; + memoryExport->value = Name::fromInt(0); + memoryExport->kind = Export::Memory; + wasm->addExport(memoryExport.release()); + } for (BinaryenIndex i = 0; i < numSegments; i++) { wasm->memory.segments.emplace_back((Expression*)segmentOffsets[i], segments[i], segmentSizes[i]); } diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 02e9b9065..0152f917c 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -543,7 +543,14 @@ struct PrintSExpression : public Visitor { void visitExport(Export *curr) { printOpening(o, "export "); printText(o, curr->name.str) << ' '; - printName(curr->value) << ')'; + switch (curr->kind) { + case Export::Function: printName(curr->value); break; + case Export::Table: o << "table"; break; + case Export::Memory: o << "memory"; break; + case Export::Global: o << "global "; printName(curr->value); break; + default: WASM_UNREACHABLE(); + } + o << ')'; } void visitGlobal(Global *curr) { printOpening(o, "global "); @@ -636,12 +643,6 @@ struct PrintSExpression : public Visitor { } o << "\")\n"; } - if (curr->memory.exportName.is()) { - doIndent(o, indent); - printOpening(o, "export "); - printText(o, curr->memory.exportName.str) << " memory)"; - o << maybeNewLine; - } if (curr->start.is()) { doIndent(o, indent); printOpening(o, "start") << ' ' << curr->start << ')'; diff --git a/src/wasm-binary.h b/src/wasm-binary.h index fa4b78c9d..e250e26ff 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -531,8 +531,7 @@ public: if (debug) std::cerr << "== writeMemory" << std::endl; auto start = startSection(BinaryConsts::Section::Memory); o << U32LEB(wasm->memory.initial) - << U32LEB(wasm->memory.max) - << int8_t(wasm->memory.exportName.is()); // export memory + << U32LEB(wasm->memory.max); finishSection(start); } @@ -692,7 +691,14 @@ public: o << U32LEB(wasm->exports.size()); for (auto& curr : wasm->exports) { if (debug) std::cerr << "write one" << std::endl; - o << U32LEB(getFunctionIndex(curr->value)); + o << U32LEB(curr->kind); + switch (curr->kind) { + case Export::Function: o << U32LEB(getFunctionIndex(curr->value)); break; + case Export::Table: o << U32LEB(0); break; + case Export::Memory: o << U32LEB(0); break; + case Export::Global: o << U32LEB(getGlobalIndex(curr->value)); break; + default: WASM_UNREACHABLE(); + } writeInlineString(curr->name.str); } finishSection(start); @@ -741,6 +747,19 @@ public: return mappedFunctions[name]; } + std::map mappedGlobals; // name of the Global => index + uint32_t getGlobalIndex(Name name) { + if (!mappedGlobals.size()) { + // Create name => index mapping. + for (size_t i = 0; i < wasm->globals.size(); i++) { + assert(mappedGlobals.count(wasm->globals[i]->name) == 0); + mappedGlobals[wasm->globals[i]->name] = i; + } + } + assert(mappedGlobals.count(name)); + return mappedGlobals[name]; + } + void writeFunctionTable() { if (wasm->table.segments.size() == 0) return; if (debug) std::cerr << "== writeFunctionTable" << std::endl; @@ -1437,10 +1456,6 @@ public: if (debug) std::cerr << "== readMemory" << std::endl; wasm.memory.initial = getU32LEB(); wasm.memory.max = getU32LEB(); - auto exportMemory = getInt8(); - if (exportMemory) { - wasm.memory.exportName = Name("memory"); - } } void readSignatures() { @@ -1578,8 +1593,8 @@ public: for (size_t i = 0; i < num; i++) { if (debug) std::cerr << "read one" << std::endl; auto curr = new Export; + curr->kind = (Export::Kind)getU32LEB(); auto index = getU32LEB(); - assert(index < functionTypes.size()); curr->name = getInlineString(); exportIndexes[curr] = index; } @@ -1644,7 +1659,13 @@ public: for (auto& iter : exportIndexes) { Export* curr = iter.first; - curr->value = wasm.functions[iter.second]->name; + switch (curr->kind) { + case Export::Function: curr->value = wasm.functions[iter.second]->name; break; + case Export::Table: curr->value = Name::fromInt(0); break; + case Export::Memory: curr->value = Name::fromInt(0); break; + case Export::Global: curr->value = wasm.globals[iter.second]->name; break; + default: WASM_UNREACHABLE(); + } wasm.addExport(curr); } diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp index b1160e94a..9e968598a 100644 --- a/src/wasm-linker.cpp +++ b/src/wasm-linker.cpp @@ -106,7 +106,12 @@ void Linker::layout() { } if (userMaxMemory) out.wasm.memory.max = userMaxMemory / Memory::kPageSize; - out.wasm.memory.exportName = MEMORY; + + auto memoryExport = make_unique(); + memoryExport->name = MEMORY; + memoryExport->value = Name::fromInt(0); + memoryExport->kind = Export::Memory; + out.wasm.addExport(memoryExport.release()); // XXX For now, export all functions marked .globl. for (Name name : out.globls) exportFunction(name, false); diff --git a/src/wasm-linker.h b/src/wasm-linker.h index a6f5d319a..21d336273 100644 --- a/src/wasm-linker.h +++ b/src/wasm-linker.h @@ -310,6 +310,7 @@ class Linker { if (out.wasm.checkExport(name)) return; // Already exported auto exp = new Export; exp->name = exp->value = name; + exp->kind = Export::Function; out.wasm.addExport(exp); } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 429dde417..b6270217b 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -443,6 +443,7 @@ private: auto ex = make_unique(); ex->name = exportName; ex->value = name; + ex->kind = Export::Function; wasm.addExport(ex.release()); } functionCounter++; @@ -1405,15 +1406,28 @@ private: } void parseExport(Element& s) { + std::unique_ptr ex = make_unique(); if (!s[2]->dollared() && !std::isdigit(s[2]->str()[0])) { - assert(s[2]->str() == MEMORY); - if (!hasMemory) throw ParseException("memory exported but no memory"); - wasm.memory.exportName = s[1]->str(); - return; + ex->name = s[1]->str(); + if (s[2]->str() == MEMORY) { + if (!hasMemory) throw ParseException("memory exported but no memory"); + ex->value = Name::fromInt(0); + ex->kind = Export::Memory; + } else if (s[2]->str() == TABLE) { + ex->value = Name::fromInt(0); + ex->kind = Export::Table; + } else if (s[2]->str() == GLOBAL) { + ex->value = s[3]->str(); + ex->kind = Export::Table; + } else { + WASM_UNREACHABLE(); + } + } else { + // function + ex->name = s[1]->str(); + ex->value = s[2]->str(); + ex->kind = Export::Function; } - std::unique_ptr ex = make_unique(); - ex->name = s[1]->str(); - ex->value = s[2]->str(); wasm.addExport(ex.release()); } diff --git a/src/wasm-validator.h b/src/wasm-validator.h index ffdd2a2b7..77bf6d3e9 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -367,14 +367,16 @@ public: std::set exportNames; for (auto& exp : curr->exports) { Name name = exp->value; - bool found = false; - for (auto& func : curr->functions) { - if (func->name == name) { - found = true; - break; + if (exp->kind == Export::Function) { + bool found = false; + for (auto& func : curr->functions) { + if (func->name == name) { + found = true; + break; + } } + shouldBeTrue(found, name, "module exports must be found"); } - shouldBeTrue(found, name, "module exports must be found"); Name exportName = exp->name; shouldBeFalse(exportNames.count(exportName) > 0, exportName, "module exports must be unique"); exportNames.insert(exportName); diff --git a/src/wasm.h b/src/wasm.h index 43c8b192b..f93fb3a80 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1438,8 +1438,16 @@ public: class Export { public: + enum Kind { + Function = 0, + Table = 1, + Memory = 2, + Global = 3, + }; + Name name; // exported name Name value; // internal name + Kind kind; }; class Table { @@ -1484,7 +1492,6 @@ public: Address initial, max; // sizes are in pages std::vector segments; - Name exportName; Memory() : initial(0), max(kMaxSize) {} }; diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index fce0596e6..1414e1782 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -42,6 +41,7 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $0 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 8ecf57704..769fc3dd6 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -41,6 +40,7 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $0 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 163015994..79748fc64 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -41,6 +40,7 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $i1 i32) (result i32) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index d8589967a..907460e39 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -42,6 +41,7 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $i1 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index ea3485584..6154be66d 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -55,6 +54,7 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $0 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 06efe55d2..e51d8ce07 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -49,6 +48,7 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $0 i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 5e469d9bb..77f4b2a7f 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -49,6 +48,7 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $size i32) (result i32) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index d1295a8bd..4d2fb5e7a 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -55,6 +54,7 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) + (export "memory" memory) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $size i32) (result i32) diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 61b29a2eb..a49a8abcc 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -9,7 +9,6 @@ BinaryenFloat64: 4 (module (memory 1 256) (data (i32.const 10) "hello, world") - (export "mem" memory) (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (type $fiF (func (param i32 f64) (result f32))) @@ -17,6 +16,7 @@ BinaryenFloat64: 4 (type $3 (func)) (import $an-imported "module" "base" (param i32 f64) (result f32)) (export "kitchen_sinker" "$kitchen()sinker") + (export "mem" memory) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) @@ -1600,7 +1600,6 @@ int main() { (module (memory 1 256) (data (i32.const 10) "hello, world") - (export "mem" memory) (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (type $fiF (func (param i32 f64) (result f32))) @@ -1608,6 +1607,7 @@ int main() { (type $3 (func)) (import $an-imported "module" "base" (param i32 f64) (result f32)) (export "kitchen_sinker" "$kitchen()sinker") + (export "mem" memory) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index a572b8de8..cf9177060 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -4,7 +4,6 @@ (module (memory 1 256) (data (i32.const 10) "hello, world") - (export "mem" memory) (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (type $fiF (func (param i32 f64) (result f32))) @@ -12,6 +11,7 @@ (type $3 (func)) (import $an-imported "module" "base" (param i32 f64) (result f32)) (export "kitchen_sinker" "$kitchen()sinker") + (export "mem" memory) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index 2836a05de..730106cf9 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -1,11 +1,11 @@ (module (memory 1 1) - (export "mem" memory) (start $main) (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) (import $print "spectest" "print" (param i32)) + (export "mem" memory) (func $check (type $i) (result i32) (if (i32.eq @@ -293,12 +293,12 @@ ) (module (memory 1 1) - (export "mem" memory) (start $main) (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) (import $print "spectest" "print" (param i32)) + (export "mem" memory) (func $check (type $i) (result i32) (if (i32.eq diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index 32456c82a..f219e9f96 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -1,11 +1,11 @@ (module (memory 1 1) - (export "mem" memory) (start $main) (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) (import $print "spectest" "print" (param i32)) + (export "mem" memory) (func $check (type $i) (result i32) (if (i32.eq @@ -269,12 +269,12 @@ ) (module (memory 1 1) - (export "mem" memory) (start $main) (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) (import $print "spectest" "print" (param i32)) + (export "mem" memory) (func $check (type $i) (result i32) (if (i32.eq diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 66f728c52..675ef17ca 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "add" $add) + (export "memory" memory) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 66f728c52..675ef17ca 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "add" $add) + (export "memory" memory) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 435e41a60..368ffaff3 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "add" $add) + (export "memory" memory) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 435e41a60..368ffaff3 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "add" $add) + (export "memory" memory) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 7a7a98113..692c8438f 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -40,6 +39,7 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) + (export "memory" memory) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $0 i32) (result i32) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 220266314..2e22608a8 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -39,6 +38,7 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) + (export "memory" memory) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $0 i32) (result i32) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index a25625c64..f121bfc20 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -39,6 +38,7 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) + (export "memory" memory) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $a i32) (result i32) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index f2cf43833..88e2e1869 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -40,6 +39,7 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) + (export "memory" memory) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $a i32) (result i32) diff --git a/test/min.fromasm b/test/min.fromasm index b5d826e4f..06967379c 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "floats" $floats) + (export "memory" memory) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index b5d826e4f..06967379c 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "floats" $floats) + (export "memory" memory) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index bde70a203..ff101cc82 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "floats" $floats) + (export "memory" memory) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index bde70a203..ff101cc82 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "floats" $floats) + (export "memory" memory) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 0b1ed182d..9d114dc8c 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -1,9 +1,9 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (export "_test" $_test) + (export "memory" memory) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index 77ea9a202..3e982aef2 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "_test" $_test) + (export "memory" memory) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index 6c2aa1d83..d76c31b7e 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (export "memory" memory) (export "_test" $_test) + (export "memory" memory) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index 719566b73..e0b639049 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -1,9 +1,9 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (export "_test" $_test) + (export "memory" memory) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/unit.fromasm b/test/unit.fromasm index 356c935c9..1abe2a5e8 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -15,6 +14,7 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (export "big_negative" $big_negative) (export "pick" $big_negative) + (export "memory" memory) (table 10 10 anyfunc) (elem (i32.const 0) $big_negative $big_negative $big_negative $big_negative $big_negative $big_negative $importedDoubles $big_negative $big_negative $cneg) (func $big_negative diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 160047635..bba8a11a4 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) @@ -11,6 +10,7 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (export "big_negative" $big_negative) (export "pick" $big_negative) + (export "memory" memory) (table 10 10 anyfunc) (elem (i32.const 0) $big_negative $big_negative $big_negative $big_negative $big_negative $big_negative $importedDoubles $big_negative $big_negative $cneg) (func $big_negative diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 05e93926b..824606764 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) @@ -11,6 +10,7 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (export "big_negative" $big_negative) (export "pick" $exportMe) + (export "memory" memory) (table 10 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index ae894c99e..5fba592a6 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -1,6 +1,5 @@ (module (memory 256 256) - (export "memory" memory) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -15,6 +14,7 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (export "big_negative" $big_negative) (export "pick" $exportMe) + (export "memory" memory) (table 10 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative -- cgit v1.2.3 From 793863a5d0e2f864f46dac86baa8e12c63b5b004 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 18 Aug 2016 15:53:45 -0700 Subject: import kinds --- src/asm2wasm.h | 5 +++++ src/binaryen-c.cpp | 1 + src/binaryen-c.h | 2 +- src/passes/Print.cpp | 7 +++++++ src/wasm-binary.h | 27 +++++++++++++++++++----- src/wasm-linker.cpp | 2 ++ src/wasm-s-parser.h | 58 +++++++++++++++++++++++++++++++++------------------- src/wasm.h | 10 ++++++++- 8 files changed, 84 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index c88563109..10ad769ac 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -524,6 +524,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { allocateGlobal(name, type, true, import->module, import->base); delete import; } else { + import->kind = Import::Function; wasm.addImport(import); } }; @@ -1087,6 +1088,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->module = ASM2WASM; import->base = F64_REM; import->type = ensureFunctionType("ddd", &wasm); + import->kind = Import::Function; wasm.addImport(import); } return call; @@ -1112,6 +1114,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->module = ASM2WASM; import->base = call->target; import->type = ensureFunctionType("iii", &wasm); + import->kind = Import::Function; wasm.addImport(import); } return call; @@ -1150,6 +1153,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->module = ASM2WASM; import->base = DEBUGGER; import->type = ensureFunctionType("v", &wasm); + import->kind = Import::Function; wasm.addImport(import); } return call; @@ -1262,6 +1266,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->module = ASM2WASM; import->base = F64_TO_INT; import->type = ensureFunctionType("id", &wasm); + import->kind = Import::Function; wasm.addImport(import); } return ret; diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index e333f64d8..ac64b188d 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -718,6 +718,7 @@ BinaryenImportRef BinaryenAddImport(BinaryenModuleRef module, const char* intern ret->module = externalModuleName; ret->base = externalBaseName; ret->type = (FunctionType*)type; + ret->kind = Import::Function; wasm->addImport(ret); return ret; } diff --git a/src/binaryen-c.h b/src/binaryen-c.h index 5d7520a77..9ecb3f409 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -373,7 +373,7 @@ void BinaryenModuleOptimize(BinaryenModuleRef module); void BinaryenModuleAutoDrop(BinaryenModuleRef module); // Serialize a module into binary form. -// @return how many bytes were written. This will be less than or equal to bufferSize +// @return how many bytes were written. This will be less than or equal to outputSize size_t BinaryenModuleWrite(BinaryenModuleRef module, char* output, size_t outputSize); // Deserialize a module from binary form. diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 0152f917c..e9e70c1b0 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -534,6 +534,13 @@ struct PrintSExpression : public Visitor { } void visitImport(Import *curr) { printOpening(o, "import "); + switch (curr->kind) { + case Export::Function: break; + case Export::Table: o << "table "; break; + case Export::Memory: o << "memory "; break; + case Export::Global: o << "global "; break; + default: WASM_UNREACHABLE(); + } printName(curr->name) << ' '; printText(o, curr->module.str) << ' '; printText(o, curr->base.str); diff --git a/src/wasm-binary.h b/src/wasm-binary.h index e250e26ff..0949e324b 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -572,7 +572,14 @@ public: o << U32LEB(wasm->imports.size()); for (auto& import : wasm->imports) { if (debug) std::cerr << "write one" << std::endl; - o << U32LEB(getFunctionTypeIndex(import->type->name)); + o << U32LEB(import->kind); + switch (import->kind) { + case Export::Function: o << U32LEB(getFunctionTypeIndex(import->type->name)); + case Export::Table: break; + case Export::Memory: break; + case Export::Global: break; + default: WASM_UNREACHABLE(); + } writeInlineString(import->module.str); writeInlineString(import->base.str); } @@ -1492,10 +1499,20 @@ public: if (debug) std::cerr << "read one" << std::endl; auto curr = new Import; curr->name = Name(std::string("import$") + std::to_string(i)); - auto index = getU32LEB(); - assert(index < wasm.functionTypes.size()); - curr->type = wasm.getFunctionType(index); - assert(curr->type->name.is()); + curr->kind = (Import::Kind)getU32LEB(); + switch (curr->kind) { + case Export::Function: { + auto index = getU32LEB(); + assert(index < wasm.functionTypes.size()); + curr->type = wasm.getFunctionType(index); + assert(curr->type->name.is()); + break; + } + case Export::Table: break; + case Export::Memory: break; + case Export::Global: break; + default: WASM_UNREACHABLE(); + } curr->module = getInlineString(); curr->base = getInlineString(); wasm.addImport(curr); diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp index 9e968598a..1631e17a9 100644 --- a/src/wasm-linker.cpp +++ b/src/wasm-linker.cpp @@ -50,6 +50,7 @@ void Linker::ensureImport(Name target, std::string signature) { import->name = import->base = target; import->module = ENV; import->type = ensureFunctionType(signature, &out.wasm); + import->kind = Import::Function; out.wasm.addImport(import); } } @@ -339,6 +340,7 @@ void Linker::emscriptenGlue(std::ostream& o) { import->name = import->base = curr->target; import->module = ENV; import->type = ensureFunctionType(getSig(curr), &parent->out.wasm); + import->kind = Import::Function; parent->out.wasm.addImport(import); } } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index b6270217b..17185a925 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1440,33 +1440,49 @@ private: im->name = Name::fromInt(importCounter); } importCounter++; + if (!s[i]->quoted()) { + if (s[i]->str() == MEMORY) { + im->kind = Import::Memory; + } else if (s[2]->str() == TABLE) { + im->kind = Import::Table; + } else if (s[2]->str() == GLOBAL) { + im->kind = Import::Table; + } else { + WASM_UNREACHABLE(); + } + i++; + } else { + im->kind = Import::Function; + } im->module = s[i++]->str(); if (!s[i]->isStr()) throw ParseException("no name for import"); im->base = s[i++]->str(); - std::unique_ptr type = make_unique(); - if (s.size() > i) { - Element& params = *s[i]; - IString id = params[0]->str(); - if (id == PARAM) { - for (size_t i = 1; i < params.size(); i++) { - type->params.push_back(stringToWasmType(params[i]->str())); + if (im->kind == Import::Function) { + std::unique_ptr type = make_unique(); + if (s.size() > i) { + Element& params = *s[i]; + IString id = params[0]->str(); + if (id == PARAM) { + for (size_t i = 1; i < params.size(); i++) { + type->params.push_back(stringToWasmType(params[i]->str())); + } + } else if (id == RESULT) { + type->result = stringToWasmType(params[1]->str()); + } else if (id == TYPE) { + IString name = params[1]->str(); + if (!wasm.checkFunctionType(name)) throw ParseException("bad function type for import"); + *type = *wasm.getFunctionType(name); + } else { + throw ParseException("bad import element"); + } + if (s.size() > i+1) { + Element& result = *s[i+1]; + assert(result[0]->str() == RESULT); + type->result = stringToWasmType(result[1]->str()); } - } else if (id == RESULT) { - type->result = stringToWasmType(params[1]->str()); - } else if (id == TYPE) { - IString name = params[1]->str(); - if (!wasm.checkFunctionType(name)) throw ParseException("bad function type for import"); - *type = *wasm.getFunctionType(name); - } else { - throw ParseException("bad import element"); - } - if (s.size() > i+1) { - Element& result = *s[i+1]; - assert(result[0]->str() == RESULT); - type->result = stringToWasmType(result[1]->str()); } + im->type = ensureFunctionType(getSig(type.get()), &wasm); } - im->type = ensureFunctionType(getSig(type.get()), &wasm); wasm.addImport(im.release()); } diff --git a/src/wasm.h b/src/wasm.h index f93fb3a80..f26cf05a9 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1430,10 +1430,18 @@ public: class Import { public: + enum Kind { + Function = 0, + Table = 1, + Memory = 2, + Global = 3, + }; + Import() : type(nullptr) {} Name name, module, base; // name = module.base - FunctionType* type; + Kind kind; + FunctionType* type; // for Function imports }; class Export { -- cgit v1.2.3 From a10ca64dc04bdba4fbf4a468604c0c88f62a4a8d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 18 Aug 2016 17:56:01 -0700 Subject: import type for globals --- src/asm2wasm.h | 12 ++++++------ src/binaryen-c.cpp | 2 +- src/passes/Print.cpp | 8 +++++++- src/passes/RemoveImports.cpp | 2 +- src/wasm-binary.h | 12 ++++++------ src/wasm-linker.cpp | 4 ++-- src/wasm-s-parser.h | 6 ++++-- src/wasm-validator.h | 10 ++++++---- src/wasm.h | 5 +++-- 9 files changed, 36 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 10ad769ac..48c52080d 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -738,10 +738,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { // special math builtins FunctionType* builtin = getBuiltinFunctionType(import->module, import->base); if (builtin) { - import->type = builtin; + import->functionType = builtin; continue; } - import->type = ensureFunctionType(getSig(importedFunctionTypes[name].get()), &wasm); + import->functionType = ensureFunctionType(getSig(importedFunctionTypes[name].get()), &wasm); } else if (import->module != ASM2WASM) { // special-case the special module // never actually used toErase.push_back(name); @@ -1087,7 +1087,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = F64_REM; import->module = ASM2WASM; import->base = F64_REM; - import->type = ensureFunctionType("ddd", &wasm); + import->functionType = ensureFunctionType("ddd", &wasm); import->kind = Import::Function; wasm.addImport(import); } @@ -1113,7 +1113,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = call->target; import->module = ASM2WASM; import->base = call->target; - import->type = ensureFunctionType("iii", &wasm); + import->functionType = ensureFunctionType("iii", &wasm); import->kind = Import::Function; wasm.addImport(import); } @@ -1152,7 +1152,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = DEBUGGER; import->module = ASM2WASM; import->base = DEBUGGER; - import->type = ensureFunctionType("v", &wasm); + import->functionType = ensureFunctionType("v", &wasm); import->kind = Import::Function; wasm.addImport(import); } @@ -1265,7 +1265,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = F64_TO_INT; import->module = ASM2WASM; import->base = F64_TO_INT; - import->type = ensureFunctionType("id", &wasm); + import->functionType = ensureFunctionType("id", &wasm); import->kind = Import::Function; wasm.addImport(import); } diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index ac64b188d..3ce24bdbd 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -717,7 +717,7 @@ BinaryenImportRef BinaryenAddImport(BinaryenModuleRef module, const char* intern ret->name = internalName; ret->module = externalModuleName; ret->base = externalBaseName; - ret->type = (FunctionType*)type; + ret->functionType = (FunctionType*)type; ret->kind = Import::Function; wasm->addImport(ret); return ret; diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index e9e70c1b0..3e5339932 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -544,7 +544,13 @@ struct PrintSExpression : public Visitor { printName(curr->name) << ' '; printText(o, curr->module.str) << ' '; printText(o, curr->base.str); - if (curr->type) visitFunctionType(curr->type); + switch (curr->kind) { + case Export::Function: if (curr->functionType) visitFunctionType(curr->functionType); break; + case Export::Table: break; + case Export::Memory: break; + case Export::Global: o << printWasmType(curr->globalType); break; + default: WASM_UNREACHABLE(); + } o << ')'; } void visitExport(Export *curr) { diff --git a/src/passes/RemoveImports.cpp b/src/passes/RemoveImports.cpp index 0b3f50049..19d6c3eb1 100644 --- a/src/passes/RemoveImports.cpp +++ b/src/passes/RemoveImports.cpp @@ -37,7 +37,7 @@ struct RemoveImports : public WalkerPassgetImport(curr->target)->type->result; + WasmType type = module->getImport(curr->target)->functionType->result; if (type == none) { replaceCurrent(allocator->alloc()); } else { diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 0949e324b..4db728fd6 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -574,10 +574,10 @@ public: if (debug) std::cerr << "write one" << std::endl; o << U32LEB(import->kind); switch (import->kind) { - case Export::Function: o << U32LEB(getFunctionTypeIndex(import->type->name)); + case Export::Function: o << U32LEB(getFunctionTypeIndex(import->functionType->name)); case Export::Table: break; case Export::Memory: break; - case Export::Global: break; + case Export::Global: o << binaryWasmType(import->globalType);break; default: WASM_UNREACHABLE(); } writeInlineString(import->module.str); @@ -1504,13 +1504,13 @@ public: case Export::Function: { auto index = getU32LEB(); assert(index < wasm.functionTypes.size()); - curr->type = wasm.getFunctionType(index); - assert(curr->type->name.is()); + curr->functionType = wasm.getFunctionType(index); + assert(curr->functionType->name.is()); break; } case Export::Table: break; case Export::Memory: break; - case Export::Global: break; + case Export::Global: curr->globalType = getWasmType(); break; default: WASM_UNREACHABLE(); } curr->module = getInlineString(); @@ -1932,7 +1932,7 @@ public: WASM_UNUSED(arity); auto import = wasm.getImport(getU32LEB()); curr->target = import->name; - auto type = import->type; + auto type = import->functionType; assert(type); auto num = type->params.size(); assert(num == arity); diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp index 1631e17a9..04deddf4a 100644 --- a/src/wasm-linker.cpp +++ b/src/wasm-linker.cpp @@ -49,7 +49,7 @@ void Linker::ensureImport(Name target, std::string signature) { auto import = new Import; import->name = import->base = target; import->module = ENV; - import->type = ensureFunctionType(signature, &out.wasm); + import->functionType = ensureFunctionType(signature, &out.wasm); import->kind = Import::Function; out.wasm.addImport(import); } @@ -339,7 +339,7 @@ void Linker::emscriptenGlue(std::ostream& o) { auto import = new Import; import->name = import->base = curr->target; import->module = ENV; - import->type = ensureFunctionType(getSig(curr), &parent->out.wasm); + import->functionType = ensureFunctionType(getSig(curr), &parent->out.wasm); import->kind = Import::Function; parent->out.wasm.addImport(import); } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 17185a925..50d566baf 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1216,7 +1216,7 @@ private: auto ret = allocator.alloc(); ret->target = s[1]->str(); Import* import = wasm.getImport(ret->target); - ret->type = import->type->result; + ret->type = import->functionType->result; parseCallOperands(s, 2, s.size(), ret); return ret; } @@ -1481,7 +1481,9 @@ private: type->result = stringToWasmType(result[1]->str()); } } - im->type = ensureFunctionType(getSig(type.get()), &wasm); + im->functionType = ensureFunctionType(getSig(type.get()), &wasm); + } else if (im->kind == Import::Global) { + im->globalType = stringToWasmType(s[i]->str()); } wasm.addImport(im.release()); } diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 77bf6d3e9..92ae24688 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -167,7 +167,7 @@ public: void visitCallImport(CallImport *curr) { auto* import = getModule()->checkImport(curr->target); if (!shouldBeTrue(!!import, curr, "call_import target must exist")) return; - auto* type = import->type; + auto* type = import->functionType; if (!shouldBeTrue(curr->operands.size() == type->params.size(), curr, "call param number must match")) return; for (size_t i = 0; i < curr->operands.size(); i++) { if (!shouldBeEqualOrFirstIsUnreachable(curr->operands[i]->type, type->params[i], curr, "call param types must match")) { @@ -314,9 +314,11 @@ public: void visitImport(Import* curr) { if (!validateWebConstraints) return; - shouldBeUnequal(curr->type->result, i64, curr->name, "Imported function must not have i64 return type"); - for (WasmType param : curr->type->params) { - shouldBeUnequal(param, i64, curr->name, "Imported function must not have i64 parameters"); + if (curr->kind == Import::Function) { + shouldBeUnequal(curr->functionType->result, i64, curr->name, "Imported function must not have i64 return type"); + for (WasmType param : curr->functionType->params) { + shouldBeUnequal(param, i64, curr->name, "Imported function must not have i64 parameters"); + } } } diff --git a/src/wasm.h b/src/wasm.h index f26cf05a9..a2f6a74db 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1437,11 +1437,12 @@ public: Global = 3, }; - Import() : type(nullptr) {} + Import() : functionType(nullptr), globalType(none) {} Name name, module, base; // name = module.base Kind kind; - FunctionType* type; // for Function imports + FunctionType* functionType; // for Function imports + WasmType globalType; // for Global imports }; class Export { -- cgit v1.2.3 From 9660c200eff60c10266a85aae0637b495c4cba39 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 18 Aug 2016 18:03:05 -0700 Subject: get_global and set_global use a Name instead of an Index, to be more consistent with refering to other global objects; e.g. this avoids ordering issues with imported vs non-imported globals --- src/ast_utils.h | 12 ++++++------ src/passes/Print.cpp | 13 +++++-------- src/wasm-binary.h | 14 +++++++------- src/wasm-builder.h | 8 ++++---- src/wasm-interpreter.h | 20 ++++++++++---------- src/wasm-s-parser.h | 22 +++++----------------- src/wasm.h | 4 ++-- 7 files changed, 39 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/src/ast_utils.h b/src/ast_utils.h index ea27c640f..f68f776af 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -284,10 +284,10 @@ struct ExpressionManipulator { } } Expression* visitGetGlobal(GetGlobal *curr) { - return builder.makeGetGlobal(curr->index, curr->type); + return builder.makeGetGlobal(curr->name, curr->type); } Expression* visitSetGlobal(SetGlobal *curr) { - return builder.makeSetGlobal(curr->index, copy(curr->value)); + return builder.makeSetGlobal(curr->name, copy(curr->value)); } Expression* visitLoad(Load *curr) { return builder.makeLoad(curr->bytes, curr->signed_, curr->offset, curr->align, copy(curr->ptr), curr->type); @@ -493,11 +493,11 @@ struct ExpressionAnalyzer { break; } case Expression::Id::GetGlobalId: { - CHECK(GetGlobal, index); + CHECK(GetGlobal, name); break; } case Expression::Id::SetGlobalId: { - CHECK(SetGlobal, index); + CHECK(SetGlobal, name); PUSH(SetGlobal, value); break; } @@ -708,11 +708,11 @@ struct ExpressionAnalyzer { break; } case Expression::Id::GetGlobalId: { - HASH(GetGlobal, index); + HASH_NAME(GetGlobal, name); break; } case Expression::Id::SetGlobalId: { - HASH(SetGlobal, index); + HASH_NAME(SetGlobal, name); PUSH(SetGlobal, value); break; } diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 3e5339932..fcd155650 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -82,11 +82,6 @@ struct PrintSExpression : public Visitor { return name; } - Name printableGlobal(Index index) { - if (currModule) return currModule->getGlobal(index)->name; - return Name::fromInt(index); - } - std::ostream& printName(Name name) { // we need to quote names if they have tricky chars if (strpbrk(name.str, "()")) { @@ -250,10 +245,12 @@ struct PrintSExpression : public Visitor { decIndent(); } void visitGetGlobal(GetGlobal *curr) { - printOpening(o, "get_global ") << printableGlobal(curr->index) << ')'; + printOpening(o, "get_global "); + printName(curr->name) << ')'; } void visitSetGlobal(SetGlobal *curr) { - printOpening(o, "set_global ") << printableGlobal(curr->index); + printOpening(o, "set_global "); + printName(curr->name); incIndent(); printFullLine(curr->value); decIndent(); @@ -568,7 +565,7 @@ struct PrintSExpression : public Visitor { void visitGlobal(Global *curr) { printOpening(o, "global "); printName(curr->name) << ' ' << printWasmType(curr->type); - printFullLine(curr->init); + visit(curr->init); o << ')'; } void visitFunction(Function *curr) { diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 4db728fd6..d6671be01 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -971,12 +971,12 @@ public: } void visitGetGlobal(GetGlobal *curr) { if (debug) std::cerr << "zz node: GetGlobal " << (o.size() + 1) << std::endl; - o << int8_t(BinaryConsts::GetGlobal) << U32LEB(curr->index); + o << int8_t(BinaryConsts::GetGlobal) << U32LEB(getGlobalIndex(curr->name)); } void visitSetGlobal(SetGlobal *curr) { if (debug) std::cerr << "zz node: SetGlobal" << std::endl; recurse(curr->value); - o << int8_t(BinaryConsts::SetGlobal) << U32LEB(curr->index); + o << int8_t(BinaryConsts::SetGlobal) << U32LEB(getGlobalIndex(curr->name)); } void emitMemoryAccess(size_t alignment, size_t bytes, uint32_t offset) { @@ -1974,14 +1974,14 @@ public: } void visitGetGlobal(GetGlobal *curr) { if (debug) std::cerr << "zz node: GetGlobal " << pos << std::endl; - curr->index = getU32LEB(); - assert(curr->index < wasm.globals.size()); - curr->type = wasm.globals[curr->index]->type; + auto index = getU32LEB(); + curr->name = wasm.getGlobal(index)->name; + curr->type = wasm.getGlobal(index)->type; } void visitSetGlobal(SetGlobal *curr) { if (debug) std::cerr << "zz node: SetGlobal" << std::endl; - curr->index = getU32LEB(); - assert(curr->index < wasm.globals.size()); + auto index = getU32LEB(); + curr->name = wasm.getGlobal(index)->name; curr->value = popExpression(); } diff --git a/src/wasm-builder.h b/src/wasm-builder.h index d5e94a25b..2841585e6 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -152,15 +152,15 @@ public: ret->type = value->type; return ret; } - GetGlobal* makeGetGlobal(Index index, WasmType type) { + GetGlobal* makeGetGlobal(Name name, WasmType type) { auto* ret = allocator.alloc(); - ret->index = index; + ret->name = name; ret->type = type; return ret; } - SetGlobal* makeSetGlobal(Index index, Expression* value) { + SetGlobal* makeSetGlobal(Name name, Expression* value) { auto* ret = allocator.alloc(); - ret->index = index; + ret->name = name; ret->value = value; return ret; } diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index ae42ca648..db55cd143 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -529,12 +529,12 @@ public: Module& wasm; // Values of globals - std::vector globals; + std::map globals; ModuleInstance(Module& wasm, ExternalInterface* externalInterface) : wasm(wasm), externalInterface(externalInterface) { memorySize = wasm.memory.initial; - for (Index i = 0; i < wasm.globals.size(); i++) { - globals.push_back(ConstantExpressionRunner().visit(wasm.globals[i]->init).value); + for (auto& global : wasm.globals) { + globals[global->name] = ConstantExpressionRunner().visit(global->init).value; } externalInterface->init(wasm); if (wasm.start.is()) { @@ -682,19 +682,19 @@ public: Flow visitGetGlobal(GetGlobal *curr) { NOTE_ENTER("GetGlobal"); - auto index = curr->index; - NOTE_EVAL1(index); - NOTE_EVAL1(instance.globals[index]); - return instance.globals[index]; + auto name = curr->name; + NOTE_EVAL1(name); + NOTE_EVAL1(instance.globals[name]); + return instance.globals[name]; } Flow visitSetGlobal(SetGlobal *curr) { NOTE_ENTER("SetGlobal"); - auto index = curr->index; + auto name = curr->name; Flow flow = visit(curr->value); if (flow.breaking()) return flow; - NOTE_EVAL1(index); + NOTE_EVAL1(name); NOTE_EVAL1(flow.value); - instance.globals[index] = flow.value; + instance.globals[name] = flow.value; return Flow(); } diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 50d566baf..60cc21e26 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -945,30 +945,18 @@ private: return ret; } - Index getGlobalIndex(Element& s) { - if (s.dollared()) { - auto name = s.str(); - for (Index i = 0; i < wasm.globals.size(); i++) { - if (wasm.globals[i]->name == name) return i; - } - throw ParseException("bad global name", s.line, s.col); - } - // this is a numeric index - Index ret = atoi(s.c_str()); - if (!wasm.checkGlobal(ret)) throw ParseException("bad global index", s.line, s.col); - return ret; - } - Expression* makeGetGlobal(Element& s) { auto ret = allocator.alloc(); - ret->index = getGlobalIndex(*s[1]); - ret->type = wasm.getGlobal(ret->index)->type; + ret->name = s[1]->str(); + auto* global = wasm.checkGlobal(ret->name); + if (!global) throw ParseException("bad get_global name", s.line, s.col); + ret->type = global->type; return ret; } Expression* makeSetGlobal(Element& s) { auto ret = allocator.alloc(); - ret->index = getGlobalIndex(*s[1]); + ret->name = s[1]->str(); ret->value = parseExpression(s[2]); return ret; } diff --git a/src/wasm.h b/src/wasm.h index a2f6a74db..1cf00cc36 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1125,7 +1125,7 @@ public: GetGlobal() {} GetGlobal(MixedArena& allocator) {} - Index index; + Name name; }; class SetGlobal : public SpecificExpression { @@ -1133,7 +1133,7 @@ public: SetGlobal() {} SetGlobal(MixedArena& allocator) {} - Index index; + Name name; Expression *value; }; -- cgit v1.2.3 From 266e922cddf0a5c78ed22f046eeebc053a9305c0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 19 Aug 2016 09:49:38 -0700 Subject: use globals in asm2wasm --- check.py | 2 +- src/asm2wasm.h | 94 +-- src/js/wasm.js-post.js | 28 - src/passes/Print.cpp | 6 +- src/passes/Vacuum.cpp | 2 + src/shell-interface.h | 8 +- src/tools/asm2wasm.cpp | 12 +- src/wasm-binary.h | 49 +- src/wasm-interpreter.h | 18 +- src/wasm-js.cpp | 42 +- src/wasm-s-parser.h | 15 +- test/emcc_O2_hello_world.fromasm | 196 +++---- test/emcc_O2_hello_world.fromasm.imprecise | 196 +++---- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 196 +++---- test/emcc_O2_hello_world.fromasm.no-opts | 196 +++---- test/emcc_hello_world.fromasm | 540 ++++++----------- test/emcc_hello_world.fromasm.imprecise | 540 ++++++----------- test/emcc_hello_world.fromasm.imprecise.no-opts | 640 +++++++-------------- test/emcc_hello_world.fromasm.no-opts | 640 +++++++-------------- test/memorygrowth.fromasm | 240 +++----- test/memorygrowth.fromasm.imprecise | 240 +++----- test/memorygrowth.fromasm.imprecise.no-opts | 240 +++----- test/memorygrowth.fromasm.no-opts | 240 +++----- test/min.fromasm | 1 + test/min.fromasm.imprecise | 1 + test/min.fromasm.imprecise.no-opts | 1 + test/min.fromasm.no-opts | 1 + test/unit.fromasm | 18 +- test/unit.fromasm.imprecise | 18 +- test/unit.fromasm.imprecise.no-opts | 34 +- test/unit.fromasm.no-opts | 34 +- 31 files changed, 1582 insertions(+), 2906 deletions(-) (limited to 'src') diff --git a/check.py b/check.py index 8acf2498a..797da320b 100755 --- a/check.py +++ b/check.py @@ -701,7 +701,7 @@ if has_emcc: elif method == 'interpret-s-expr': os.unlink('a.wasm.asm.js') # we should not need the .asm.js if not success: - os.unlink('a.wasm.wast.mappedGlobals') + os.unlink('a.wasm.wast') elif method == 'asmjs': os.unlink('a.wasm.wast') # we should not need the .wast break_cashew() # we don't use cashew, so ok to break it diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 48c52080d..a85fd4676 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -143,15 +143,13 @@ class Asm2WasmBuilder { // globals - unsigned nextGlobal; // next place to put a global - unsigned maxGlobal; // highest address we can put a global struct MappedGlobal { - unsigned address; WasmType type; bool import; // if true, this is an import - we should read the value, not just set a zero IString module, base; - MappedGlobal() : address(0), type(none), import(false) {} - MappedGlobal(unsigned address, WasmType type, bool import, IString module, IString base) : address(address), type(type), import(import), module(module), base(base) {} + MappedGlobal() : type(none), import(false) {} + MappedGlobal(WasmType type) : type(type), import(false) {} + MappedGlobal(WasmType type, bool import, IString module, IString base) : type(type), import(import), module(module), base(base) {} }; // function table @@ -165,31 +163,20 @@ class Asm2WasmBuilder { public: std::map mappedGlobals; - // the global mapping info is not present in the output wasm. We need to save it on the side - // if we intend to load and run this module's wasm. - void serializeMappedGlobals(const char *filename) { - FILE *f = fopen(filename, "w"); - assert(f); - fprintf(f, "{\n"); - bool first = true; - for (auto& pair : mappedGlobals) { - auto name = pair.first; - auto& global = pair.second; - if (first) first = false; - else fprintf(f, ","); - fprintf(f, "\"%s\": { \"address\": %d, \"type\": %d, \"import\": %d, \"module\": \"%s\", \"base\": \"%s\" }\n", - name.str, global.address, global.type, global.import, global.module.str, global.base.str); - } - fprintf(f, "}"); - fclose(f); - } - private: - void allocateGlobal(IString name, WasmType type, bool import, IString module = IString(), IString base = IString()) { + void allocateGlobal(IString name, WasmType type) { assert(mappedGlobals.find(name) == mappedGlobals.end()); - mappedGlobals.emplace(name, MappedGlobal(nextGlobal, type, import, module, base)); - nextGlobal += 8; - assert(nextGlobal < maxGlobal); + mappedGlobals.emplace(name, MappedGlobal(type)); + auto global = new Global(); + global->name = name; + global->type = type; + Literal value; + if (type == i32) value = Literal(uint32_t(0)); + else if (type == f32) value = Literal(float(0)); + else if (type == f64) value = Literal(double(0)); + else WASM_UNREACHABLE(); + global->init = wasm.allocator.alloc()->set(value); + wasm.addGlobal(global); } struct View { @@ -278,8 +265,6 @@ public: : wasm(wasm), allocator(wasm.allocator), builder(wasm), - nextGlobal(8), - maxGlobal(1000), memoryGrowth(memoryGrowth), debug(debug), imprecise(imprecise), @@ -520,13 +505,13 @@ void Asm2WasmBuilder::processAsm(Ref ast) { type = WasmType::f64; } if (type != WasmType::none) { - // wasm has no imported constants, so allocate a global, and we need to write the value into that - allocateGlobal(name, type, true, import->module, import->base); - delete import; + import->kind = Import::Global; + import->globalType = type; + mappedGlobals.emplace(name, type); } else { import->kind = Import::Function; - wasm.addImport(import); } + wasm.addImport(import); }; IString Int8Array, Int16Array, Int32Array, UInt8Array, UInt16Array, UInt32Array, Float32Array, Float64Array; @@ -554,7 +539,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { if (value[0] == NUM) { // global int assert(value[1]->getNumber() == 0); - allocateGlobal(name, WasmType::i32, false); + allocateGlobal(name, WasmType::i32); } else if (value[0] == BINARY) { // int import assert(value[1] == OR && value[3][0] == NUM && value[3][1]->getNumber() == 0); @@ -567,14 +552,14 @@ void Asm2WasmBuilder::processAsm(Ref ast) { if (import[0] == NUM) { // global assert(import[1]->getNumber() == 0); - allocateGlobal(name, WasmType::f64, false); + allocateGlobal(name, WasmType::f64); } else { // import addImport(name, import, WasmType::f64); } } else if (value[0] == CALL) { assert(value[1][0] == NAME && value[1][1] == Math_fround && value[2][0][0] == NUM && value[2][0][1]->getNumber() == 0); - allocateGlobal(name, WasmType::f32, false); + allocateGlobal(name, WasmType::f32); } else if (value[0] == DOT) { // simple module.base import. can be a view, or a function. if (value[1][0] == NAME) { @@ -721,11 +706,9 @@ void Asm2WasmBuilder::processAsm(Ref ast) { if (optimize) { optimizingBuilder->finish(); - if (maxGlobal < 1024) { - PassRunner passRunner(&wasm); - passRunner.add("post-emscripten"); - passRunner.run(); - } + PassRunner passRunner(&wasm); + passRunner.add("post-emscripten"); + passRunner.run(); } // second pass. first, function imports @@ -733,6 +716,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { std::vector toErase; for (auto& import : wasm.imports) { + if (import->kind != Import::Function) continue; IString name = import->name; if (importedFunctionTypes.find(name) != importedFunctionTypes.end()) { // special math builtins @@ -1021,18 +1005,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ret->finalize(); return ret; } - // global var, do a store to memory + // global var assert(mappedGlobals.find(name) != mappedGlobals.end()); - MappedGlobal global = mappedGlobals[name]; - auto ret = allocator.alloc(); - ret->bytes = getWasmTypeSize(global.type); - ret->offset = 0; - ret->align = ret->bytes; - ret->ptr = builder.makeConst(Literal(int32_t(global.address))); - ret->value = process(ast[3]); - ret->valueType = global.type; - ret->finalize(); - return ret; + return builder.makeSetGlobal(name, process(ast[3])); } else if (ast[2][0] == SUB) { Ref target = ast[2]; assert(target[1][0] == NAME); @@ -1158,17 +1133,10 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } return call; } - // global var, do a load from memory + // global var assert(mappedGlobals.find(name) != mappedGlobals.end()); - MappedGlobal global = mappedGlobals[name]; - auto ret = allocator.alloc(); - ret->bytes = getWasmTypeSize(global.type); - ret->signed_ = true; // but doesn't matter - ret->offset = 0; - ret->align = ret->bytes; - ret->ptr = builder.makeConst(Literal(int32_t(global.address))); - ret->type = global.type; - return ret; + MappedGlobal& global = mappedGlobals[name]; + return builder.makeGetGlobal(name, global.type); } else if (what == SUB) { Ref target = ast[1]; assert(target[0] == NAME); diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index ae42ef175..1c207b3f3 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -123,26 +123,6 @@ function integrateWasmJS(Module) { f64: 4 }; - // wasm lacks globals, so asm2wasm maps them into locations in memory. that information cannot - // be present in the wasm output of asm2wasm, so we store it in a side file. If we load asm2wasm - // output, either generated ahead of time or on the client, we need to apply those mapped - // globals after loading the module. - function applyMappedGlobals(globalsFileBase) { - var mappedGlobals = JSON.parse(Module['read'](globalsFileBase + '.mappedGlobals')); - for (var name in mappedGlobals) { - var global = mappedGlobals[name]; - if (!global.import) continue; // non-imports are initialized to zero in the typed array anyhow, so nothing to do here - var value = lookupImport(global.module, global.base); - var address = global.address; - switch (global.type) { - case WasmTypes.i32: Module['HEAP32'][address >> 2] = value; break; - case WasmTypes.f32: Module['HEAPF32'][address >> 2] = value; break; - case WasmTypes.f64: Module['HEAPF64'][address >> 3] = value; break; - default: abort(); - } - } - } - function fixImports(imports) { if (!{{{ WASM_BACKEND }}}) return imports; var ret = {}; @@ -208,8 +188,6 @@ function integrateWasmJS(Module) { exports = instance.exports; mergeMemory(exports.memory); - applyMappedGlobals(wasmBinaryFile); - Module["usingWasm"] = true; return exports; @@ -271,12 +249,6 @@ function integrateWasmJS(Module) { Module['newBuffer'] = null; } - if (method == 'interpret-s-expr') { - applyMappedGlobals(wasmTextFile); - } else if (method == 'interpret-binary') { - applyMappedGlobals(wasmBinaryFile); - } - exports = wasmJS['asmExports']; return exports; diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index fcd155650..fe125234d 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -531,6 +531,7 @@ struct PrintSExpression : public Visitor { } void visitImport(Import *curr) { printOpening(o, "import "); + printName(curr->name) << ' '; switch (curr->kind) { case Export::Function: break; case Export::Table: o << "table "; break; @@ -538,14 +539,13 @@ struct PrintSExpression : public Visitor { case Export::Global: o << "global "; break; default: WASM_UNREACHABLE(); } - printName(curr->name) << ' '; printText(o, curr->module.str) << ' '; printText(o, curr->base.str); switch (curr->kind) { case Export::Function: if (curr->functionType) visitFunctionType(curr->functionType); break; case Export::Table: break; case Export::Memory: break; - case Export::Global: o << printWasmType(curr->globalType); break; + case Export::Global: o << ' ' << printWasmType(curr->globalType); break; default: WASM_UNREACHABLE(); } o << ')'; @@ -564,7 +564,7 @@ struct PrintSExpression : public Visitor { } void visitGlobal(Global *curr) { printOpening(o, "global "); - printName(curr->name) << ' ' << printWasmType(curr->type); + printName(curr->name) << ' ' << printWasmType(curr->type) << ' '; visit(curr->init); o << ')'; } diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index bb005e36c..150593713 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -50,6 +50,8 @@ struct Vacuum : public WalkerPass> case Expression::Id::LoadId: case Expression::Id::StoreId: case Expression::Id::ReturnId: + case Expression::Id::GetGlobalId: + case Expression::Id::SetGlobalId: case Expression::Id::HostId: case Expression::Id::UnreachableId: return curr; // always needed diff --git a/src/shell-interface.h b/src/shell-interface.h index f9afe21fb..ee9ff166a 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -90,11 +90,11 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { ShellExternalInterface() : memory() {} - void init(Module& wasm) override { + void init(Module& wasm, ModuleInstance& instance) override { memory.resize(wasm.memory.initial * wasm::Memory::kPageSize); // apply memory segments for (auto& segment : wasm.memory.segments) { - Address offset = ConstantExpressionRunner().visit(segment.offset).value.geti32(); + Address offset = ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(); assert(offset + segment.data.size() <= wasm.memory.initial * wasm::Memory::kPageSize); for (size_t i = 0; i != segment.data.size(); ++i) { memory.set(offset + i, segment.data[i]); @@ -103,7 +103,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { table.resize(wasm.table.initial); for (auto& segment : wasm.table.segments) { - Address offset = ConstantExpressionRunner().visit(segment.offset).value.geti32(); + Address offset = ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(); assert(offset + segment.data.size() <= wasm.table.initial); for (size_t i = 0; i != segment.data.size(); ++i) { table[offset + i] = segment.data[i]; @@ -111,6 +111,8 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { } } + void importGlobals(std::map& globals, Module& wasm) override {} + Literal callImport(Import *import, LiteralList& arguments) override { if (import->module == SPECTEST && import->base == PRINT) { for (auto argument : arguments) { diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index 7f1a07d1d..beacc884c 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -42,7 +42,7 @@ int main(int argc, const char *argv[]) { }) .add("--mapped-globals", "-m", "Mapped globals", Options::Arguments::One, [](Options *o, const std::string &argument) { - o->extra["mapped globals"] = argument; + std::cerr << "warning: the --mapped-globals/-m option is deprecated (a mapped globals file is no longer needed as we use wasm globals)" << std::endl; }) .add("--total-memory", "-m", "Total memory size", Options::Arguments::One, [](Options *o, const std::string &argument) { @@ -62,10 +62,6 @@ int main(int argc, const char *argv[]) { }); options.parse(argc, argv); - const auto &mg_it = options.extra.find("mapped globals"); - const char *mappedGlobals = - mg_it == options.extra.end() ? nullptr : mg_it->second.c_str(); - const auto &tm_it = options.extra.find("total memory"); size_t totalMemory = tm_it == options.extra.end() ? 16 * 1024 * 1024 : atoi(tm_it->second.c_str()); @@ -99,11 +95,5 @@ int main(int argc, const char *argv[]) { Output output(options.extra["output"], Flags::Text, options.debug ? Flags::Debug : Flags::Release); WasmPrinter::printModule(&wasm, output.getStream()); - if (mappedGlobals) { - if (options.debug) - std::cerr << "serializing mapped globals..." << std::endl; - asm2wasm.serializeMappedGlobals(mappedGlobals); - } - if (options.debug) std::cerr << "done." << std::endl; } diff --git a/src/wasm-binary.h b/src/wasm-binary.h index d6671be01..40671b082 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -741,7 +741,7 @@ public: return mappedImports[name]; } - std::map mappedFunctions; // name of the Function => index + std::map mappedFunctions; // name of the Function => index uint32_t getFunctionIndex(Name name) { if (!mappedFunctions.size()) { // Create name => index mapping. @@ -754,13 +754,20 @@ public: return mappedFunctions[name]; } - std::map mappedGlobals; // name of the Global => index + std::map mappedGlobals; // name of the Global => index. first imported globals, then internal globals uint32_t getGlobalIndex(Name name) { if (!mappedGlobals.size()) { // Create name => index mapping. + for (auto& import : wasm->imports) { + if (import->kind != Import::Global) continue; + assert(mappedGlobals.count(import->name) == 0); + auto index = mappedGlobals.size(); + mappedGlobals[import->name] = index; + } for (size_t i = 0; i < wasm->globals.size(); i++) { assert(mappedGlobals.count(wasm->globals[i]->name) == 0); - mappedGlobals[wasm->globals[i]->name] = i; + auto index = mappedGlobals.size(); + mappedGlobals[wasm->globals[i]->name] = index; } } assert(mappedGlobals.count(name)); @@ -1664,6 +1671,24 @@ public: return ret; } + std::map mappedGlobals; // index of the Global => name. first imported globals, then internal globals + Name getGlobalName(Index index) { + if (!mappedGlobals.size()) { + // Create name => index mapping. + for (auto& import : wasm.imports) { + if (import->kind != Import::Global) continue; + auto index = mappedGlobals.size(); + mappedGlobals[index] = import->name; + } + for (size_t i = 0; i < wasm.globals.size(); i++) { + auto index = mappedGlobals.size(); + mappedGlobals[index] = wasm.globals[i]->name; + } + } + assert(mappedGlobals.count(index)); + return mappedGlobals[index]; + } + void processFunctions() { for (auto& func : functions) { wasm.addFunction(func); @@ -1680,7 +1705,7 @@ public: case Export::Function: curr->value = wasm.functions[iter.second]->name; break; case Export::Table: curr->value = Name::fromInt(0); break; case Export::Memory: curr->value = Name::fromInt(0); break; - case Export::Global: curr->value = wasm.globals[iter.second]->name; break; + case Export::Global: curr->value = getGlobalName(iter.second); break; default: WASM_UNREACHABLE(); } wasm.addExport(curr); @@ -1975,13 +2000,23 @@ public: void visitGetGlobal(GetGlobal *curr) { if (debug) std::cerr << "zz node: GetGlobal " << pos << std::endl; auto index = getU32LEB(); - curr->name = wasm.getGlobal(index)->name; - curr->type = wasm.getGlobal(index)->type; + curr->name = getGlobalName(index); + auto* global = wasm.checkGlobal(curr->name); + if (global) { + curr->type = global->type; + return; + } + auto* import = wasm.checkImport(curr->name); + if (import && import->kind == Import::Global) { + curr->type = import->globalType; + return; + } + throw ParseException("bad get_global"); } void visitSetGlobal(SetGlobal *curr) { if (debug) std::cerr << "zz node: SetGlobal" << std::endl; auto index = getU32LEB(); - curr->name = wasm.getGlobal(index)->name; + curr->name = getGlobalName(index); curr->value = popExpression(); } diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index db55cd143..292d6a521 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -485,14 +485,17 @@ public: // Execute an constant expression in a global init or memory offset class ConstantExpressionRunner : public ExpressionRunner { + std::map& globals; public: + ConstantExpressionRunner(std::map& globals) : globals(globals) {} + Flow visitLoop(Loop* curr) { WASM_UNREACHABLE(); } Flow visitCall(Call* curr) { WASM_UNREACHABLE(); } Flow visitCallImport(CallImport* curr) { WASM_UNREACHABLE(); } Flow visitCallIndirect(CallIndirect* curr) { WASM_UNREACHABLE(); } Flow visitGetLocal(GetLocal *curr) { WASM_UNREACHABLE(); } Flow visitSetLocal(SetLocal *curr) { WASM_UNREACHABLE(); } - Flow visitGetGlobal(GetGlobal *curr) { WASM_UNREACHABLE(); } + Flow visitGetGlobal(GetGlobal *curr) { return Flow(globals[curr->name]); } Flow visitSetGlobal(SetGlobal *curr) { WASM_UNREACHABLE(); } Flow visitLoad(Load *curr) { WASM_UNREACHABLE(); } Flow visitStore(Store *curr) { WASM_UNREACHABLE(); } @@ -517,7 +520,8 @@ public: // an imported function or accessing memory. // struct ExternalInterface { - virtual void init(Module& wasm) {} + virtual void init(Module& wasm, ModuleInstance& instance) {} + virtual void importGlobals(std::map& globals, Module& wasm) = 0; virtual Literal callImport(Import* import, LiteralList& arguments) = 0; virtual Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instance) = 0; virtual Literal load(Load* load, Address addr) = 0; @@ -532,11 +536,17 @@ public: std::map globals; ModuleInstance(Module& wasm, ExternalInterface* externalInterface) : wasm(wasm), externalInterface(externalInterface) { + // import globals from the outside + externalInterface->importGlobals(globals, wasm); + // prepare memory memorySize = wasm.memory.initial; + // generate internal (non-imported) globals for (auto& global : wasm.globals) { - globals[global->name] = ConstantExpressionRunner().visit(global->init).value; + globals[global->name] = ConstantExpressionRunner(globals).visit(global->init).value; } - externalInterface->init(wasm); + // initialize the rest of the external interface + externalInterface->init(wasm, *this); + // run start, if present if (wasm.start.is()) { LiteralList arguments; callFunction(wasm.start, arguments); diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 3c3c4eec7..fc27bc37a 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -81,21 +81,6 @@ extern "C" void EMSCRIPTEN_KEEPALIVE load_asm2wasm(char *input) { if (wasmJSDebug) std::cerr << "wasming...\n"; asm2wasm = new Asm2WasmBuilder(*module, pre.memoryGrowth, debug, false /* TODO: support imprecise? */, false /* TODO: support optimizing? */); asm2wasm->processAsm(asmjs); - - if (wasmJSDebug) std::cerr << "mapping globals...\n"; - for (auto& pair : asm2wasm->mappedGlobals) { - auto name = pair.first; - auto& global = pair.second; - if (!global.import) continue; // non-imports are initialized to zero in the typed array anyhow, so nothing to do here - double value = EM_ASM_DOUBLE({ return Module['lookupImport'](Pointer_stringify($0), Pointer_stringify($1)) }, global.module.str, global.base.str); - uint32_t address = global.address; - switch (global.type) { - case i32: EM_ASM_({ Module['info'].parent['HEAP32'][$0 >> 2] = $1 }, address, value); break; - case f32: EM_ASM_({ Module['info'].parent['HEAPF32'][$0 >> 2] = $1 }, address, value); break; - case f64: EM_ASM_({ Module['info'].parent['HEAPF64'][$0 >> 3] = $1 }, address, value); break; - default: abort(); - } - } } void finalizeModule() { @@ -176,14 +161,14 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { var mod = Pointer_stringify($0); var base = Pointer_stringify($1); var name = Pointer_stringify($2); - assert(Module['lookupImport'](mod, base), 'checking import ' + name + ' = ' + mod + '.' + base); + assert(Module['lookupImport'](mod, base) !== undefined, 'checking import ' + name + ' = ' + mod + '.' + base); }, import->module.str, import->base.str, import->name.str); } if (wasmJSDebug) std::cerr << "creating instance...\n"; struct JSExternalInterface : ModuleInstance::ExternalInterface { - void init(Module& wasm) override { + void init(Module& wasm, ModuleInstance& instance) override { // create a new buffer here, just like native wasm support would. EM_ASM_({ Module['outside']['newBuffer'] = new ArrayBuffer($0); @@ -193,7 +178,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { var source = Module['HEAP8'].subarray($1, $1 + $2); var target = new Int8Array(Module['outside']['newBuffer']); target.set(source, $0); - }, ConstantExpressionRunner().visit(segment.offset).value.geti32(), &segment.data[0], segment.data.size()); + }, ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(), &segment.data[0], segment.data.size()); } // Table support is in a JS array. If the entry is a number, it's a function pointer. If not, it's a JS method to be called directly // TODO: make them all JS methods, wrapping a dynCall where necessary? @@ -201,7 +186,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { Module['outside']['wasmTable'] = new Array($0); }, wasm.table.initial); for (auto segment : wasm.table.segments) { - Address offset = ConstantExpressionRunner().visit(segment.offset).value.geti32(); + Address offset = ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(); assert(offset + segment.data.size() <= wasm.table.initial); for (size_t i = 0; i != segment.data.size(); ++i) { EM_ASM_({ @@ -238,6 +223,23 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { } } + void importGlobals(std::map& globals, Module& wasm) override { + for (auto& import : wasm.imports) { + if (import->kind == Import::Global) { + double ret = EM_ASM_DOUBLE({ + var mod = Pointer_stringify($0); + var base = Pointer_stringify($1); + var lookup = Module['lookupImport'](mod, base); + return lookup; + }, import->module.str, import->base.str); + + if (wasmJSDebug) std::cout << "calling importGlobal for " << import->name << " returning " << ret << '\n'; + + globals[import->name] = getResultFromJS(ret, import->globalType); + } + } + } + Literal callImport(Import *import, LiteralList& arguments) override { if (wasmJSDebug) std::cout << "calling import " << import->name.str << '\n'; prepareTempArgments(arguments); @@ -252,7 +254,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { if (wasmJSDebug) std::cout << "calling import returning " << ret << '\n'; - return getResultFromJS(ret, import->type->result); + return getResultFromJS(ret, import->functionType->result); } Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instance) override { diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 60cc21e26..65335c1be 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -949,9 +949,16 @@ private: auto ret = allocator.alloc(); ret->name = s[1]->str(); auto* global = wasm.checkGlobal(ret->name); - if (!global) throw ParseException("bad get_global name", s.line, s.col); - ret->type = global->type; - return ret; + if (global) { + ret->type = global->type; + return ret; + } + auto* import = wasm.checkImport(ret->name); + if (import && import->kind == Import::Global) { + ret->type = import->globalType; + return ret; + } + throw ParseException("bad get_global name", s.line, s.col); } Expression* makeSetGlobal(Element& s) { @@ -1434,7 +1441,7 @@ private: } else if (s[2]->str() == TABLE) { im->kind = Import::Table; } else if (s[2]->str() == GLOBAL) { - im->kind = Import::Table; + im->kind = Import::Global; } else { WASM_UNREACHABLE(); } diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 1414e1782..695602121 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -7,6 +7,12 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort" (param i32)) (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) (import $_pthread_self "env" "_pthread_self" (result i32)) @@ -42,6 +48,30 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $0 i32) (result i32) @@ -7841,16 +7871,11 @@ (local $17 i32) (local $18 i32) (set_local $11 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) @@ -8213,8 +8238,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $11) ) (get_local $16) @@ -8758,16 +8782,11 @@ (local $9 i32) (local $10 i32) (set_local $5 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -8901,8 +8920,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $5) ) (get_local $4) @@ -9423,16 +9441,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) @@ -9488,8 +9501,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -9636,16 +9648,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) @@ -9707,73 +9714,56 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $3) ) (func $copyTempDouble (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=7 (get_local $0) ) @@ -9783,16 +9773,11 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -9812,41 +9797,32 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $1) ) (get_local $0) ) (func $copyTempFloat (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) @@ -9888,26 +9864,18 @@ (func $stackAlloc (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -9929,17 +9897,13 @@ (func $setThrew (param $0 i32) (param $1 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $__THREW__) ) (block - (i32.store - (i32.const 40) + (set_global $__THREW__ (get_local $0) ) - (i32.store - (i32.const 48) + (set_global $threwValue (get_local $1) ) ) @@ -9983,12 +9947,10 @@ ) ) (func $establishStackSpace (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $1) ) ) @@ -10011,14 +9973,12 @@ (i32.const 0) ) (func $stackRestore (param $0 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) ) (func $setTempRet0 (param $0 i32) - (i32.store - (i32.const 160) + (set_global $tempRet0 (get_local $0) ) ) @@ -10035,9 +9995,7 @@ (i32.const 0) ) (func $getTempRet0 (result i32) - (i32.load - (i32.const 160) - ) + (get_global $tempRet0) ) (func $_main (result i32) (drop @@ -10048,9 +10006,7 @@ (i32.const 0) ) (func $stackSave (result i32) - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (func $b2 (param $0 i32) (call_import $abort diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 769fc3dd6..509e77491 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -7,6 +7,12 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort" (param i32)) (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) (import $_pthread_self "env" "_pthread_self" (result i32)) @@ -41,6 +47,30 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $0 i32) (result i32) @@ -7840,16 +7870,11 @@ (local $17 i32) (local $18 i32) (set_local $11 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) @@ -8212,8 +8237,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $11) ) (get_local $16) @@ -8757,16 +8781,11 @@ (local $9 i32) (local $10 i32) (set_local $5 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -8900,8 +8919,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $5) ) (get_local $4) @@ -9422,16 +9440,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) @@ -9487,8 +9500,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -9635,16 +9647,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) @@ -9706,73 +9713,56 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $3) ) (func $copyTempDouble (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=7 (get_local $0) ) @@ -9782,16 +9772,11 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -9811,41 +9796,32 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $1) ) (get_local $0) ) (func $copyTempFloat (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) @@ -9887,26 +9863,18 @@ (func $stackAlloc (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -9928,17 +9896,13 @@ (func $setThrew (param $0 i32) (param $1 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $__THREW__) ) (block - (i32.store - (i32.const 40) + (set_global $__THREW__ (get_local $0) ) - (i32.store - (i32.const 48) + (set_global $threwValue (get_local $1) ) ) @@ -9982,12 +9946,10 @@ ) ) (func $establishStackSpace (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $1) ) ) @@ -10010,14 +9972,12 @@ (i32.const 0) ) (func $stackRestore (param $0 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) ) (func $setTempRet0 (param $0 i32) - (i32.store - (i32.const 160) + (set_global $tempRet0 (get_local $0) ) ) @@ -10034,9 +9994,7 @@ (i32.const 0) ) (func $getTempRet0 (result i32) - (i32.load - (i32.const 160) - ) + (get_global $tempRet0) ) (func $_main (result i32) (drop @@ -10047,9 +10005,7 @@ (i32.const 0) ) (func $stackSave (result i32) - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (func $b2 (param $0 i32) (call_import $abort diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 79748fc64..d9be3c6ae 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -7,6 +7,12 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort" (param i32)) (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) (import $_pthread_self "env" "_pthread_self" (result i32)) @@ -41,6 +47,30 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $i1 i32) (result i32) @@ -9229,16 +9259,11 @@ (local $i23 i32) (local $i24 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) @@ -9669,8 +9694,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -10349,16 +10373,11 @@ (local $i10 i32) (local $i11 i32) (set_local $i3 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -10513,8 +10532,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i3) ) (return @@ -11123,16 +11141,11 @@ (local $i6 i32) (local $i7 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) @@ -11207,8 +11220,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -11409,16 +11421,11 @@ (local $i4 i32) (local $i5 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) @@ -11499,8 +11506,7 @@ (get_local $i3) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -11509,18 +11515,14 @@ ) (func $copyTempDouble (param $i1 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $i1) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -11532,9 +11534,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -11546,9 +11546,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -11560,9 +11558,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (i32.load8_s @@ -11574,9 +11570,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 5) ) (i32.load8_s @@ -11588,9 +11582,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 6) ) (i32.load8_s @@ -11602,9 +11594,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 7) ) (i32.load8_s @@ -11619,16 +11609,11 @@ (local $i2 i32) (local $i3 i32) (set_local $i2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -11652,8 +11637,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i2) ) (return @@ -11662,18 +11646,14 @@ ) (func $copyTempFloat (param $i1 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $i1) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -11685,9 +11665,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -11699,9 +11677,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -11758,26 +11734,18 @@ (func $stackAlloc (param $i1 i32) (result i32) (local $i2 i32) (set_local $i2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $i1) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -11814,17 +11782,13 @@ (func $setThrew (param $i1 i32) (param $i2 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $__THREW__) ) (block - (i32.store - (i32.const 40) + (set_global $__THREW__ (get_local $i1) ) - (i32.store - (i32.const 48) + (set_global $threwValue (get_local $i2) ) ) @@ -11876,12 +11840,10 @@ (return) ) (func $establishStackSpace (param $i1 i32) (param $i2 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i1) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $i2) ) ) @@ -11906,14 +11868,12 @@ ) ) (func $stackRestore (param $i1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i1) ) ) (func $setTempRet0 (param $i1 i32) - (i32.store - (i32.const 160) + (set_global $tempRet0 (get_local $i1) ) ) @@ -11935,9 +11895,7 @@ ) (func $getTempRet0 (result i32) (return - (i32.load - (i32.const 160) - ) + (get_global $tempRet0) ) ) (func $_main (result i32) @@ -11952,9 +11910,7 @@ ) (func $stackSave (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) ) (func $b2 (param $i1 i32) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 907460e39..37e32d83b 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -7,6 +7,12 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort" (param i32)) (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) (import $_pthread_self "env" "_pthread_self" (result i32)) @@ -42,6 +48,30 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (func $_malloc (param $i1 i32) (result i32) @@ -9230,16 +9260,11 @@ (local $i23 i32) (local $i24 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) @@ -9670,8 +9695,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -10350,16 +10374,11 @@ (local $i10 i32) (local $i11 i32) (set_local $i3 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -10514,8 +10533,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i3) ) (return @@ -11124,16 +11142,11 @@ (local $i6 i32) (local $i7 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) @@ -11208,8 +11221,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -11410,16 +11422,11 @@ (local $i4 i32) (local $i5 i32) (set_local $i4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) @@ -11500,8 +11507,7 @@ (get_local $i3) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i4) ) (return @@ -11510,18 +11516,14 @@ ) (func $copyTempDouble (param $i1 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $i1) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -11533,9 +11535,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -11547,9 +11547,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -11561,9 +11559,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (i32.load8_s @@ -11575,9 +11571,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 5) ) (i32.load8_s @@ -11589,9 +11583,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 6) ) (i32.load8_s @@ -11603,9 +11595,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 7) ) (i32.load8_s @@ -11620,16 +11610,11 @@ (local $i2 i32) (local $i3 i32) (set_local $i2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -11653,8 +11638,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i2) ) (return @@ -11663,18 +11647,14 @@ ) (func $copyTempFloat (param $i1 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $i1) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -11686,9 +11666,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -11700,9 +11678,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -11759,26 +11735,18 @@ (func $stackAlloc (param $i1 i32) (result i32) (local $i2 i32) (set_local $i2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $i1) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -11815,17 +11783,13 @@ (func $setThrew (param $i1 i32) (param $i2 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $__THREW__) ) (block - (i32.store - (i32.const 40) + (set_global $__THREW__ (get_local $i1) ) - (i32.store - (i32.const 48) + (set_global $threwValue (get_local $i2) ) ) @@ -11877,12 +11841,10 @@ (return) ) (func $establishStackSpace (param $i1 i32) (param $i2 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i1) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $i2) ) ) @@ -11907,14 +11869,12 @@ ) ) (func $stackRestore (param $i1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $i1) ) ) (func $setTempRet0 (param $i1 i32) - (i32.store - (i32.const 160) + (set_global $tempRet0 (get_local $i1) ) ) @@ -11936,9 +11896,7 @@ ) (func $getTempRet0 (result i32) (return - (i32.load - (i32.const 160) - ) + (get_global $tempRet0) ) ) (func $_main (result i32) @@ -11953,9 +11911,7 @@ ) (func $stackSave (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) ) (func $b2 (param $i1 i32) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 6154be66d..c0b245dd9 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -8,6 +8,13 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $cttz_i8 global "env" "cttz_i8" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort") (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) @@ -55,31 +62,47 @@ (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -87,53 +110,40 @@ ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) (get_local $1) ) (func $stackSave (result i32) - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (func $stackRestore (param $0 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) ) (func $establishStackSpace (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $1) ) ) (func $setThrew (param $0 i32) (param $1 i32) (if (i32.eq - (i32.load - (i32.const 48) - ) + (get_global $__THREW__) (i32.const 0) ) (block - (i32.store - (i32.const 48) + (set_global $__THREW__ (get_local $0) ) - (i32.store - (i32.const 56) + (set_global $threwValue (get_local $1) ) ) @@ -141,33 +151,25 @@ ) (func $copyTempFloat (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) @@ -175,105 +177,77 @@ ) (func $copyTempDouble (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=7 (get_local $0) ) ) ) (func $setTempRet0 (param $0 i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $0) ) ) (func $getTempRet0 (result i32) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (func $_main (result i32) (local $0 i32) (set_local $0 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -283,8 +257,7 @@ (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) (i32.const 0) @@ -294,25 +267,19 @@ (local $3 i32) (local $4 i32) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $0) ) (set_local $2 (call $_bitshift64Lshr (tee_local $3 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (tee_local $4 (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (i32.const 52) @@ -377,15 +344,11 @@ ) ) (i32.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $3) ) (i32.store offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.or (i32.and (get_local $4) @@ -395,9 +358,7 @@ ) ) (f64.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) ) @@ -580,27 +541,18 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -620,8 +572,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $1) ) (get_local $0) @@ -631,27 +582,18 @@ (local $4 i32) (local $5 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -715,8 +657,7 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -725,27 +666,18 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -801,8 +733,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -967,27 +898,18 @@ (local $2 i32) (local $3 i32) (set_local $2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1006,8 +928,7 @@ (get_local $3) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $2) ) (get_local $0) @@ -1035,27 +956,18 @@ (local $16 i32) (local $17 i32) (set_local $8 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1410,8 +1322,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $8) ) (get_local $14) @@ -1430,27 +1341,18 @@ (local $13 i32) (local $14 i32) (set_local $3 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 224) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1737,8 +1639,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $3) ) (get_local $0) @@ -2967,27 +2868,18 @@ (local $82 i32) (local $83 i32) (set_local $31 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 624) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -4681,9 +4573,7 @@ ) (i32.eq (tee_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 0) ) @@ -4788,9 +4678,7 @@ ) ) (set_local $5 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.store (tee_local $33 @@ -5031,18 +4919,14 @@ (i32.const 0) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $14) ) (set_local $51 (if (i32.lt_s (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) (i32.const 0) ) @@ -5093,9 +4977,7 @@ ) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $14) ) (set_local $20 @@ -5109,9 +4991,7 @@ (tee_local $1 (i32.and (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) (i32.const 2146435072) ) @@ -5764,17 +5644,13 @@ (i32.const 0) (get_local $11) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $5) (i32.const 0) ) ) (tee_local $7 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 1000000000) (i32.const 0) @@ -7919,9 +7795,7 @@ ) (i32.eq (tee_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 0) ) @@ -8706,8 +8580,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $31) ) (get_local $24) @@ -9180,9 +9053,7 @@ ) ) (set_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (if (i32.or @@ -9295,27 +9166,18 @@ (local $6 i32) (local $7 i32) (set_local $7 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 256) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -9462,8 +9324,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $7) ) ) @@ -17563,8 +17424,7 @@ (nop) ) (func $_i64Subtract (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.sub (i32.sub (get_local $1) @@ -17582,8 +17442,7 @@ ) ) (func $_i64Add (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (get_local $1) @@ -17747,8 +17606,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_u (get_local $1) (get_local $2) @@ -17780,8 +17638,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (i32.shr_u @@ -17799,8 +17656,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.shl (get_local $1) @@ -17838,8 +17694,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shl (get_local $0) (i32.sub @@ -18007,8 +17862,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_s (get_local $1) (get_local $2) @@ -18040,8 +17894,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (select (i32.const -1) (i32.const 0) @@ -18106,8 +17959,7 @@ (get_local $3) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (i32.shr_u @@ -18208,9 +18060,7 @@ (get_local $4) (get_local $0) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (call $_i64Subtract (i32.xor (tee_local $1 @@ -18266,9 +18116,7 @@ (get_local $1) (get_local $2) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (i32.const 0) ) (tee_local $1 @@ -18279,9 +18127,7 @@ ) ) (i32.xor - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (tee_local $0 (i32.xor (get_local $2) @@ -18298,16 +18144,11 @@ (local $5 i32) (local $6 i32) (set_local $6 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -18368,9 +18209,7 @@ (get_local $4) (get_local $5) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (call $_i64Subtract (i32.xor (tee_local $0 @@ -18426,9 +18265,7 @@ (get_local $0) (get_local $1) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (tee_local $0 (get_local $6) ) @@ -18453,16 +18290,12 @@ ) ) (set_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $6) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $1) ) (get_local $0) @@ -18475,8 +18308,7 @@ (get_local $2) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.add (i32.add @@ -18490,9 +18322,7 @@ ) ) (tee_local $0 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) ) (i32.and @@ -18521,16 +18351,11 @@ (func $___uremdi3 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -18545,12 +18370,10 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.load offset=4 (get_local $0) ) @@ -18625,8 +18448,7 @@ (get_local $5) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18639,8 +18461,7 @@ (get_local $2) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18662,8 +18483,7 @@ (i32.const 0) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18714,8 +18534,7 @@ (get_local $5) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18754,8 +18573,7 @@ (get_local $7) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18808,8 +18626,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18886,8 +18703,7 @@ (i32.const 0) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18915,8 +18731,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -19007,8 +18822,7 @@ (i32.const 0) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -19036,8 +18850,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -19208,8 +19021,7 @@ (i32.const 1) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (get_local $9) (i32.and @@ -19229,8 +19041,7 @@ ) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.const 0) (i32.shr_u @@ -19304,9 +19115,7 @@ ) ) (set_local $8 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $9 (get_local $0) @@ -19376,9 +19185,7 @@ (i32.or (i32.shr_s (tee_local $5 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 31) ) @@ -19436,9 +19243,7 @@ ) ) (set_local $13 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (if (i32.eq @@ -19497,8 +19302,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.or (i32.or diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index e51d8ce07..07ee8d33f 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -7,6 +7,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $cttz_i8 global "env" "cttz_i8" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort") (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) @@ -49,31 +56,47 @@ (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -81,53 +104,40 @@ ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) (get_local $1) ) (func $stackSave (result i32) - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (func $stackRestore (param $0 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) ) (func $establishStackSpace (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $1) ) ) (func $setThrew (param $0 i32) (param $1 i32) (if (i32.eq - (i32.load - (i32.const 48) - ) + (get_global $__THREW__) (i32.const 0) ) (block - (i32.store - (i32.const 48) + (set_global $__THREW__ (get_local $0) ) - (i32.store - (i32.const 56) + (set_global $threwValue (get_local $1) ) ) @@ -135,33 +145,25 @@ ) (func $copyTempFloat (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) @@ -169,105 +171,77 @@ ) (func $copyTempDouble (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s offset=7 (get_local $0) ) ) ) (func $setTempRet0 (param $0 i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $0) ) ) (func $getTempRet0 (result i32) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (func $_main (result i32) (local $0 i32) (set_local $0 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -277,8 +251,7 @@ (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $0) ) (i32.const 0) @@ -288,25 +261,19 @@ (local $3 i32) (local $4 i32) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $0) ) (set_local $2 (call $_bitshift64Lshr (tee_local $3 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (tee_local $4 (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (i32.const 52) @@ -371,15 +338,11 @@ ) ) (i32.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $3) ) (i32.store offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.or (i32.and (get_local $4) @@ -389,9 +352,7 @@ ) ) (f64.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) ) @@ -574,27 +535,18 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -614,8 +566,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $1) ) (get_local $0) @@ -625,27 +576,18 @@ (local $4 i32) (local $5 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -709,8 +651,7 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -719,27 +660,18 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -795,8 +727,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) (get_local $0) @@ -961,27 +892,18 @@ (local $2 i32) (local $3 i32) (set_local $2 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1000,8 +922,7 @@ (get_local $3) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $2) ) (get_local $0) @@ -1029,27 +950,18 @@ (local $16 i32) (local $17 i32) (set_local $8 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1404,8 +1316,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $8) ) (get_local $14) @@ -1424,27 +1335,18 @@ (local $13 i32) (local $14 i32) (set_local $3 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 224) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1731,8 +1633,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $3) ) (get_local $0) @@ -2961,27 +2862,18 @@ (local $82 i32) (local $83 i32) (set_local $31 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 624) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -4675,9 +4567,7 @@ ) (i32.eq (tee_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 0) ) @@ -4782,9 +4672,7 @@ ) ) (set_local $5 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.store (tee_local $33 @@ -5025,18 +4913,14 @@ (i32.const 0) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $14) ) (set_local $51 (if (i32.lt_s (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) (i32.const 0) ) @@ -5087,9 +4971,7 @@ ) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $14) ) (set_local $20 @@ -5103,9 +4985,7 @@ (tee_local $1 (i32.and (i32.load offset=4 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) (i32.const 2146435072) ) @@ -5758,17 +5638,13 @@ (i32.const 0) (get_local $11) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $5) (i32.const 0) ) ) (tee_local $7 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 1000000000) (i32.const 0) @@ -7913,9 +7789,7 @@ ) (i32.eq (tee_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 0) ) @@ -8700,8 +8574,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $31) ) (get_local $24) @@ -9174,9 +9047,7 @@ ) ) (set_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (if (i32.or @@ -9289,27 +9160,18 @@ (local $6 i32) (local $7 i32) (set_local $7 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 256) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -9456,8 +9318,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $7) ) ) @@ -17557,8 +17418,7 @@ (nop) ) (func $_i64Subtract (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.sub (i32.sub (get_local $1) @@ -17576,8 +17436,7 @@ ) ) (func $_i64Add (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (get_local $1) @@ -17741,8 +17600,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_u (get_local $1) (get_local $2) @@ -17774,8 +17632,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (i32.shr_u @@ -17793,8 +17650,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.shl (get_local $1) @@ -17832,8 +17688,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shl (get_local $0) (i32.sub @@ -18001,8 +17856,7 @@ (i32.const 32) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_s (get_local $1) (get_local $2) @@ -18034,8 +17888,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (select (i32.const -1) (i32.const 0) @@ -18100,8 +17953,7 @@ (get_local $3) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (i32.shr_u @@ -18202,9 +18054,7 @@ (get_local $4) (get_local $0) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (call $_i64Subtract (i32.xor (tee_local $1 @@ -18260,9 +18110,7 @@ (get_local $1) (get_local $2) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (i32.const 0) ) (tee_local $1 @@ -18273,9 +18121,7 @@ ) ) (i32.xor - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (tee_local $0 (i32.xor (get_local $2) @@ -18292,16 +18138,11 @@ (local $5 i32) (local $6 i32) (set_local $6 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -18362,9 +18203,7 @@ (get_local $4) (get_local $5) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (call $_i64Subtract (i32.xor (tee_local $0 @@ -18420,9 +18259,7 @@ (get_local $0) (get_local $1) ) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (tee_local $0 (get_local $6) ) @@ -18447,16 +18284,12 @@ ) ) (set_local $1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $6) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $1) ) (get_local $0) @@ -18469,8 +18302,7 @@ (get_local $2) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.add (i32.add @@ -18484,9 +18316,7 @@ ) ) (tee_local $0 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) ) (i32.and @@ -18515,16 +18345,11 @@ (func $___uremdi3 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -18539,12 +18364,10 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $4) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.load offset=4 (get_local $0) ) @@ -18613,8 +18436,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18630,8 +18452,7 @@ (get_local $2) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18653,8 +18474,7 @@ (i32.const 0) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18699,8 +18519,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18736,8 +18555,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18793,8 +18611,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18871,8 +18688,7 @@ (i32.const 0) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18900,8 +18716,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -18992,8 +18807,7 @@ (i32.const 0) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -19021,8 +18835,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -19193,8 +19006,7 @@ (i32.const 1) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (get_local $9) (i32.and @@ -19214,8 +19026,7 @@ ) ) (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.const 0) (i32.shr_u @@ -19289,9 +19100,7 @@ ) ) (set_local $8 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $9 (get_local $0) @@ -19361,9 +19170,7 @@ (i32.or (i32.shr_s (tee_local $5 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.const 31) ) @@ -19421,9 +19228,7 @@ ) ) (set_local $13 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (if (i32.eq @@ -19482,8 +19287,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.or (i32.or diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 77f4b2a7f..4e174f6ee 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -7,6 +7,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $cttz_i8 global "env" "cttz_i8" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort") (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) @@ -49,31 +56,47 @@ (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $size i32) (result i32) (local $ret i32) (set_local $ret - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $size) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -81,12 +104,8 @@ ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -96,42 +115,33 @@ ) (func $stackSave (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) ) (func $stackRestore (param $top i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $top) ) ) (func $establishStackSpace (param $stackBase i32) (param $stackMax i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $stackBase) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $stackMax) ) ) (func $setThrew (param $threw i32) (param $value i32) (if (i32.eq - (i32.load - (i32.const 48) - ) + (get_global $__THREW__) (i32.const 0) ) (block - (i32.store - (i32.const 48) + (set_global $__THREW__ (get_local $threw) ) - (i32.store - (i32.const 56) + (set_global $threwValue (get_local $value) ) ) @@ -139,18 +149,14 @@ ) (func $copyTempFloat (param $ptr i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $ptr) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -162,9 +168,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -176,9 +180,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -191,18 +193,14 @@ ) (func $copyTempDouble (param $ptr i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $ptr) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -214,9 +212,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -228,9 +224,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -242,9 +236,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (i32.load8_s @@ -256,9 +248,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 5) ) (i32.load8_s @@ -270,9 +260,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 6) ) (i32.load8_s @@ -284,9 +272,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 7) ) (i32.load8_s @@ -298,16 +284,13 @@ ) ) (func $setTempRet0 (param $value i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $value) ) ) (func $getTempRet0 (result i32) (return - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) ) (func $_main (result i32) @@ -316,27 +299,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -352,8 +326,7 @@ (get_local $$vararg_buffer) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -381,29 +354,21 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$x) ) (set_local $$0 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$1 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -416,9 +381,7 @@ ) ) (set_local $$3 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$conv (i32.and @@ -528,25 +491,19 @@ ) ) (i32.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$0) ) (i32.store (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (get_local $$6) ) (set_local $$7 (f64.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$retval$0 @@ -564,9 +521,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$call (call $_frexp @@ -601,9 +556,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$i$012 (i32.const 0) @@ -812,9 +765,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$0 (i32.load @@ -865,27 +816,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -918,8 +860,7 @@ (get_local $$call) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -944,27 +885,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1080,8 +1012,7 @@ (get_local $$len) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1105,27 +1036,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1232,8 +1154,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1280,9 +1201,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -1575,27 +1494,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1618,8 +1528,7 @@ (get_local $$ap) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1630,9 +1539,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (return (i32.const 0) @@ -1642,9 +1549,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (return) ) @@ -1721,27 +1626,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -2306,8 +2202,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -2363,27 +2258,18 @@ (local $sp i32) (local $stop i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 224) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -2782,8 +2668,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -2835,9 +2720,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$wend (i32.add @@ -3219,9 +3102,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$mode (i32.add @@ -3442,9 +3323,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -3832,9 +3711,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -3924,9 +3801,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$conv1 (i32.and @@ -4462,9 +4337,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.gt_u @@ -4525,9 +4398,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$wpos (i32.add @@ -4728,9 +4599,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$lockcount (i32.add @@ -5823,27 +5692,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 624) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -8426,9 +8286,7 @@ ) ) (set_local $$131 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$132 (i32.eq @@ -8605,9 +8463,7 @@ ) ) (set_local $$143 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$144 (get_local $$arg) @@ -8981,24 +8837,18 @@ (i32.const 0) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$181) ) (set_local $$182 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$183 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -9087,24 +8937,18 @@ ) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$y$addr$0$i) ) (set_local $$185 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$186 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -10129,9 +9973,7 @@ ) ) (set_local $$214 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$215 (call $_i64Add @@ -10142,9 +9984,7 @@ ) ) (set_local $$216 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$217 (call $___uremdi3 @@ -10155,9 +9995,7 @@ ) ) (set_local $$218 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.store (get_local $$d$0545$i) @@ -10172,9 +10010,7 @@ ) ) (set_local $$220 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$d$0$i (i32.add @@ -13466,9 +13302,7 @@ ) ) (set_local $$103 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$104 (i32.eq @@ -14602,8 +14436,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -14800,9 +14633,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.gt_u @@ -15953,9 +15784,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$2 (i32.gt_u @@ -16010,9 +15839,7 @@ ) ) (set_local $$10 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$11 (i32.or @@ -16045,9 +15872,7 @@ ) ) (set_local $$14 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$15 (i32.gt_u @@ -16244,27 +16069,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 256) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -16465,8 +16281,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return) @@ -17662,9 +17477,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.lt_u @@ -27467,9 +27280,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.eq @@ -30463,8 +30274,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $h) ) (get_local $l) @@ -30494,8 +30304,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $h) ) (get_local $l) @@ -30679,8 +30488,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_u (get_local $high) (get_local $bits) @@ -30706,8 +30514,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -30737,8 +30544,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.shl (get_local $high) @@ -30770,8 +30576,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shl (get_local $low) (i32.sub @@ -30966,8 +30771,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_s (get_local $high) (get_local $bits) @@ -30993,8 +30797,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (if (i32.lt_s (get_local $high) @@ -31072,8 +30875,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (i32.shr_u @@ -31233,9 +31035,7 @@ ) ) (set_local $$4$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$6$0 (call $_i64Subtract @@ -31268,9 +31068,7 @@ (get_local $$4$0) (get_local $$4$1) (get_local $$6$0) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (i32.const 0) ) ) @@ -31281,9 +31079,7 @@ (get_local $$7$0) ) (i32.xor - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $$7$1) ) (get_local $$7$0) @@ -31307,16 +31103,11 @@ (local $$10$1 i32) (local $__stackBase__ i32) (set_local $__stackBase__ - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -31428,9 +31219,7 @@ ) ) (set_local $$4$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$6$0 (call $_i64Subtract @@ -31451,9 +31240,7 @@ (get_local $$4$0) (get_local $$4$1) (get_local $$6$0) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $$rem) ) ) @@ -31479,18 +31266,14 @@ ) ) (set_local $$10$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $__stackBase__) ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$10$1) ) (get_local $$10$0) @@ -31516,9 +31299,7 @@ ) ) (set_local $$1$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$2 (i32.mul @@ -31528,8 +31309,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.add (i32.add @@ -31576,16 +31356,11 @@ (local $$rem i32) (local $__stackBase__ i32) (set_local $__stackBase__ - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -31601,14 +31376,12 @@ (get_local $$rem) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $__stackBase__) ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.load (i32.add (get_local $$rem) @@ -31753,8 +31526,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31775,8 +31547,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31809,8 +31580,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31869,8 +31639,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31917,8 +31686,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31988,8 +31756,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32075,8 +31842,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32115,8 +31881,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32222,8 +31987,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32262,8 +32026,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32464,8 +32227,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32504,8 +32266,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32569,9 +32330,7 @@ ) ) (set_local $$137$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$q_sroa_1_1198 (get_local $$q_sroa_1_1_ph) @@ -32650,9 +32409,7 @@ ) ) (set_local $$150$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$151$0 (i32.or @@ -32720,9 +32477,7 @@ (get_local $$154$0) ) (set_local $$r_sroa_1_4_extract_trunc - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$155 (i32.sub @@ -32867,8 +32622,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 4d2fb5e7a..41db5a7a1 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -8,6 +8,13 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (import $STACKTOP global "env" "STACKTOP" i32) + (import $STACK_MAX global "env" "STACK_MAX" i32) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $ABORT global "env" "ABORT" i32) + (import $cttz_i8 global "env" "cttz_i8" i32) + (import $nan global "global" "NaN" f64) + (import $inf global "global" "Infinity" f64) (import $abort "env" "abort") (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) @@ -55,31 +62,47 @@ (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) (export "memory" memory) + (global $__THREW__ i32 (i32.const 0)) + (global $threwValue i32 (i32.const 0)) + (global $setjmpId i32 (i32.const 0)) + (global $undef i32 (i32.const 0)) + (global $tempInt i32 (i32.const 0)) + (global $tempBigInt i32 (i32.const 0)) + (global $tempBigIntP i32 (i32.const 0)) + (global $tempBigIntS i32 (i32.const 0)) + (global $tempBigIntR f64 (f64.const 0)) + (global $tempBigIntI i32 (i32.const 0)) + (global $tempBigIntD i32 (i32.const 0)) + (global $tempValue i32 (i32.const 0)) + (global $tempDouble f64 (f64.const 0)) + (global $tempRet0 i32 (i32.const 0)) + (global $tempRet1 i32 (i32.const 0)) + (global $tempRet2 i32 (i32.const 0)) + (global $tempRet3 i32 (i32.const 0)) + (global $tempRet4 i32 (i32.const 0)) + (global $tempRet5 i32 (i32.const 0)) + (global $tempRet6 i32 (i32.const 0)) + (global $tempRet7 i32 (i32.const 0)) + (global $tempRet8 i32 (i32.const 0)) + (global $tempRet9 i32 (i32.const 0)) + (global $tempFloat f64 (f64.const 0)) (table 18 18 anyfunc) (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (func $stackAlloc (param $size i32) (result i32) (local $ret i32) (set_local $ret - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (get_local $size) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 15) ) (i32.const -16) @@ -87,12 +110,8 @@ ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -102,42 +121,33 @@ ) (func $stackSave (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) ) (func $stackRestore (param $top i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $top) ) ) (func $establishStackSpace (param $stackBase i32) (param $stackMax i32) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $stackBase) ) - (i32.store - (i32.const 16) + (set_global $STACK_MAX (get_local $stackMax) ) ) (func $setThrew (param $threw i32) (param $value i32) (if (i32.eq - (i32.load - (i32.const 48) - ) + (get_global $__THREW__) (i32.const 0) ) (block - (i32.store - (i32.const 48) + (set_global $__THREW__ (get_local $threw) ) - (i32.store - (i32.const 56) + (set_global $threwValue (get_local $value) ) ) @@ -145,18 +155,14 @@ ) (func $copyTempFloat (param $ptr i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $ptr) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -168,9 +174,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -182,9 +186,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -197,18 +199,14 @@ ) (func $copyTempDouble (param $ptr i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.load8_s (get_local $ptr) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 1) ) (i32.load8_s @@ -220,9 +218,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 2) ) (i32.load8_s @@ -234,9 +230,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 3) ) (i32.load8_s @@ -248,9 +242,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (i32.load8_s @@ -262,9 +254,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 5) ) (i32.load8_s @@ -276,9 +266,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 6) ) (i32.load8_s @@ -290,9 +278,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 7) ) (i32.load8_s @@ -304,16 +290,13 @@ ) ) (func $setTempRet0 (param $value i32) - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $value) ) ) (func $getTempRet0 (result i32) (return - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) ) (func $_main (result i32) @@ -322,27 +305,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -358,8 +332,7 @@ (get_local $$vararg_buffer) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -387,29 +360,21 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$x) ) (set_local $$0 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$1 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -422,9 +387,7 @@ ) ) (set_local $$3 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$conv (i32.and @@ -534,25 +497,19 @@ ) ) (i32.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$0) ) (i32.store (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) (get_local $$6) ) (set_local $$7 (f64.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$retval$0 @@ -570,9 +527,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$call (call $_frexp @@ -607,9 +562,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$i$012 (i32.const 0) @@ -818,9 +771,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$0 (i32.load @@ -871,27 +822,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -924,8 +866,7 @@ (get_local $$call) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -950,27 +891,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 80) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1086,8 +1018,7 @@ (get_local $$len) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1111,27 +1042,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 32) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1238,8 +1160,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1286,9 +1207,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -1581,27 +1500,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -1624,8 +1534,7 @@ (get_local $$ap) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -1636,9 +1545,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (return (i32.const 0) @@ -1648,9 +1555,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (return) ) @@ -1727,27 +1632,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 48) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -2312,8 +2208,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -2369,27 +2264,18 @@ (local $sp i32) (local $stop i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 224) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -2788,8 +2674,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -2841,9 +2726,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$wend (i32.add @@ -3225,9 +3108,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$mode (i32.add @@ -3448,9 +3329,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -3838,9 +3717,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$tobool (i32.eq @@ -3930,9 +3807,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$conv1 (i32.and @@ -4468,9 +4343,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.gt_u @@ -4531,9 +4404,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$wpos (i32.add @@ -4734,9 +4605,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$lockcount (i32.add @@ -5829,27 +5698,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 624) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -8432,9 +8292,7 @@ ) ) (set_local $$131 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$132 (i32.eq @@ -8611,9 +8469,7 @@ ) ) (set_local $$143 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$144 (get_local $$arg) @@ -8987,24 +8843,18 @@ (i32.const 0) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$181) ) (set_local $$182 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$183 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -9093,24 +8943,18 @@ ) ) (f64.store - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (get_local $$y$addr$0$i) ) (set_local $$185 (i32.load - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) ) ) (set_local $$186 (i32.load (i32.add - (i32.load - (i32.const 24) - ) + (get_global $tempDoublePtr) (i32.const 4) ) ) @@ -10135,9 +9979,7 @@ ) ) (set_local $$214 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$215 (call $_i64Add @@ -10148,9 +9990,7 @@ ) ) (set_local $$216 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$217 (call $___uremdi3 @@ -10161,9 +10001,7 @@ ) ) (set_local $$218 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (i32.store (get_local $$d$0545$i) @@ -10178,9 +10016,7 @@ ) ) (set_local $$220 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$d$0$i (i32.add @@ -13472,9 +13308,7 @@ ) ) (set_local $$103 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$104 (i32.eq @@ -14608,8 +14442,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return @@ -14806,9 +14639,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.gt_u @@ -15959,9 +15790,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$2 (i32.gt_u @@ -16016,9 +15845,7 @@ ) ) (set_local $$10 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$11 (i32.or @@ -16051,9 +15878,7 @@ ) ) (set_local $$14 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$15 (i32.gt_u @@ -16250,27 +16075,18 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 256) ) ) (if (i32.ge_s - (i32.load - (i32.const 8) - ) - (i32.load - (i32.const 16) - ) + (get_global $STACKTOP) + (get_global $STACK_MAX) ) (call_import $abort) ) @@ -16471,8 +16287,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $sp) ) (return) @@ -17668,9 +17483,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.lt_u @@ -27473,9 +27286,7 @@ (local $label i32) (local $sp i32) (set_local $sp - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) (set_local $$cmp (i32.eq @@ -30469,8 +30280,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $h) ) (get_local $l) @@ -30500,8 +30310,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $h) ) (get_local $l) @@ -30685,8 +30494,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_u (get_local $high) (get_local $bits) @@ -30712,8 +30520,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.const 0) ) (return @@ -30743,8 +30550,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.shl (get_local $high) @@ -30776,8 +30582,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shl (get_local $low) (i32.sub @@ -30972,8 +30777,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.shr_s (get_local $high) (get_local $bits) @@ -30999,8 +30803,7 @@ ) ) ) - (i32.store - (i32.const 168) + (set_global $tempRet0 (if (i32.lt_s (get_local $high) @@ -31078,8 +30881,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.add (i32.add (i32.shr_u @@ -31239,9 +31041,7 @@ ) ) (set_local $$4$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$6$0 (call $_i64Subtract @@ -31274,9 +31074,7 @@ (get_local $$4$0) (get_local $$4$1) (get_local $$6$0) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (i32.const 0) ) ) @@ -31287,9 +31085,7 @@ (get_local $$7$0) ) (i32.xor - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $$7$1) ) (get_local $$7$0) @@ -31313,16 +31109,11 @@ (local $$10$1 i32) (local $__stackBase__ i32) (set_local $__stackBase__ - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -31434,9 +31225,7 @@ ) ) (set_local $$4$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$6$0 (call $_i64Subtract @@ -31457,9 +31246,7 @@ (get_local $$4$0) (get_local $$4$1) (get_local $$6$0) - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) (get_local $$rem) ) ) @@ -31485,18 +31272,14 @@ ) ) (set_local $$10$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $__stackBase__) ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$10$1) ) (get_local $$10$0) @@ -31522,9 +31305,7 @@ ) ) (set_local $$1$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$2 (i32.mul @@ -31534,8 +31315,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.or (i32.add (i32.add @@ -31582,16 +31362,11 @@ (local $$rem i32) (local $__stackBase__ i32) (set_local $__stackBase__ - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (i32.add - (i32.load - (i32.const 8) - ) + (get_global $STACKTOP) (i32.const 16) ) ) @@ -31607,14 +31382,12 @@ (get_local $$rem) ) ) - (i32.store - (i32.const 8) + (set_global $STACKTOP (get_local $__stackBase__) ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (i32.load (i32.add (get_local $$rem) @@ -31759,8 +31532,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31781,8 +31553,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31815,8 +31586,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31875,8 +31645,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31923,8 +31692,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -31994,8 +31762,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32081,8 +31848,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32121,8 +31887,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32228,8 +31993,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32268,8 +32032,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32470,8 +32233,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32510,8 +32272,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) @@ -32575,9 +32336,7 @@ ) ) (set_local $$137$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$q_sroa_1_1198 (get_local $$q_sroa_1_1_ph) @@ -32656,9 +32415,7 @@ ) ) (set_local $$150$1 - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$151$0 (i32.or @@ -32726,9 +32483,7 @@ (get_local $$154$0) ) (set_local $$r_sroa_1_4_extract_trunc - (i32.load - (i32.const 168) - ) + (get_global $tempRet0) ) (set_local $$155 (i32.sub @@ -32873,8 +32628,7 @@ ) (return (block - (i32.store - (i32.const 168) + (set_global $tempRet0 (get_local $$_0$1) ) (get_local $$_0$0) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 692c8438f..a092e87b4 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -6,6 +6,12 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $r global "env" "STACKTOP" i32) + (import $s global "env" "STACK_MAX" i32) + (import $t global "env" "tempDoublePtr" i32) + (import $u global "env" "ABORT" i32) + (import $z global "global" "NaN" f64) + (import $A global "global" "Infinity" f64) (import $ja "env" "abort" (param i32)) (import $oa "env" "_pthread_cleanup_pop" (param i32)) (import $pa "env" "___lock" (param i32)) @@ -40,6 +46,30 @@ (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) (export "memory" memory) + (global $v i32 (i32.const 0)) + (global $w i32 (i32.const 0)) + (global $x i32 (i32.const 0)) + (global $y i32 (i32.const 0)) + (global $B i32 (i32.const 0)) + (global $C i32 (i32.const 0)) + (global $D i32 (i32.const 0)) + (global $E i32 (i32.const 0)) + (global $F f64 (f64.const 0)) + (global $G i32 (i32.const 0)) + (global $H i32 (i32.const 0)) + (global $I i32 (i32.const 0)) + (global $J f64 (f64.const 0)) + (global $K i32 (i32.const 0)) + (global $L i32 (i32.const 0)) + (global $M i32 (i32.const 0)) + (global $N i32 (i32.const 0)) + (global $O i32 (i32.const 0)) + (global $P i32 (i32.const 0)) + (global $Q i32 (i32.const 0)) + (global $R i32 (i32.const 0)) + (global $S i32 (i32.const 0)) + (global $T i32 (i32.const 0)) + (global $za f64 (f64.const 0)) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $0 i32) (result i32) @@ -98,16 +128,11 @@ (local $53 i32) (local $54 i32) (set_local $31 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -280,8 +305,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -651,8 +675,7 @@ (i32.const 1228) (get_local $0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -1388,8 +1411,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -2882,8 +2904,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3006,8 +3027,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3064,8 +3084,7 @@ (i32.const 3) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3161,8 +3180,7 @@ (get_local $18) ) (block - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3197,8 +3215,7 @@ ) ) (block - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -5116,8 +5133,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -6026,8 +6042,7 @@ (i32.const 3) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -6044,8 +6059,7 @@ (call $Qa) (i32.const 12) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (i32.const 0) @@ -7926,16 +7940,11 @@ (local $17 i32) (local $18 i32) (set_local $11 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 48) ) ) @@ -8298,8 +8307,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $11) ) (get_local $16) @@ -8842,16 +8850,11 @@ (local $8 i32) (local $9 i32) (set_local $5 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -8981,8 +8984,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $5) ) (get_local $4) @@ -9652,16 +9654,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 32) ) ) @@ -9717,8 +9714,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $4) ) (get_local $0) @@ -9727,16 +9723,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 80) ) ) @@ -9793,73 +9784,56 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $4) ) (get_local $3) ) (func $Ka (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=7 (get_local $0) ) @@ -9869,16 +9843,11 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -9898,8 +9867,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $1) ) (get_local $0) @@ -9925,33 +9893,25 @@ ) (func $Ja (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=3 (get_local $0) ) @@ -9985,26 +9945,18 @@ (func $Ea (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $r (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 15) ) (i32.const -16) @@ -10034,17 +9986,13 @@ (func $Ia (param $0 i32) (param $1 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $v) ) (block - (i32.store - (i32.const 40) + (set_global $v (get_local $0) ) - (i32.store - (i32.const 48) + (set_global $w (get_local $1) ) ) @@ -10087,12 +10035,10 @@ ) ) (func $Ha (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $s (get_local $1) ) ) @@ -10122,26 +10068,20 @@ ) ) (func $La (param $0 i32) - (i32.store - (i32.const 160) + (set_global $K (get_local $0) ) ) (func $Ga (param $0 i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $0) ) ) (func $Ma (result i32) - (i32.load - (i32.const 160) - ) + (get_global $K) ) (func $Fa (result i32) - (i32.load - (i32.const 8) - ) + (get_global $r) ) (func $ib (result i32) (i32.const 0) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 2e22608a8..ae2d79d38 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -6,6 +6,12 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import $r global "env" "STACKTOP" i32) + (import $s global "env" "STACK_MAX" i32) + (import $t global "env" "tempDoublePtr" i32) + (import $u global "env" "ABORT" i32) + (import $z global "global" "NaN" f64) + (import $A global "global" "Infinity" f64) (import $ja "env" "abort" (param i32)) (import $oa "env" "_pthread_cleanup_pop" (param i32)) (import $pa "env" "___lock" (param i32)) @@ -39,6 +45,30 @@ (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) (export "memory" memory) + (global $v i32 (i32.const 0)) + (global $w i32 (i32.const 0)) + (global $x i32 (i32.const 0)) + (global $y i32 (i32.const 0)) + (global $B i32 (i32.const 0)) + (global $C i32 (i32.const 0)) + (global $D i32 (i32.const 0)) + (global $E i32 (i32.const 0)) + (global $F f64 (f64.const 0)) + (global $G i32 (i32.const 0)) + (global $H i32 (i32.const 0)) + (global $I i32 (i32.const 0)) + (global $J f64 (f64.const 0)) + (global $K i32 (i32.const 0)) + (global $L i32 (i32.const 0)) + (global $M i32 (i32.const 0)) + (global $N i32 (i32.const 0)) + (global $O i32 (i32.const 0)) + (global $P i32 (i32.const 0)) + (global $Q i32 (i32.const 0)) + (global $R i32 (i32.const 0)) + (global $S i32 (i32.const 0)) + (global $T i32 (i32.const 0)) + (global $za f64 (f64.const 0)) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $0 i32) (result i32) @@ -97,16 +127,11 @@ (local $53 i32) (local $54 i32) (set_local $31 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -279,8 +304,7 @@ (i32.const 1) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -650,8 +674,7 @@ (i32.const 1228) (get_local $0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -1387,8 +1410,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -2881,8 +2903,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3005,8 +3026,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3063,8 +3083,7 @@ (i32.const 3) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3160,8 +3179,7 @@ (get_local $18) ) (block - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -3196,8 +3214,7 @@ ) ) (block - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -5115,8 +5132,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -6025,8 +6041,7 @@ (i32.const 3) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (return @@ -6043,8 +6058,7 @@ (call $Qa) (i32.const 12) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $31) ) (i32.const 0) @@ -7925,16 +7939,11 @@ (local $17 i32) (local $18 i32) (set_local $11 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 48) ) ) @@ -8297,8 +8306,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $11) ) (get_local $16) @@ -8841,16 +8849,11 @@ (local $8 i32) (local $9 i32) (set_local $5 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -8980,8 +8983,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $5) ) (get_local $4) @@ -9651,16 +9653,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 32) ) ) @@ -9716,8 +9713,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $4) ) (get_local $0) @@ -9726,16 +9722,11 @@ (local $3 i32) (local $4 i32) (set_local $4 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 80) ) ) @@ -9792,73 +9783,56 @@ (get_local $2) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $4) ) (get_local $3) ) (func $Ka (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=3 (get_local $0) ) ) (i32.store8 offset=4 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=4 (get_local $0) ) ) (i32.store8 offset=5 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=5 (get_local $0) ) ) (i32.store8 offset=6 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=6 (get_local $0) ) ) (i32.store8 offset=7 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=7 (get_local $0) ) @@ -9868,16 +9842,11 @@ (local $1 i32) (local $2 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -9897,8 +9866,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $1) ) (get_local $0) @@ -9924,33 +9892,25 @@ ) (func $Ja (param $0 i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $0) ) ) (i32.store8 offset=1 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=1 (get_local $0) ) ) (i32.store8 offset=2 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=2 (get_local $0) ) ) (i32.store8 offset=3 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s offset=3 (get_local $0) ) @@ -9984,26 +9944,18 @@ (func $Ea (param $0 i32) (result i32) (local $1 i32) (set_local $1 - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (get_local $0) ) ) - (i32.store - (i32.const 8) + (set_global $r (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 15) ) (i32.const -16) @@ -10033,17 +9985,13 @@ (func $Ia (param $0 i32) (param $1 i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $v) ) (block - (i32.store - (i32.const 40) + (set_global $v (get_local $0) ) - (i32.store - (i32.const 48) + (set_global $w (get_local $1) ) ) @@ -10086,12 +10034,10 @@ ) ) (func $Ha (param $0 i32) (param $1 i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $0) ) - (i32.store - (i32.const 16) + (set_global $s (get_local $1) ) ) @@ -10121,26 +10067,20 @@ ) ) (func $La (param $0 i32) - (i32.store - (i32.const 160) + (set_global $K (get_local $0) ) ) (func $Ga (param $0 i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $0) ) ) (func $Ma (result i32) - (i32.load - (i32.const 160) - ) + (get_global $K) ) (func $Fa (result i32) - (i32.load - (i32.const 8) - ) + (get_global $r) ) (func $ib (result i32) (i32.const 0) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index f121bfc20..758fff869 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -6,6 +6,12 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import $r global "env" "STACKTOP" i32) + (import $s global "env" "STACK_MAX" i32) + (import $t global "env" "tempDoublePtr" i32) + (import $u global "env" "ABORT" i32) + (import $z global "global" "NaN" f64) + (import $A global "global" "Infinity" f64) (import $ja "env" "abort" (param i32)) (import $oa "env" "_pthread_cleanup_pop" (param i32)) (import $pa "env" "___lock" (param i32)) @@ -39,6 +45,30 @@ (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) (export "memory" memory) + (global $v i32 (i32.const 0)) + (global $w i32 (i32.const 0)) + (global $x i32 (i32.const 0)) + (global $y i32 (i32.const 0)) + (global $B i32 (i32.const 0)) + (global $C i32 (i32.const 0)) + (global $D i32 (i32.const 0)) + (global $E i32 (i32.const 0)) + (global $F f64 (f64.const 0)) + (global $G i32 (i32.const 0)) + (global $H i32 (i32.const 0)) + (global $I i32 (i32.const 0)) + (global $J f64 (f64.const 0)) + (global $K i32 (i32.const 0)) + (global $L i32 (i32.const 0)) + (global $M i32 (i32.const 0)) + (global $N i32 (i32.const 0)) + (global $O i32 (i32.const 0)) + (global $P i32 (i32.const 0)) + (global $Q i32 (i32.const 0)) + (global $R i32 (i32.const 0)) + (global $S i32 (i32.const 0)) + (global $T i32 (i32.const 0)) + (global $za f64 (f64.const 0)) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $a i32) (result i32) @@ -136,16 +166,11 @@ (local $Ra i32) (local $Sa i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -339,8 +364,7 @@ (set_local $p (get_local $m) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -760,8 +784,7 @@ (set_local $p (get_local $o) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -1649,8 +1672,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3404,8 +3426,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3538,8 +3559,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3609,8 +3629,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3712,8 +3731,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3755,8 +3773,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -6135,8 +6152,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -7044,8 +7060,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -7065,8 +7080,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -9288,16 +9302,11 @@ (local $y i32) (local $z i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 48) ) ) @@ -9728,8 +9737,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -10410,16 +10418,11 @@ (local $m i32) (local $n i32) (set_local $c - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -10573,8 +10576,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $c) ) (return @@ -11380,16 +11382,11 @@ (local $f i32) (local $g i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 32) ) ) @@ -11464,8 +11461,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -11476,16 +11472,11 @@ (local $d i32) (local $e i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 80) ) ) @@ -11557,8 +11548,7 @@ (get_local $c) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -11567,18 +11557,14 @@ ) (func $Ka (param $a i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $a) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 1) ) (i32.load8_s @@ -11590,9 +11576,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 2) ) (i32.load8_s @@ -11604,9 +11588,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 3) ) (i32.load8_s @@ -11618,9 +11600,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 4) ) (i32.load8_s @@ -11632,9 +11612,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 5) ) (i32.load8_s @@ -11646,9 +11624,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 6) ) (i32.load8_s @@ -11660,9 +11636,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 7) ) (i32.load8_s @@ -11677,16 +11651,11 @@ (local $b i32) (local $c i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -11710,8 +11679,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -11751,18 +11719,14 @@ ) (func $Ja (param $a i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $a) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 1) ) (i32.load8_s @@ -11774,9 +11738,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 2) ) (i32.load8_s @@ -11788,9 +11750,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 3) ) (i32.load8_s @@ -11850,26 +11810,18 @@ (func $Ea (param $a i32) (result i32) (local $b i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (get_local $a) ) ) - (i32.store - (i32.const 8) + (set_global $r (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 15) ) (i32.const -16) @@ -11905,17 +11857,13 @@ (func $Ia (param $a i32) (param $b i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $v) ) (block - (i32.store - (i32.const 40) + (set_global $v (get_local $a) ) - (i32.store - (i32.const 48) + (set_global $w (get_local $b) ) ) @@ -11964,12 +11912,10 @@ ) ) (func $Ha (param $a i32) (param $b i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $a) ) - (i32.store - (i32.const 16) + (set_global $s (get_local $b) ) ) @@ -12005,29 +11951,23 @@ ) ) (func $La (param $a i32) - (i32.store - (i32.const 160) + (set_global $K (get_local $a) ) ) (func $Ga (param $a i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $a) ) ) (func $Ma (result i32) (return - (i32.load - (i32.const 160) - ) + (get_global $K) ) ) (func $Fa (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $r) ) ) (func $ib (result i32) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 88e2e1869..b506e580c 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -6,6 +6,12 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) + (import $r global "env" "STACKTOP" i32) + (import $s global "env" "STACK_MAX" i32) + (import $t global "env" "tempDoublePtr" i32) + (import $u global "env" "ABORT" i32) + (import $z global "global" "NaN" f64) + (import $A global "global" "Infinity" f64) (import $ja "env" "abort" (param i32)) (import $oa "env" "_pthread_cleanup_pop" (param i32)) (import $pa "env" "___lock" (param i32)) @@ -40,6 +46,30 @@ (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) (export "memory" memory) + (global $v i32 (i32.const 0)) + (global $w i32 (i32.const 0)) + (global $x i32 (i32.const 0)) + (global $y i32 (i32.const 0)) + (global $B i32 (i32.const 0)) + (global $C i32 (i32.const 0)) + (global $D i32 (i32.const 0)) + (global $E i32 (i32.const 0)) + (global $F f64 (f64.const 0)) + (global $G i32 (i32.const 0)) + (global $H i32 (i32.const 0)) + (global $I i32 (i32.const 0)) + (global $J f64 (f64.const 0)) + (global $K i32 (i32.const 0)) + (global $L i32 (i32.const 0)) + (global $M i32 (i32.const 0)) + (global $N i32 (i32.const 0)) + (global $O i32 (i32.const 0)) + (global $P i32 (i32.const 0)) + (global $Q i32 (i32.const 0)) + (global $R i32 (i32.const 0)) + (global $S i32 (i32.const 0)) + (global $T i32 (i32.const 0)) + (global $za f64 (f64.const 0)) (table 8 8 anyfunc) (elem (i32.const 0) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (func $eb (param $a i32) (result i32) @@ -137,16 +167,11 @@ (local $Ra i32) (local $Sa i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -340,8 +365,7 @@ (set_local $p (get_local $m) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -761,8 +785,7 @@ (set_local $p (get_local $o) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -1650,8 +1673,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3405,8 +3427,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3539,8 +3560,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3610,8 +3630,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3713,8 +3732,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -3756,8 +3774,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -6136,8 +6153,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -7045,8 +7061,7 @@ (i32.const 8) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -7066,8 +7081,7 @@ (set_local $p (i32.const 0) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -9289,16 +9303,11 @@ (local $y i32) (local $z i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 48) ) ) @@ -9729,8 +9738,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -10411,16 +10419,11 @@ (local $m i32) (local $n i32) (set_local $c - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -10574,8 +10577,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $c) ) (return @@ -11381,16 +11383,11 @@ (local $f i32) (local $g i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 32) ) ) @@ -11465,8 +11462,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -11477,16 +11473,11 @@ (local $d i32) (local $e i32) (set_local $d - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 80) ) ) @@ -11558,8 +11549,7 @@ (get_local $c) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $d) ) (return @@ -11568,18 +11558,14 @@ ) (func $Ka (param $a i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $a) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 1) ) (i32.load8_s @@ -11591,9 +11577,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 2) ) (i32.load8_s @@ -11605,9 +11589,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 3) ) (i32.load8_s @@ -11619,9 +11601,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 4) ) (i32.load8_s @@ -11633,9 +11613,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 5) ) (i32.load8_s @@ -11647,9 +11625,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 6) ) (i32.load8_s @@ -11661,9 +11637,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 7) ) (i32.load8_s @@ -11678,16 +11652,11 @@ (local $b i32) (local $c i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 16) ) ) @@ -11711,8 +11680,7 @@ ) ) ) - (i32.store - (i32.const 8) + (set_global $r (get_local $b) ) (return @@ -11752,18 +11720,14 @@ ) (func $Ja (param $a i32) (i32.store8 - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.load8_s (get_local $a) ) ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 1) ) (i32.load8_s @@ -11775,9 +11739,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 2) ) (i32.load8_s @@ -11789,9 +11751,7 @@ ) (i32.store8 (i32.add - (i32.load - (i32.const 24) - ) + (get_global $t) (i32.const 3) ) (i32.load8_s @@ -11851,26 +11811,18 @@ (func $Ea (param $a i32) (result i32) (local $b i32) (set_local $b - (i32.load - (i32.const 8) - ) + (get_global $r) ) - (i32.store - (i32.const 8) + (set_global $r (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (get_local $a) ) ) - (i32.store - (i32.const 8) + (set_global $r (i32.and (i32.add - (i32.load - (i32.const 8) - ) + (get_global $r) (i32.const 15) ) (i32.const -16) @@ -11906,17 +11858,13 @@ (func $Ia (param $a i32) (param $b i32) (if (i32.eqz - (i32.load - (i32.const 40) - ) + (get_global $v) ) (block - (i32.store - (i32.const 40) + (set_global $v (get_local $a) ) - (i32.store - (i32.const 48) + (set_global $w (get_local $b) ) ) @@ -11965,12 +11913,10 @@ ) ) (func $Ha (param $a i32) (param $b i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $a) ) - (i32.store - (i32.const 16) + (set_global $s (get_local $b) ) ) @@ -12006,29 +11952,23 @@ ) ) (func $La (param $a i32) - (i32.store - (i32.const 160) + (set_global $K (get_local $a) ) ) (func $Ga (param $a i32) - (i32.store - (i32.const 8) + (set_global $r (get_local $a) ) ) (func $Ma (result i32) (return - (i32.load - (i32.const 160) - ) + (get_global $K) ) ) (func $Fa (result i32) (return - (i32.load - (i32.const 8) - ) + (get_global $r) ) ) (func $ib (result i32) diff --git a/test/min.fromasm b/test/min.fromasm index 06967379c..9c0d90097 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,5 +1,6 @@ (module (memory 256 256) + (import $tDP global "env" "tempDoublePtr" i32) (export "floats" $floats) (export "memory" memory) (func $floats (param $0 f32) (result f32) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 06967379c..9c0d90097 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,5 +1,6 @@ (module (memory 256 256) + (import $tDP global "env" "tempDoublePtr" i32) (export "floats" $floats) (export "memory" memory) (func $floats (param $0 f32) (result f32) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index ff101cc82..899bf5317 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,5 +1,6 @@ (module (memory 256 256) + (import $tDP global "env" "tempDoublePtr" i32) (export "floats" $floats) (export "memory" memory) (func $floats (param $f f32) (result f32) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index ff101cc82..899bf5317 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,5 +1,6 @@ (module (memory 256 256) + (import $tDP global "env" "tempDoublePtr" i32) (export "floats" $floats) (export "memory" memory) (func $floats (param $f f32) (result f32) diff --git a/test/unit.fromasm b/test/unit.fromasm index 1abe2a5e8..78a97a9d7 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -6,6 +6,10 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vd (func (param f64))) + (import $t global "global" "NaN" f64) + (import $u global "global" "Infinity" f64) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $n global "env" "gb" i32) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -15,6 +19,8 @@ (export "big_negative" $big_negative) (export "pick" $big_negative) (export "memory" memory) + (global $Int i32 (i32.const 0)) + (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) (elem (i32.const 0) $big_negative $big_negative $big_negative $big_negative $big_negative $big_negative $importedDoubles $big_negative $big_negative $cneg) (func $big_negative @@ -23,9 +29,7 @@ (func $importedDoubles (result f64) (if (i32.gt_s - (i32.load - (i32.const 24) - ) + (get_global $Int) (i32.const 0) ) (return @@ -34,9 +38,7 @@ ) (if (f64.gt - (f64.load - (i32.const 32) - ) + (get_global $Double) (f64.const 0) ) (return @@ -439,9 +441,7 @@ (get_local $0) (i32.add (i32.add - (i32.load - (i32.const 48) - ) + (get_global $n) (i32.const 136) ) (i32.const 8) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index bba8a11a4..a18e1f436 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -4,6 +4,10 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vd (func (param f64))) + (import $t global "global" "NaN" f64) + (import $u global "global" "Infinity" f64) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $n global "env" "gb" i32) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -11,6 +15,8 @@ (export "big_negative" $big_negative) (export "pick" $big_negative) (export "memory" memory) + (global $Int i32 (i32.const 0)) + (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) (elem (i32.const 0) $big_negative $big_negative $big_negative $big_negative $big_negative $big_negative $importedDoubles $big_negative $big_negative $cneg) (func $big_negative @@ -19,9 +25,7 @@ (func $importedDoubles (result f64) (if (i32.gt_s - (i32.load - (i32.const 24) - ) + (get_global $Int) (i32.const 0) ) (return @@ -30,9 +34,7 @@ ) (if (f64.gt - (f64.load - (i32.const 32) - ) + (get_global $Double) (f64.const 0) ) (return @@ -421,9 +423,7 @@ (get_local $0) (i32.add (i32.add - (i32.load - (i32.const 48) - ) + (get_global $n) (i32.const 136) ) (i32.const 8) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 824606764..46d746946 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -4,6 +4,10 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vd (func (param f64))) + (import $t global "global" "NaN" f64) + (import $u global "global" "Infinity" f64) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $n global "env" "gb" i32) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -11,6 +15,8 @@ (export "big_negative" $big_negative) (export "pick" $exportMe) (export "memory" memory) + (global $Int i32 (i32.const 0)) + (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative @@ -37,31 +43,21 @@ (f64.add (f64.add (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) + (get_global $t) + (get_global $u) ) (f64.neg - (f64.load - (i32.const 16) - ) + (get_global $u) ) ) (f64.neg - (f64.load - (i32.const 8) - ) + (get_global $t) ) ) ) (if (i32.gt_s - (i32.load - (i32.const 24) - ) + (get_global $Int) (i32.const 0) ) (return @@ -70,9 +66,7 @@ ) (if (f64.gt - (f64.load - (i32.const 32) - ) + (get_global $Double) (f64.const 0) ) (return @@ -781,9 +775,7 @@ (get_local $a) (i32.add (i32.add - (i32.load - (i32.const 48) - ) + (get_global $n) (i32.const 136) ) (i32.const 8) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 5fba592a6..56a1d4085 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -6,6 +6,10 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vd (func (param f64))) + (import $t global "global" "NaN" f64) + (import $u global "global" "Infinity" f64) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $n global "env" "gb" i32) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -15,6 +19,8 @@ (export "big_negative" $big_negative) (export "pick" $exportMe) (export "memory" memory) + (global $Int i32 (i32.const 0)) + (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative @@ -41,31 +47,21 @@ (f64.add (f64.add (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) + (get_global $t) + (get_global $u) ) (f64.neg - (f64.load - (i32.const 16) - ) + (get_global $u) ) ) (f64.neg - (f64.load - (i32.const 8) - ) + (get_global $t) ) ) ) (if (i32.gt_s - (i32.load - (i32.const 24) - ) + (get_global $Int) (i32.const 0) ) (return @@ -74,9 +70,7 @@ ) (if (f64.gt - (f64.load - (i32.const 32) - ) + (get_global $Double) (f64.const 0) ) (return @@ -787,9 +781,7 @@ (get_local $a) (i32.add (i32.add - (i32.load - (i32.const 48) - ) + (get_global $n) (i32.const 136) ) (i32.const 8) -- cgit v1.2.3 From db5ee8d83eb32fc7fd007f9e3d9b46d748161ae7 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 12:05:20 -0700 Subject: set type of calls to their target, instead of the previous behavior where the asm.js context informed us. this lets us add drops where necessary --- src/asm2wasm.h | 14 ++++++++++---- test/unit.asm.js | 10 ++++++++++ test/unit.fromasm | 23 +++++++++++++++++++++++ test/unit.fromasm.imprecise | 23 +++++++++++++++++++++++ test/unit.fromasm.imprecise.no-opts | 25 +++++++++++++++++++++++++ test/unit.fromasm.no-opts | 25 +++++++++++++++++++++++++ 6 files changed, 116 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index a85fd4676..5167ad70f 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -401,9 +401,9 @@ private: } void fixCallType(Expression* call, WasmType type) { - if (call->is()) call->type = type; - if (call->is()) call->type = type; - else if (call->is()) call->type = type; + if (call->is()) call->cast()->type = type; + if (call->is()) call->cast()->type = type; + else if (call->is()) call->cast()->type = type; } FunctionType* getBuiltinFunctionType(Name module, Name base, ExpressionList* operands = nullptr) { @@ -736,7 +736,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { wasm.removeImport(curr); } - // Finalize indirect calls and import calls + // Finalize calls now that everything is known and generated struct FinalizeCalls : public WalkerPass>> { bool isFunctionParallel() override { return true; } @@ -747,6 +747,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { FinalizeCalls(Asm2WasmBuilder* parent) : parent(parent) {} + void visitCall(Call* curr) { + curr->type = getModule()->getFunction(curr->target)->result; + } + void visitCallImport(CallImport* curr) { // fill out call_import - add extra params as needed, etc. asm tolerates ffi overloading, wasm does not auto iter = parent->importedFunctionTypes.find(curr->target); @@ -768,6 +772,8 @@ void Asm2WasmBuilder::processAsm(Ref ast) { } } } + + curr->type = getModule()->getImport(curr->target)->functionType->result; } void visitCallIndirect(CallIndirect* curr) { // we already call into target = something + offset, where offset is a callImport with the name of the table. replace that with the table offset diff --git a/test/unit.asm.js b/test/unit.asm.js index 5eb48f776..d6d0a27e8 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -9,6 +9,7 @@ function asm(global, env, buffer) { var Math_ceil = global.Math.ceil; var tempDoublePtr = env.tempDoublePtr | 0; var n = env.gb | 0; + var setTempRet0=env.setTempRet0; var abort = env.abort; var print = env.print; @@ -271,6 +272,15 @@ function asm(global, env, buffer) { } while (0); } + function dropCall() { + if (0) { + phi(); // drop this + setTempRet0(10); // this too + zeroInit(setTempRet0(10) | 0); + } + return phi() | 0; + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 78a97a9d7..daaf1359d 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -5,11 +5,13 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vd (func (param f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) + (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -496,4 +498,25 @@ ) ) ) + (func $dropCall (result i32) + (if + (i32.const 0) + (block + (drop + (call $phi) + ) + (drop + (call_import $setTempRet0 + (i32.const 10) + ) + ) + (call $zeroInit + (call_import $setTempRet0 + (i32.const 10) + ) + ) + ) + ) + (call $phi) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index a18e1f436..b2c79ff79 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -3,11 +3,13 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vd (func (param f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) + (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -478,4 +480,25 @@ ) ) ) + (func $dropCall (result i32) + (if + (i32.const 0) + (block + (drop + (call $phi) + ) + (drop + (call_import $setTempRet0 + (i32.const 10) + ) + ) + (call $zeroInit + (call_import $setTempRet0 + (i32.const 10) + ) + ) + ) + ) + (call $phi) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 46d746946..06ab8089b 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -3,11 +3,13 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vd (func (param f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) + (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -861,6 +863,29 @@ (nop) ) ) + (func $dropCall (result i32) + (if + (i32.const 0) + (block + (drop + (call $phi) + ) + (drop + (call_import $setTempRet0 + (i32.const 10) + ) + ) + (call $zeroInit + (call_import $setTempRet0 + (i32.const 10) + ) + ) + ) + ) + (return + (call $phi) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 56a1d4085..169d4fe5b 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -5,11 +5,13 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vd (func (param f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) + (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -867,6 +869,29 @@ (nop) ) ) + (func $dropCall (result i32) + (if + (i32.const 0) + (block + (drop + (call $phi) + ) + (drop + (call_import $setTempRet0 + (i32.const 10) + ) + ) + (call $zeroInit + (call_import $setTempRet0 + (i32.const 10) + ) + ) + ) + ) + (return + (call $phi) + ) + ) (func $z (nop) ) -- cgit v1.2.3 From 3eb8c8b19383418416b7512a87e5353a9aa88cc0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 14:02:05 -0700 Subject: asm2wasm debugging asserts --- src/asm2wasm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 5167ad70f..52598ad0b 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -748,6 +748,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { FinalizeCalls(Asm2WasmBuilder* parent) : parent(parent) {} void visitCall(Call* curr) { + assert(getModule()->checkFunction(curr->target) ? true : (std::cerr << curr->target << '\n', false)); curr->type = getModule()->getFunction(curr->target)->result; } @@ -1140,7 +1141,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { return call; } // global var - assert(mappedGlobals.find(name) != mappedGlobals.end()); + assert(mappedGlobals.find(name) != mappedGlobals.end() ? true : (std::cerr << name.str << '\n', false)); MappedGlobal& global = mappedGlobals[name]; return builder.makeGetGlobal(name, global.type); } else if (what == SUB) { -- cgit v1.2.3 From 26070505e9885f6bb6dbf8a5039ef537b3c61ba2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 14:32:00 -0700 Subject: fix ControlFlowWalker handling of ifs when looking for break targets --- src/wasm-traversal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index a345a7f4b..4725237dd 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -465,7 +465,8 @@ struct ControlFlowWalker : public PostWalker { } else if (Loop* loop = curr->template dynCast()) { if (name == loop->name) return curr; } else { - WASM_UNREACHABLE(); + // an if, ignorable + assert(curr->template is()); } if (i == 0) return nullptr; i--; -- cgit v1.2.3 From 9c1947f84e13dcf79b50e53e6abbf6ce4db6573a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 14:54:27 -0700 Subject: improve full mode printing --- src/passes/Print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index fe125234d..570423efa 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -98,6 +98,9 @@ struct PrintSExpression : public Visitor { while (1) { if (stack.size() > 0) doIndent(o, indent); stack.push_back(curr); + if (full) { + o << "[" << printWasmType(curr->type) << "] "; + } printOpening(o, "block"); if (curr->name.is()) { o << ' '; -- cgit v1.2.3 From 83e0dde16f381b28c1ee0d099de25444b0f34e58 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 14:58:38 -0700 Subject: fix AutoDrop block handling - the block type might change as we modify its contents --- src/ast_utils.h | 1 + test/min.fromasm.imprecise.no-opts | 30 ++++----- test/min.fromasm.no-opts | 30 ++++----- test/unit.fromasm.imprecise.no-opts | 118 ++++++++++++++++-------------------- test/unit.fromasm.no-opts | 118 ++++++++++++++++-------------------- 5 files changed, 129 insertions(+), 168 deletions(-) (limited to 'src') diff --git a/src/ast_utils.h b/src/ast_utils.h index f68f776af..2be0196ad 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -808,6 +808,7 @@ struct AutoDrop : public WalkerPasslist.back() = Builder(*getModule()).makeDrop(last); } expressionStack.pop_back(); + curr->finalize(); // we may have changed our type } void visitFunction(Function* curr) { diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 899bf5317..4563ef382 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -33,26 +33,22 @@ ) (func $bitcasts (param $i i32) (param $f f32) (drop - (block - (drop - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (drop - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - ) - (drop - (i32.reinterpret/f32 - (get_local $f) - ) + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) ) ) ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) ) (func $ctzzzz (result i32) (return diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 899bf5317..4563ef382 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -33,26 +33,22 @@ ) (func $bitcasts (param $i i32) (param $f f32) (drop - (block - (drop - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (drop - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - ) - (drop - (i32.reinterpret/f32 - (get_local $f) - ) + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) ) ) ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) ) (func $ctzzzz (result i32) (return diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 06ab8089b..f8f028164 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -349,29 +349,25 @@ (local $y f32) (local $z f64) (drop - (block - (drop - (f32.demote/f64 - (get_local $z) - ) - ) - (drop - (get_local $y) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) + (f32.demote/f64 + (get_local $z) ) ) + (drop + (get_local $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) ) (func $negZero (result f64) (return @@ -591,30 +587,26 @@ (func $bitcasts (param $i i32) (param $f f32) (local $d f64) (drop - (block - (drop - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (drop - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - ) - (drop - (i32.reinterpret/f32 - (get_local $f) - ) + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) ) - (drop - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) - ) - ) + ) + ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) ) ) ) @@ -639,22 +631,18 @@ ) ) (block - (drop + (block (block (drop - (block - (drop - (i32.const 4) - ) - (drop - (i32.const 5) - ) - ) + (i32.const 4) ) (drop - (i32.const 6) + (i32.const 5) ) ) + (drop + (i32.const 6) + ) ) (i32.const 7) ) @@ -707,28 +695,24 @@ ) ) (block - (drop + (block (block (drop - (block - (drop - (call $lb - (i32.const 4) - ) - ) - (drop - (call $lb - (i32.const 5) - ) - ) + (call $lb + (i32.const 4) ) ) (drop (call $lb - (i32.const 6) + (i32.const 5) ) ) ) + (drop + (call $lb + (i32.const 6) + ) + ) ) (call $lb (i32.const 7) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 169d4fe5b..650f20c51 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -355,29 +355,25 @@ (local $y f32) (local $z f64) (drop - (block - (drop - (f32.demote/f64 - (get_local $z) - ) - ) - (drop - (get_local $y) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) + (f32.demote/f64 + (get_local $z) ) ) + (drop + (get_local $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) ) (func $negZero (result f64) (return @@ -597,30 +593,26 @@ (func $bitcasts (param $i i32) (param $f f32) (local $d f64) (drop - (block - (drop - (f32.reinterpret/i32 - (get_local $i) - ) - ) - (drop - (f64.promote/f32 - (f32.reinterpret/i32 - (get_local $i) - ) - ) - ) - (drop - (i32.reinterpret/f32 - (get_local $f) - ) + (f32.reinterpret/i32 + (get_local $i) + ) + ) + (drop + (f64.promote/f32 + (f32.reinterpret/i32 + (get_local $i) ) - (drop - (i32.reinterpret/f32 - (f32.demote/f64 - (get_local $d) - ) - ) + ) + ) + (drop + (i32.reinterpret/f32 + (get_local $f) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) ) ) ) @@ -645,22 +637,18 @@ ) ) (block - (drop + (block (block (drop - (block - (drop - (i32.const 4) - ) - (drop - (i32.const 5) - ) - ) + (i32.const 4) ) (drop - (i32.const 6) + (i32.const 5) ) ) + (drop + (i32.const 6) + ) ) (i32.const 7) ) @@ -713,28 +701,24 @@ ) ) (block - (drop + (block (block (drop - (block - (drop - (call $lb - (i32.const 4) - ) - ) - (drop - (call $lb - (i32.const 5) - ) - ) + (call $lb + (i32.const 4) ) ) (drop (call $lb - (i32.const 6) + (i32.const 5) ) ) ) + (drop + (call $lb + (i32.const 6) + ) + ) ) (call $lb (i32.const 7) -- cgit v1.2.3 From f3bb9debe6af0576d76bda1580df2570e749bd36 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 16:01:10 -0700 Subject: handle asm.js globals that are set and the return value used --- src/asm2wasm.h | 5 ++++- test/unit.asm.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 52598ad0b..321d5275e 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1014,7 +1014,10 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } // global var assert(mappedGlobals.find(name) != mappedGlobals.end()); - return builder.makeSetGlobal(name, process(ast[3])); + auto* ret = builder.makeSetGlobal(name, process(ast[3])); + // set_global does not return; if our value is trivially not used, don't emit a load (if nontrivially not used, opts get it later) + if (astStackHelper.getParent()[0] == STAT) return ret; + return builder.makeSequence(ret, builder.makeGetGlobal(name, ret->value->type)); } else if (ast[2][0] == SUB) { Ref target = ast[2]; assert(target[1][0] == NAME); diff --git a/test/unit.asm.js b/test/unit.asm.js index d6d0a27e8..cf2060030 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -281,6 +281,17 @@ function asm(global, env, buffer) { return phi() | 0; } + function useSetGlobal() { + var x = 0; + x = (Int = 10); + Int = 20; + return (Int = 30) | 0; + } + + function usesSetGlobal2() { + return (Int = 40, 50) | 0; + } + function z() { } function w() { -- cgit v1.2.3 From d044aeab0c2f66c4bb8aa4b85f91c8af0ed633ae Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 16:03:20 -0700 Subject: run vacuum again after autodrop in asm2wasm, if optimizing --- src/asm2wasm.h | 1 + test/emcc_hello_world.fromasm.imprecise.no-opts | 225 +++++++++++++++++------- test/emcc_hello_world.fromasm.no-opts | 225 +++++++++++++++++------- test/unit.fromasm | 18 ++ test/unit.fromasm.imprecise | 18 ++ test/unit.fromasm.imprecise.no-opts | 37 ++++ test/unit.fromasm.no-opts | 37 ++++ 7 files changed, 431 insertions(+), 130 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 321d5275e..abe6e2f25 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -787,6 +787,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { PassRunner passRunner(&wasm); passRunner.add(this); passRunner.add(); + if (optimize) passRunner.add("vacuum"); // autodrop can add some garbage passRunner.run(); // apply memory growth, if relevant diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 4e174f6ee..010c02ffd 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -30274,8 +30274,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $h) + (block + (set_global $tempRet0 + (get_local $h) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $l) ) @@ -30304,8 +30309,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $h) + (block + (set_global $tempRet0 + (get_local $h) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $l) ) @@ -30875,29 +30885,34 @@ ) (return (block - (set_global $tempRet0 - (i32.add + (block + (set_global $tempRet0 (i32.add - (i32.shr_u - (get_local $$8) - (i32.const 16) - ) - (i32.mul - (get_local $$11) - (get_local $$6) - ) - ) - (i32.shr_u (i32.add - (i32.and + (i32.shr_u (get_local $$8) - (i32.const 65535) + (i32.const 16) + ) + (i32.mul + (get_local $$11) + (get_local $$6) ) - (get_local $$12) ) - (i32.const 16) + (i32.shr_u + (i32.add + (i32.and + (get_local $$8) + (i32.const 65535) + ) + (get_local $$12) + ) + (i32.const 16) + ) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.or (i32.const 0) @@ -31273,8 +31288,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$10$1) + (block + (set_global $tempRet0 + (get_local $$10$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$10$0) ) @@ -31309,23 +31329,28 @@ ) (return (block - (set_global $tempRet0 - (i32.or - (i32.add + (block + (set_global $tempRet0 + (i32.or (i32.add - (i32.mul - (get_local $$b$1) - (get_local $$x_sroa_0_0_extract_trunc) + (i32.add + (i32.mul + (get_local $$b$1) + (get_local $$x_sroa_0_0_extract_trunc) + ) + (get_local $$2) ) - (get_local $$2) + (get_local $$1$1) + ) + (i32.and + (get_local $$1$1) + (i32.const 0) ) - (get_local $$1$1) - ) - (i32.and - (get_local $$1$1) - (i32.const 0) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.or (i32.const 0) @@ -31381,13 +31406,18 @@ ) (return (block - (set_global $tempRet0 - (i32.load - (i32.add - (get_local $$rem) - (i32.const 4) + (block + (set_global $tempRet0 + (i32.load + (i32.add + (get_local $$rem) + (i32.const 4) + ) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.load (get_local $$rem) @@ -31526,8 +31556,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31547,8 +31582,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31580,8 +31620,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31639,8 +31684,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31686,8 +31736,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31756,8 +31811,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31842,8 +31902,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31881,8 +31946,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31987,8 +32057,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32026,8 +32101,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32227,8 +32307,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32266,8 +32351,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32622,8 +32712,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 41db5a7a1..a5f8ac376 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -30280,8 +30280,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $h) + (block + (set_global $tempRet0 + (get_local $h) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $l) ) @@ -30310,8 +30315,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $h) + (block + (set_global $tempRet0 + (get_local $h) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $l) ) @@ -30881,29 +30891,34 @@ ) (return (block - (set_global $tempRet0 - (i32.add + (block + (set_global $tempRet0 (i32.add - (i32.shr_u - (get_local $$8) - (i32.const 16) - ) - (i32.mul - (get_local $$11) - (get_local $$6) - ) - ) - (i32.shr_u (i32.add - (i32.and + (i32.shr_u (get_local $$8) - (i32.const 65535) + (i32.const 16) + ) + (i32.mul + (get_local $$11) + (get_local $$6) ) - (get_local $$12) ) - (i32.const 16) + (i32.shr_u + (i32.add + (i32.and + (get_local $$8) + (i32.const 65535) + ) + (get_local $$12) + ) + (i32.const 16) + ) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.or (i32.const 0) @@ -31279,8 +31294,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$10$1) + (block + (set_global $tempRet0 + (get_local $$10$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$10$0) ) @@ -31315,23 +31335,28 @@ ) (return (block - (set_global $tempRet0 - (i32.or - (i32.add + (block + (set_global $tempRet0 + (i32.or (i32.add - (i32.mul - (get_local $$b$1) - (get_local $$x_sroa_0_0_extract_trunc) + (i32.add + (i32.mul + (get_local $$b$1) + (get_local $$x_sroa_0_0_extract_trunc) + ) + (get_local $$2) ) - (get_local $$2) + (get_local $$1$1) + ) + (i32.and + (get_local $$1$1) + (i32.const 0) ) - (get_local $$1$1) - ) - (i32.and - (get_local $$1$1) - (i32.const 0) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.or (i32.const 0) @@ -31387,13 +31412,18 @@ ) (return (block - (set_global $tempRet0 - (i32.load - (i32.add - (get_local $$rem) - (i32.const 4) + (block + (set_global $tempRet0 + (i32.load + (i32.add + (get_local $$rem) + (i32.const 4) + ) ) ) + (drop + (get_global $tempRet0) + ) ) (i32.load (get_local $$rem) @@ -31532,8 +31562,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31553,8 +31588,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31586,8 +31626,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31645,8 +31690,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31692,8 +31742,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31762,8 +31817,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31848,8 +31908,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31887,8 +31952,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -31993,8 +32063,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32032,8 +32107,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32233,8 +32313,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32272,8 +32357,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) @@ -32628,8 +32718,13 @@ ) (return (block - (set_global $tempRet0 - (get_local $$_0$1) + (block + (set_global $tempRet0 + (get_local $$_0$1) + ) + (drop + (get_global $tempRet0) + ) ) (get_local $$_0$0) ) diff --git a/test/unit.fromasm b/test/unit.fromasm index daaf1359d..31c1d5b3d 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -519,4 +519,22 @@ ) (call $phi) ) + (func $useSetGlobal (result i32) + (set_global $Int + (i32.const 10) + ) + (set_global $Int + (i32.const 20) + ) + (set_global $Int + (i32.const 30) + ) + (get_global $Int) + ) + (func $usesSetGlobal2 (result i32) + (set_global $Int + (i32.const 40) + ) + (i32.const 50) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index b2c79ff79..2e9ea8243 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -501,4 +501,22 @@ ) (call $phi) ) + (func $useSetGlobal (result i32) + (set_global $Int + (i32.const 10) + ) + (set_global $Int + (i32.const 20) + ) + (set_global $Int + (i32.const 30) + ) + (get_global $Int) + ) + (func $usesSetGlobal2 (result i32) + (set_global $Int + (i32.const 40) + ) + (i32.const 50) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index f8f028164..bec8a4f58 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -870,6 +870,43 @@ (call $phi) ) ) + (func $useSetGlobal (result i32) + (local $x i32) + (set_local $x + (block + (set_global $Int + (i32.const 10) + ) + (get_global $Int) + ) + ) + (set_global $Int + (i32.const 20) + ) + (return + (block + (set_global $Int + (i32.const 30) + ) + (get_global $Int) + ) + ) + ) + (func $usesSetGlobal2 (result i32) + (return + (block + (block + (set_global $Int + (i32.const 40) + ) + (drop + (get_global $Int) + ) + ) + (i32.const 50) + ) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 650f20c51..936601995 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -876,6 +876,43 @@ (call $phi) ) ) + (func $useSetGlobal (result i32) + (local $x i32) + (set_local $x + (block + (set_global $Int + (i32.const 10) + ) + (get_global $Int) + ) + ) + (set_global $Int + (i32.const 20) + ) + (return + (block + (set_global $Int + (i32.const 30) + ) + (get_global $Int) + ) + ) + ) + (func $usesSetGlobal2 (result i32) + (return + (block + (block + (set_global $Int + (i32.const 40) + ) + (drop + (get_global $Int) + ) + ) + (i32.const 50) + ) + ) + ) (func $z (nop) ) -- cgit v1.2.3 From c9b4cd0716ddd1b0def1cc7b26aa94355ab9ef6f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 18:16:12 -0700 Subject: drop the first element in a block too, if necessary --- src/ast_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ast_utils.h b/src/ast_utils.h index 2be0196ad..b81413d78 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -795,7 +795,7 @@ struct AutoDrop : public WalkerPasslist.size() <= 1) return; + if (curr->list.size() == 0) return; for (Index i = 0; i < curr->list.size() - 1; i++) { auto* child = curr->list[i]; if (isConcreteWasmType(child->type)) { -- cgit v1.2.3 From 31fca059e62a10b0f1d3de3a3f517721a41a7595 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Aug 2016 21:29:14 -0700 Subject: finalize loops in asm2wasm, which is now necessary as they may need to be dropped --- src/asm2wasm.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index abe6e2f25..d11fb3cfb 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1492,7 +1492,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { auto continuer = allocator.alloc(); continuer->name = ret->name; block->list.push_back(continuer); + block->finalize(); ret->body = block; + ret->finalize(); continueStack.pop_back(); breakStack.pop_back(); return ret; @@ -1528,6 +1530,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { auto loop = allocator.alloc(); loop->body = child; loop->name = more; + loop->finalize(); return builder.blockifyWithName(loop, stop); } } @@ -1553,6 +1556,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { continuer->condition = process(ast[1]); Block *block = builder.blockifyWithName(loop->body, out, continuer); loop->body = block; + loop->finalize(); return loop; } else if (what == FOR) { Ref finit = ast[1], @@ -1588,6 +1592,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { continuer->name = ret->name; Block* block = builder.blockifyWithName(ret->body, out, continuer); ret->body = block; + ret->finalize(); continueStack.pop_back(); breakStack.pop_back(); Block *outer = allocator.alloc(); -- cgit v1.2.3 From eb1def34a4183c5a4227686fee5209e2419ecce7 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 11:33:44 -0700 Subject: add some finalize() calls for ifs --- src/asm2wasm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index d11fb3cfb..10d065400 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1481,6 +1481,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { If *condition = allocator.alloc(); condition->condition = builder.makeUnary(EqZInt32, process(ast[1])); condition->ifTrue = breakOut; + condition->finalize(); auto body = allocator.alloc(); body->list.push_back(condition); body->list.push_back(process(ast[2])); @@ -1581,6 +1582,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { If *condition = allocator.alloc(); condition->condition = builder.makeUnary(EqZInt32, process(fcond)); condition->ifTrue = breakOut; + condition->finalize(); auto body = allocator.alloc(); body->list.push_back(condition); body->list.push_back(process(fbody)); @@ -1610,7 +1612,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ret->condition = process(ast[1]); ret->ifTrue = process(ast[2]); ret->ifFalse = process(ast[3]); - ret->type = ret->ifTrue->type; + ret->finalize(); return ret; } else if (what == SEQ) { // Some (x, y) patterns can be optimized, like bitcasts, -- cgit v1.2.3 From 1d3f3dda67c24c148dce13734c21cdab487ddc87 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 11:33:57 -0700 Subject: allow forcing full print mode in the env --- src/passes/Print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 570423efa..0071ede38 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -40,6 +40,9 @@ struct PrintSExpression : public Visitor { PrintSExpression(std::ostream& o) : o(o) { setMinify(false); + if (getenv("BINARYEN_PRINT_FULL")) { + full = std::stoi(getenv("BINARYEN_PRINT_FULL")); + } } void setMinify(bool minify_) { -- cgit v1.2.3 From 14fe75e4d6e670d2e7f3e171d3d96c340b574eab Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 11:39:58 -0700 Subject: when replacing an if with its condition (when it has no body), we must drop it --- src/passes/Vacuum.cpp | 2 +- test/unit.asm.js | 11 +++++++++++ test/unit.fromasm | 12 ++++++++++++ test/unit.fromasm.imprecise | 12 ++++++++++++ test/unit.fromasm.imprecise.no-opts | 21 +++++++++++++++++++++ test/unit.fromasm.no-opts | 21 +++++++++++++++++++++ 6 files changed, 78 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 150593713..89ef7359e 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -190,7 +190,7 @@ struct Vacuum : public WalkerPass> // no else if (curr->ifTrue->is()) { // no nothing - replaceCurrent(curr->condition); + replaceCurrent(Builder(*getModule()).makeDrop(curr->condition)); } } } diff --git a/test/unit.asm.js b/test/unit.asm.js index b4c10b1d2..8f0812e29 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -308,6 +308,17 @@ function asm(global, env, buffer) { } while(0); } + function ifChainEmpty(label) { + label = label | 0; + if ((label|0) == 4) { + return 0; + } + else if ((label|0) == 7) { + // unreachable; + } + return 0; + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index cecbeef22..bc5281ed5 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -558,4 +558,16 @@ ) ) ) + (func $ifChainEmpty (param $0 i32) (result i32) + (if + (i32.eq + (get_local $0) + (i32.const 4) + ) + (return + (i32.const 0) + ) + ) + (i32.const 0) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index ba1af7916..945d6cc8e 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -540,4 +540,16 @@ ) ) ) + (func $ifChainEmpty (param $0 i32) (result i32) + (if + (i32.eq + (get_local $0) + (i32.const 4) + ) + (return + (i32.const 0) + ) + ) + (i32.const 0) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 0c02680da..f06912d08 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -932,6 +932,27 @@ (nop) ) ) + (func $ifChainEmpty (param $label i32) (result i32) + (if + (i32.eq + (get_local $label) + (i32.const 4) + ) + (return + (i32.const 0) + ) + (if + (i32.eq + (get_local $label) + (i32.const 7) + ) + (nop) + ) + ) + (return + (i32.const 0) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index fbbc6e7ff..222e0fa65 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -938,6 +938,27 @@ (nop) ) ) + (func $ifChainEmpty (param $label i32) (result i32) + (if + (i32.eq + (get_local $label) + (i32.const 4) + ) + (return + (i32.const 0) + ) + (if + (i32.eq + (get_local $label) + (i32.const 7) + ) + (nop) + ) + ) + (return + (i32.const 0) + ) + ) (func $z (nop) ) -- cgit v1.2.3 From 8384ada03f9ffc5d09d2a39e1dfa49cd1e1c8686 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 12:22:37 -0700 Subject: use ControlFlowWalker in CFGWalker --- src/cfg/cfg-traversal.h | 60 +++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/cfg/cfg-traversal.h b/src/cfg/cfg-traversal.h index 2b96fc67a..5bc593691 100644 --- a/src/cfg/cfg-traversal.h +++ b/src/cfg/cfg-traversal.h @@ -36,7 +36,7 @@ namespace wasm { template -struct CFGWalker : public PostWalker { +struct CFGWalker : public ControlFlowWalker { // public interface @@ -57,7 +57,7 @@ struct CFGWalker : public PostWalker { // traversal state BasicBlock* currBasicBlock; // the current block in play during traversal - std::map> branches; + std::map> branches; // a block or loop => its branches std::vector ifStack; std::vector loopStack; @@ -74,7 +74,7 @@ struct CFGWalker : public PostWalker { static void doEndBlock(SubType* self, Expression** currp) { auto* curr = (*currp)->cast(); if (!curr->name.is()) return; - auto iter = self->branches.find(curr->name); + auto iter = self->branches.find(curr); if (iter == self->branches.end()) return; auto& origins = iter->second; if (origins.size() == 0) return; @@ -83,12 +83,10 @@ struct CFGWalker : public PostWalker { doStartBasicBlock(self, currp); self->link(last, self->currBasicBlock); // fallthrough // branches to the new one - if (curr->name.is()) { - for (auto* origin : origins) { - self->link(origin, self->currBasicBlock); - } - self->branches.erase(curr->name); + for (auto* origin : origins) { + self->link(origin, self->currBasicBlock); } + self->branches.erase(curr); } static void doStartIfTrue(SubType* self, Expression** currp) { @@ -134,18 +132,18 @@ struct CFGWalker : public PostWalker { // branches to the top of the loop if (curr->name.is()) { auto* loopStart = self->loopStack.back(); - auto& origins = self->branches[curr->name]; + auto& origins = self->branches[curr]; for (auto* origin : origins) { self->link(origin, loopStart); } - self->branches.erase(curr->name); + self->branches.erase(curr); } self->loopStack.pop_back(); } static void doEndBreak(SubType* self, Expression** currp) { auto* curr = (*currp)->cast(); - self->branches[curr->name].push_back(self->currBasicBlock); // branch to the target + self->branches[self->findBreakTarget(curr->name)].push_back(self->currBasicBlock); // branch to the target auto* last = self->currBasicBlock; doStartBasicBlock(self, currp); if (curr->condition) { @@ -158,12 +156,12 @@ struct CFGWalker : public PostWalker { std::set seen; // we might see the same label more than once; do not spam branches for (Name target : curr->targets) { if (!seen.count(target)) { - self->branches[target].push_back(self->currBasicBlock); // branch to the target + self->branches[self->findBreakTarget(target)].push_back(self->currBasicBlock); // branch to the target seen.insert(target); } } if (!seen.count(curr->default_)) { - self->branches[curr->default_].push_back(self->currBasicBlock); // branch to the target + self->branches[self->findBreakTarget(curr->default_)].push_back(self->currBasicBlock); // branch to the target } doStartBasicBlock(self, currp); } @@ -174,14 +172,10 @@ struct CFGWalker : public PostWalker { switch (curr->_id) { case Expression::Id::BlockId: { self->pushTask(SubType::doEndBlock, currp); - self->pushTask(SubType::doVisitBlock, currp); - auto& list = curr->cast()->list; - for (int i = int(list.size()) - 1; i >= 0; i--) { - self->pushTask(SubType::scan, &list[i]); - } break; } case Expression::Id::IfId: { + self->pushTask(SubType::doPostVisitControlFlow, currp); self->pushTask(SubType::doEndIf, currp); self->pushTask(SubType::doVisitIf, currp); auto* ifFalse = curr->cast()->ifFalse; @@ -192,44 +186,40 @@ struct CFGWalker : public PostWalker { self->pushTask(SubType::scan, &curr->cast()->ifTrue); self->pushTask(SubType::doStartIfTrue, currp); self->pushTask(SubType::scan, &curr->cast()->condition); - break; + self->pushTask(SubType::doPreVisitControlFlow, currp); + return; // don't do anything else } case Expression::Id::LoopId: { self->pushTask(SubType::doEndLoop, currp); - self->pushTask(SubType::doVisitLoop, currp); - self->pushTask(SubType::scan, &curr->cast()->body); - self->pushTask(SubType::doStartLoop, currp); break; } case Expression::Id::BreakId: { self->pushTask(SubType::doEndBreak, currp); - self->pushTask(SubType::doVisitBreak, currp); - self->maybePushTask(SubType::scan, &curr->cast()->condition); - self->maybePushTask(SubType::scan, &curr->cast()->value); break; } case Expression::Id::SwitchId: { self->pushTask(SubType::doEndSwitch, currp); - self->pushTask(SubType::doVisitSwitch, currp); - self->maybePushTask(SubType::scan, &curr->cast()->value); - self->pushTask(SubType::scan, &curr->cast()->condition); break; } case Expression::Id::ReturnId: { self->pushTask(SubType::doStartBasicBlock, currp); - self->pushTask(SubType::doVisitReturn, currp); - self->maybePushTask(SubType::scan, &curr->cast()->value); break; } case Expression::Id::UnreachableId: { self->pushTask(SubType::doStartBasicBlock, currp); - self->pushTask(SubType::doVisitUnreachable, currp); break; } - default: { - // other node types do not have control flow, use regular post-order - PostWalker::scan(self, currp); + default: {} + } + + ControlFlowWalker::scan(self, currp); + + switch (curr->_id) { + case Expression::Id::LoopId: { + self->pushTask(SubType::doStartLoop, currp); + break; } + default: {} } } @@ -238,7 +228,7 @@ struct CFGWalker : public PostWalker { doStartBasicBlock(static_cast(this), nullptr); entry = currBasicBlock; - PostWalker::doWalkFunction(func); + ControlFlowWalker::doWalkFunction(func); assert(branches.size() == 0); assert(ifStack.size() == 0); -- cgit v1.2.3 From e125ae76b29b84563892263663e66ff072852c99 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 14:38:29 -0700 Subject: don't simplify locals out of loops if they contain branching, as it may invalidate the branch --- src/ast_utils.h | 3 +++ test/passes/simplify-locals.txt | 29 +++++++++++++++++++++++++++++ test/passes/simplify-locals.wast | 20 ++++++++++++++++++++ 3 files changed, 52 insertions(+) (limited to 'src') diff --git a/src/ast_utils.h b/src/ast_utils.h index b81413d78..0bb0a821e 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -130,6 +130,9 @@ struct EffectAnalyzer : public PostWalkeris()) { + branches = true; + } return hasAnything(); } diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index 60e07f3fb..ee4418953 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -7,6 +7,7 @@ (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))) (import $waka "env" "waka") (import $waka_int "env" "waka_int" (result i32)) (import $_i64Subtract "env" "i64sub" (param i32 i32 i32 i32) (result i32)) @@ -673,4 +674,32 @@ (get_local $i1) ) ) + (func $no-out-of-label (type $7) (param $x i32) (param $y i32) + (loop $moar + (set_local $x + (block $block0 + (br_if $moar + (get_local $x) + ) + (i32.const 0) + ) + ) + ) + (drop + (get_local $x) + ) + (block $moar + (set_local $y + (block $block1 + (br_if $moar + (get_local $y) + ) + (i32.const 0) + ) + ) + ) + (drop + (get_local $y) + ) + ) ) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index d74ebe054..2b5b84a5f 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -731,4 +731,24 @@ (get_local $i1) ) ) + (func $no-out-of-label (param $x i32) (param $y i32) + (loop $moar + (set_local $x + (block + (br_if $moar (get_local $x)) + (i32.const 0) + ) + ) + ) + (drop (get_local $x)) + (block $moar + (set_local $y + (block + (br_if $moar (get_local $y)) + (i32.const 0) + ) + ) + ) + (drop (get_local $y)) + ) ) -- cgit v1.2.3 From 323e32bc1ca73c92d81b7fe28fd54e62c2218801 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 15:05:40 -0700 Subject: autodrop must be run before we optimize in asm2wasm, as otherwise its input is not yet valid then after finalizeCalls, we must autodrop again to drop things that finalizeCalls changed --- src/asm2wasm.h | 7 ++- src/passes/pass.cpp | 3 ++ src/wasm-module-building.h | 6 ++- test/emcc_hello_world.fromasm | 76 ++++++++++++++++++--------------- test/emcc_hello_world.fromasm.imprecise | 76 ++++++++++++++++++--------------- test/unit.fromasm | 13 ++++-- test/unit.fromasm.imprecise | 13 ++++-- 7 files changed, 114 insertions(+), 80 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 10d065400..7cc671597 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -523,7 +523,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { for (unsigned i = 1; i < body->size(); i++) { if (body[i][0] == DEFUN) numFunctions++; } - optimizingBuilder = make_unique(&wasm, numFunctions); + optimizingBuilder = make_unique(&wasm, numFunctions, [&](PassRunner& passRunner) { + // run autodrop first, before optimizations + passRunner.add(); + }); } // first pass - do almost everything, but function imports and indirect calls @@ -786,7 +789,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { }; PassRunner passRunner(&wasm); passRunner.add(this); - passRunner.add(); + passRunner.add(); // FinalizeCalls may cause us to require additional drops if (optimize) passRunner.add("vacuum"); // autodrop can add some garbage passRunner.run(); diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 1e7e85ccb..437b023bc 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -209,6 +209,9 @@ void PassRunner::run() { } void PassRunner::runFunction(Function* func) { + if (debug) { + std::cerr << "[PassRunner] running passes on function " << func->name << std::endl; + } for (auto* pass : passes) { runPassOnFunction(pass, func); } diff --git a/src/wasm-module-building.h b/src/wasm-module-building.h index ead074991..43cc493d1 100644 --- a/src/wasm-module-building.h +++ b/src/wasm-module-building.h @@ -73,6 +73,7 @@ static std::mutex debug; class OptimizingIncrementalModuleBuilder { Module* wasm; uint32_t numFunctions; + std::function addPrePasses; Function* endMarker; std::atomic* list; uint32_t nextFunction; // only used on main thread @@ -86,8 +87,8 @@ class OptimizingIncrementalModuleBuilder { public: // numFunctions must be equal to the number of functions allocated, or higher. Knowing // this bounds helps avoid locking. - OptimizingIncrementalModuleBuilder(Module* wasm, Index numFunctions) - : wasm(wasm), numFunctions(numFunctions), endMarker(nullptr), list(nullptr), nextFunction(0), + OptimizingIncrementalModuleBuilder(Module* wasm, Index numFunctions, std::function addPrePasses) + : wasm(wasm), numFunctions(numFunctions), addPrePasses(addPrePasses), endMarker(nullptr), list(nullptr), nextFunction(0), numWorkers(0), liveWorkers(0), activeWorkers(0), availableFuncs(0), finishedFuncs(0), finishing(false) { if (numFunctions == 0) { @@ -201,6 +202,7 @@ private: void optimizeFunction(Function* func) { PassRunner passRunner(wasm); + addPrePasses(passRunner); passRunner.addDefaultFunctionOptimizationPasses(); passRunner.runFunction(func); } diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index c0b245dd9..ab579533e 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -2729,21 +2729,23 @@ ) ) ) - (call_indirect $FUNCSIG$iiii - (get_local $0) - (i32.sub - (get_local $1) - (get_local $2) - ) - (i32.const 1) - (i32.add - (i32.and - (i32.load offset=40 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $1) + (get_local $2) + ) + (i32.const 1) + (i32.add + (i32.and + (i32.load offset=40 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -7119,13 +7121,15 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $5) - (i32.sub - (get_local $75) + (drop + (call $___fwritex (get_local $5) + (i32.sub + (get_local $75) + (get_local $5) + ) + (get_local $0) ) - (get_local $0) ) ) (if @@ -7234,17 +7238,19 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $1) - (select - (i32.const 9) - (get_local $15) - (i32.gt_s - (get_local $15) + (drop + (call $___fwritex + (get_local $1) + (select (i32.const 9) + (get_local $15) + (i32.gt_s + (get_local $15) + (i32.const 9) + ) ) + (get_local $0) ) - (get_local $0) ) ) (set_local $1 @@ -7461,17 +7467,19 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $1) - (select - (get_local $8) - (get_local $15) - (i32.gt_s - (get_local $15) + (drop + (call $___fwritex + (get_local $1) + (select (get_local $8) + (get_local $15) + (i32.gt_s + (get_local $15) + (get_local $8) + ) ) + (get_local $0) ) - (get_local $0) ) ) (if diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 07ee8d33f..32e34c0e9 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -2723,21 +2723,23 @@ ) ) ) - (call_indirect $FUNCSIG$iiii - (get_local $0) - (i32.sub - (get_local $1) - (get_local $2) - ) - (i32.const 1) - (i32.add - (i32.and - (i32.load offset=40 - (get_local $0) + (drop + (call_indirect $FUNCSIG$iiii + (get_local $0) + (i32.sub + (get_local $1) + (get_local $2) + ) + (i32.const 1) + (i32.add + (i32.and + (i32.load offset=40 + (get_local $0) + ) + (i32.const 7) ) - (i32.const 7) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -7113,13 +7115,15 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $5) - (i32.sub - (get_local $75) + (drop + (call $___fwritex (get_local $5) + (i32.sub + (get_local $75) + (get_local $5) + ) + (get_local $0) ) - (get_local $0) ) ) (if @@ -7228,17 +7232,19 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $1) - (select - (i32.const 9) - (get_local $15) - (i32.gt_s - (get_local $15) + (drop + (call $___fwritex + (get_local $1) + (select (i32.const 9) + (get_local $15) + (i32.gt_s + (get_local $15) + (i32.const 9) + ) ) + (get_local $0) ) - (get_local $0) ) ) (set_local $1 @@ -7455,17 +7461,19 @@ ) (i32.const 0) ) - (call $___fwritex - (get_local $1) - (select - (get_local $8) - (get_local $15) - (i32.gt_s - (get_local $15) + (drop + (call $___fwritex + (get_local $1) + (select (get_local $8) + (get_local $15) + (i32.gt_s + (get_local $15) + (get_local $8) + ) ) + (get_local $0) ) - (get_local $0) ) ) (if diff --git a/test/unit.fromasm b/test/unit.fromasm index bc5281ed5..f48dfcdb2 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -491,10 +491,15 @@ ) ) (func $smallIf - (if - (i32.const 2) - (call $lb - (i32.const 3) + (block $do-once$0 + (drop + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + (br $do-once$0) + ) ) ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 945d6cc8e..06ab40915 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -473,10 +473,15 @@ ) ) (func $smallIf - (if - (i32.const 2) - (call $lb - (i32.const 3) + (block $do-once$0 + (drop + (if + (i32.const 2) + (call $lb + (i32.const 3) + ) + (br $do-once$0) + ) ) ) ) -- cgit v1.2.3 From e073b8f59e7cddd3a86443444f00b0b1f48691f1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 15:55:11 -0700 Subject: sink a drop into a single if arm --- src/passes/Vacuum.cpp | 19 +++++++++++++++++++ test/passes/vacuum.txt | 20 ++++++++++++++++++++ test/passes/vacuum.wast | 17 +++++++++++++++++ test/unit.fromasm | 30 +++++++++++++----------------- test/unit.fromasm.imprecise | 30 +++++++++++++----------------- 5 files changed, 82 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 89ef7359e..db42a994a 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -203,6 +203,25 @@ struct Vacuum : public WalkerPass> // if the drop input has no side effects, it can be wiped out if (!EffectAnalyzer(curr->value).hasSideEffects()) { ExpressionManipulator::nop(curr); + return; + } + // sink a drop into an arm of an if-else if the other arm ends in an unreachable, as it if is a branch, this can make that branch optimizable and more vaccuming possible + auto* iff = curr->value->dynCast(); + if (iff && iff->ifFalse && isConcreteWasmType(iff->type)) { + // reuse the drop in both cases + if (iff->ifTrue->type == unreachable) { + assert(isConcreteWasmType(iff->ifFalse->type)); + curr->value = iff->ifFalse; + iff->ifFalse = curr; + iff->type = none; + replaceCurrent(iff); + } else if (iff->ifFalse->type == unreachable) { + assert(isConcreteWasmType(iff->ifTrue->type)); + curr->value = iff->ifTrue; + iff->ifTrue = curr; + iff->type = none; + replaceCurrent(iff); + } } } diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index c4004dd28..678c18cfa 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -5,6 +5,8 @@ (type $2 (func (result f32))) (type $3 (func (result i32))) (type $4 (func (param i32 f64 i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (import $int "env" "int" (result i32)) (func $b (type $0) (nop) ) @@ -158,4 +160,22 @@ (unreachable) ) ) + (func $if-drop (type $0) + (block $out + (if + (i32.const 0) + (drop + (call_import $int) + ) + (br $out) + ) + (if + (i32.const 1) + (br $out) + (drop + (call_import $int) + ) + ) + ) + ) ) diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast index 7b8d6a08a..3630512b4 100644 --- a/test/passes/vacuum.wast +++ b/test/passes/vacuum.wast @@ -5,6 +5,7 @@ (type $2 (func (result f32))) (type $3 (func (result i32))) (type $4 (func (param i32 f64 i32 i32))) + (import $int "env" "int" (result i32)) (func $b (type $0) (drop (i32.const 50) @@ -297,4 +298,20 @@ (unreachable) ) ) + (func $if-drop + (block $out + (drop + (if (i32.const 0) + (call_import $int) + (br $out) + ) + ) + (drop + (if (i32.const 1) + (br $out) + (call_import $int) + ) + ) + ) + ) ) diff --git a/test/unit.fromasm b/test/unit.fromasm index f48dfcdb2..049b4dc8a 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -492,13 +492,12 @@ ) (func $smallIf (block $do-once$0 - (drop - (if - (i32.const 2) + (if + (i32.const 2) + (drop (call $lb (i32.const 3) ) - (br $do-once$0) ) ) ) @@ -544,21 +543,18 @@ ) (func $breakThroughMany (param $0 i32) (block $label$break$L1 - (drop - (if - (get_local $0) - (loop $while-in$2 - (br_if $label$break$L1 - (i32.eqz - (get_local $0) - ) - ) - (call $zeroInit - (i32.const 0) + (if + (get_local $0) + (loop $while-in$2 + (br_if $label$break$L1 + (i32.eqz + (get_local $0) ) - (br $while-in$2) ) - (i32.const 1337) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) ) ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 06ab40915..d0d98452f 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -474,13 +474,12 @@ ) (func $smallIf (block $do-once$0 - (drop - (if - (i32.const 2) + (if + (i32.const 2) + (drop (call $lb (i32.const 3) ) - (br $do-once$0) ) ) ) @@ -526,21 +525,18 @@ ) (func $breakThroughMany (param $0 i32) (block $label$break$L1 - (drop - (if - (get_local $0) - (loop $while-in$2 - (br_if $label$break$L1 - (i32.eqz - (get_local $0) - ) - ) - (call $zeroInit - (i32.const 0) + (if + (get_local $0) + (loop $while-in$2 + (br_if $label$break$L1 + (i32.eqz + (get_local $0) ) - (br $while-in$2) ) - (i32.const 1337) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) ) ) ) -- cgit v1.2.3 From fd3f6dbe31f07e142ac87f599e7315cfacbe61fe Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 16:08:37 -0700 Subject: do a little more optimization at the end of asm2wasm processing --- src/asm2wasm.h | 5 +- test/emcc_O2_hello_world.fromasm | 3 +- test/emcc_O2_hello_world.fromasm.imprecise | 3 +- test/emcc_hello_world.fromasm | 96 ++++++++++-------------------- test/emcc_hello_world.fromasm.imprecise | 96 ++++++++++-------------------- test/memorygrowth.fromasm | 3 +- test/memorygrowth.fromasm.imprecise | 3 +- 7 files changed, 72 insertions(+), 137 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 7cc671597..f88bf9ffc 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -790,7 +790,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { PassRunner passRunner(&wasm); passRunner.add(this); passRunner.add(); // FinalizeCalls may cause us to require additional drops - if (optimize) passRunner.add("vacuum"); // autodrop can add some garbage + if (optimize) { + passRunner.add("vacuum"); // autodrop can add some garbage + passRunner.add("remove-unused-brs"); // vacuum may open up more opportunities + } passRunner.run(); // apply memory growth, if relevant diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 695602121..efbb9d052 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -8393,7 +8393,7 @@ (br $while-in$3) ) ) - (if + (br_if $label$break$L5 (i32.lt_u (call_indirect $FUNCSIG$iiii (get_local $2) @@ -8411,7 +8411,6 @@ ) (get_local $4) ) - (br $label$break$L5) ) (set_local $2 (i32.add diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 509e77491..b066153e3 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -8392,7 +8392,7 @@ (br $while-in$3) ) ) - (if + (br_if $label$break$L5 (i32.lt_u (call_indirect $FUNCSIG$iiii (get_local $2) @@ -8410,7 +8410,6 @@ ) (get_local $4) ) - (br $label$break$L5) ) (set_local $2 (i32.add diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index ab579533e..9c533ee9d 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -2438,7 +2438,7 @@ (i32.const -16843009) ) ) - (if + (br_if $while-out$5 (i32.ne (i32.and (i32.xor @@ -2452,7 +2452,6 @@ ) (i32.const 0) ) - (br $while-out$5) ) (set_local $1 (i32.add @@ -3354,7 +3353,7 @@ ) (loop $while-in$11 (block $while-out$10 - (if + (br_if $label$break$L25 (i32.eq (i32.and (i32.shl @@ -3368,7 +3367,6 @@ ) (i32.const 0) ) - (br $label$break$L25) ) (set_local $8 (i32.or @@ -3679,7 +3677,7 @@ (get_local $6) ) ) - (if + (br_if $while-out$14 (i32.ge_u (tee_local $6 (i32.add @@ -3702,7 +3700,6 @@ ) (i32.const 10) ) - (br $while-out$14) ) (br $while-in$15) ) @@ -4561,7 +4558,7 @@ (i32.const 255) ) ) - (if + (br_if $while-out$38 (i32.and (i32.eq (tee_local $5 @@ -4580,7 +4577,6 @@ (i32.const 0) ) ) - (br $while-out$38) ) (br $while-in$39) ) @@ -5099,7 +5095,7 @@ (f64.const 16) ) ) - (if + (br_if $while-out$60 (i32.eq (tee_local $1 (i32.add @@ -5109,7 +5105,6 @@ ) (i32.const 0) ) - (br $while-out$60) ) (br $while-in$61) ) @@ -5711,12 +5706,11 @@ ) (loop $while-in$75 (block $while-out$74 - (if + (br_if $while-out$74 (i32.le_u (get_local $13) (get_local $7) ) - (br $while-out$74) ) (if (i32.eq @@ -5879,7 +5873,7 @@ (get_local $27) ) ) - (if + (br_if $while-out$80 (i32.ge_u (tee_local $17 (i32.add @@ -5889,7 +5883,6 @@ ) (get_local $23) ) - (br $while-out$80) ) (br $while-in$81) ) @@ -5909,14 +5902,12 @@ ) ) ) - (if + (br_if $do-once$78 + (get_local $5) (i32.eq (get_local $11) (i32.const 0) ) - (br $do-once$78 - (get_local $5) - ) ) (i32.store (get_local $23) @@ -6311,7 +6302,8 @@ ) (get_local $14) (block - (if + (br_if $do-once$90 + (get_local $14) (i32.ne (i32.shr_s (i32.shl @@ -6324,9 +6316,6 @@ ) (i32.const 45) ) - (br $do-once$90 - (get_local $14) - ) ) (set_local $30 (f64.neg @@ -6349,7 +6338,7 @@ ) ) ) - (if + (br_if $do-once$88 (f64.eq (f64.add (get_local $14) @@ -6357,7 +6346,6 @@ ) (get_local $14) ) - (br $do-once$88) ) (i32.store (get_local $6) @@ -6416,12 +6404,11 @@ ) ) ) - (if + (br_if $while-out$92 (i32.le_u (get_local $5) (i32.const 999999999) ) - (br $while-out$92) ) (br $while-in$93) ) @@ -6704,7 +6691,7 @@ (i32.const 1) ) ) - (if + (br_if $while-out$102 (i32.ne (i32.and (call_import $i32u-rem @@ -6720,7 +6707,6 @@ ) (i32.const 0) ) - (br $while-out$102) ) (br $while-in$103) ) @@ -6928,7 +6914,7 @@ ) (i32.const 48) ) - (if + (br_if $while-out$104 (i32.ge_s (i32.sub (get_local $40) @@ -6936,7 +6922,6 @@ ) (i32.const 2) ) - (br $while-out$104) ) (br $while-in$105) ) @@ -7064,12 +7049,11 @@ (get_local $8) ) (block - (if + (br_if $do-once$110 (i32.ne (get_local $5) (get_local $45) ) - (br $do-once$110) ) (i32.store8 (get_local $53) @@ -7080,12 +7064,11 @@ ) ) (block - (if + (br_if $do-once$110 (i32.le_u (get_local $5) (get_local $29) ) - (br $do-once$110) ) (loop $while-in$113 (block $while-out$112 @@ -7098,12 +7081,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$112 (i32.le_u (get_local $5) (get_local $29) ) - (br $while-out$112) ) (br $while-in$113) ) @@ -7217,12 +7199,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$118 (i32.le_u (get_local $1) (get_local $29) ) - (br $while-out$118) ) (br $while-in$119) ) @@ -7381,7 +7362,7 @@ (get_local $0) ) ) - (if + (br_if $do-once$122 (i32.and (get_local $9) (i32.lt_s @@ -7389,9 +7370,8 @@ (i32.const 1) ) ) - (br $do-once$122) ) - (if + (br_if $do-once$122 (i32.ne (i32.and (i32.load @@ -7401,7 +7381,6 @@ ) (i32.const 0) ) - (br $do-once$122) ) (drop (call $___fwritex @@ -7438,12 +7417,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$124 (i32.le_u (get_local $1) (get_local $29) ) - (br $while-out$124) ) (br $while-in$125) ) @@ -7482,7 +7460,7 @@ ) ) ) - (if + (br_if $while-out$120 (i32.eqz (i32.and (i32.lt_u @@ -7505,7 +7483,6 @@ ) ) ) - (br $while-out$120) ) (br $while-in$121) ) @@ -7789,7 +7766,7 @@ (i32.const 255) ) ) - (if + (br_if $while-out$129 (i32.and (i32.eq (tee_local $5 @@ -7808,7 +7785,6 @@ (i32.const 0) ) ) - (br $while-out$129) ) (br $while-in$130) ) @@ -7991,7 +7967,7 @@ ) (loop $while-in$132 (block $while-out$131 - (if + (br_if $while-out$131 (i32.eq (tee_local $1 (i32.load @@ -8000,9 +7976,8 @@ ) (i32.const 0) ) - (br $while-out$131) ) - (if + (br_if $while-out$131 (i32.or (i32.lt_s (tee_local $5 @@ -8021,7 +7996,6 @@ ) ) ) - (br $while-out$131) ) (set_local $6 (i32.add @@ -8477,7 +8451,7 @@ ) (loop $while-in$137 (block $while-out$136 - (if + (br_if $while-out$136 (i32.eq (tee_local $0 (i32.load @@ -8492,7 +8466,6 @@ ) (i32.const 0) ) - (br $while-out$136) ) (call $_pop_arg_336 (i32.add @@ -9286,7 +9259,7 @@ (i32.const 0) ) ) - (if + (br_if $while-out$2 (i32.le_u (tee_local $3 (i32.add @@ -9296,7 +9269,6 @@ ) (i32.const 255) ) - (br $while-out$2) ) (br $while-in$3) ) @@ -9307,11 +9279,10 @@ (i32.const 255) ) ) - (if + (br_if $do-once$0 (i32.eqz (get_local $4) ) - (br $do-once$0) ) ) (if @@ -13127,7 +13098,7 @@ (get_local $0) (get_local $0) ) - (if + (br_if $while-out$46 (i32.eq (tee_local $1 (i32.add @@ -13137,7 +13108,6 @@ ) (i32.const 32) ) - (br $while-out$46) ) (br $while-in$47) ) @@ -14925,7 +14895,7 @@ ) (i32.const 7) ) - (if + (br_if $while-out$75 (i32.ge_u (i32.add (get_local $1) @@ -14933,7 +14903,6 @@ ) (get_local $2) ) - (br $while-out$75) ) (br $while-in$76) ) @@ -17416,9 +17385,8 @@ (i32.const 8) ) ) - (if + (br_if $while-out$20 (get_local $0) - (br $while-out$20) ) (br $while-in$21) ) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 32e34c0e9..ed7b48ea5 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -2432,7 +2432,7 @@ (i32.const -16843009) ) ) - (if + (br_if $while-out$5 (i32.ne (i32.and (i32.xor @@ -2446,7 +2446,6 @@ ) (i32.const 0) ) - (br $while-out$5) ) (set_local $1 (i32.add @@ -3348,7 +3347,7 @@ ) (loop $while-in$11 (block $while-out$10 - (if + (br_if $label$break$L25 (i32.eq (i32.and (i32.shl @@ -3362,7 +3361,6 @@ ) (i32.const 0) ) - (br $label$break$L25) ) (set_local $8 (i32.or @@ -3673,7 +3671,7 @@ (get_local $6) ) ) - (if + (br_if $while-out$14 (i32.ge_u (tee_local $6 (i32.add @@ -3696,7 +3694,6 @@ ) (i32.const 10) ) - (br $while-out$14) ) (br $while-in$15) ) @@ -4555,7 +4552,7 @@ (i32.const 255) ) ) - (if + (br_if $while-out$38 (i32.and (i32.eq (tee_local $5 @@ -4574,7 +4571,6 @@ (i32.const 0) ) ) - (br $while-out$38) ) (br $while-in$39) ) @@ -5093,7 +5089,7 @@ (f64.const 16) ) ) - (if + (br_if $while-out$60 (i32.eq (tee_local $1 (i32.add @@ -5103,7 +5099,6 @@ ) (i32.const 0) ) - (br $while-out$60) ) (br $while-in$61) ) @@ -5705,12 +5700,11 @@ ) (loop $while-in$75 (block $while-out$74 - (if + (br_if $while-out$74 (i32.le_u (get_local $13) (get_local $7) ) - (br $while-out$74) ) (if (i32.eq @@ -5873,7 +5867,7 @@ (get_local $27) ) ) - (if + (br_if $while-out$80 (i32.ge_u (tee_local $17 (i32.add @@ -5883,7 +5877,6 @@ ) (get_local $23) ) - (br $while-out$80) ) (br $while-in$81) ) @@ -5903,14 +5896,12 @@ ) ) ) - (if + (br_if $do-once$78 + (get_local $5) (i32.eq (get_local $11) (i32.const 0) ) - (br $do-once$78 - (get_local $5) - ) ) (i32.store (get_local $23) @@ -6305,7 +6296,8 @@ ) (get_local $14) (block - (if + (br_if $do-once$90 + (get_local $14) (i32.ne (i32.shr_s (i32.shl @@ -6318,9 +6310,6 @@ ) (i32.const 45) ) - (br $do-once$90 - (get_local $14) - ) ) (set_local $30 (f64.neg @@ -6343,7 +6332,7 @@ ) ) ) - (if + (br_if $do-once$88 (f64.eq (f64.add (get_local $14) @@ -6351,7 +6340,6 @@ ) (get_local $14) ) - (br $do-once$88) ) (i32.store (get_local $6) @@ -6410,12 +6398,11 @@ ) ) ) - (if + (br_if $while-out$92 (i32.le_u (get_local $5) (i32.const 999999999) ) - (br $while-out$92) ) (br $while-in$93) ) @@ -6698,7 +6685,7 @@ (i32.const 1) ) ) - (if + (br_if $while-out$102 (i32.ne (i32.and (i32.rem_u @@ -6714,7 +6701,6 @@ ) (i32.const 0) ) - (br $while-out$102) ) (br $while-in$103) ) @@ -6922,7 +6908,7 @@ ) (i32.const 48) ) - (if + (br_if $while-out$104 (i32.ge_s (i32.sub (get_local $40) @@ -6930,7 +6916,6 @@ ) (i32.const 2) ) - (br $while-out$104) ) (br $while-in$105) ) @@ -7058,12 +7043,11 @@ (get_local $8) ) (block - (if + (br_if $do-once$110 (i32.ne (get_local $5) (get_local $45) ) - (br $do-once$110) ) (i32.store8 (get_local $53) @@ -7074,12 +7058,11 @@ ) ) (block - (if + (br_if $do-once$110 (i32.le_u (get_local $5) (get_local $29) ) - (br $do-once$110) ) (loop $while-in$113 (block $while-out$112 @@ -7092,12 +7075,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$112 (i32.le_u (get_local $5) (get_local $29) ) - (br $while-out$112) ) (br $while-in$113) ) @@ -7211,12 +7193,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$118 (i32.le_u (get_local $1) (get_local $29) ) - (br $while-out$118) ) (br $while-in$119) ) @@ -7375,7 +7356,7 @@ (get_local $0) ) ) - (if + (br_if $do-once$122 (i32.and (get_local $9) (i32.lt_s @@ -7383,9 +7364,8 @@ (i32.const 1) ) ) - (br $do-once$122) ) - (if + (br_if $do-once$122 (i32.ne (i32.and (i32.load @@ -7395,7 +7375,6 @@ ) (i32.const 0) ) - (br $do-once$122) ) (drop (call $___fwritex @@ -7432,12 +7411,11 @@ ) (i32.const 48) ) - (if + (br_if $while-out$124 (i32.le_u (get_local $1) (get_local $29) ) - (br $while-out$124) ) (br $while-in$125) ) @@ -7476,7 +7454,7 @@ ) ) ) - (if + (br_if $while-out$120 (i32.eqz (i32.and (i32.lt_u @@ -7499,7 +7477,6 @@ ) ) ) - (br $while-out$120) ) (br $while-in$121) ) @@ -7783,7 +7760,7 @@ (i32.const 255) ) ) - (if + (br_if $while-out$129 (i32.and (i32.eq (tee_local $5 @@ -7802,7 +7779,6 @@ (i32.const 0) ) ) - (br $while-out$129) ) (br $while-in$130) ) @@ -7985,7 +7961,7 @@ ) (loop $while-in$132 (block $while-out$131 - (if + (br_if $while-out$131 (i32.eq (tee_local $1 (i32.load @@ -7994,9 +7970,8 @@ ) (i32.const 0) ) - (br $while-out$131) ) - (if + (br_if $while-out$131 (i32.or (i32.lt_s (tee_local $5 @@ -8015,7 +7990,6 @@ ) ) ) - (br $while-out$131) ) (set_local $6 (i32.add @@ -8471,7 +8445,7 @@ ) (loop $while-in$137 (block $while-out$136 - (if + (br_if $while-out$136 (i32.eq (tee_local $0 (i32.load @@ -8486,7 +8460,6 @@ ) (i32.const 0) ) - (br $while-out$136) ) (call $_pop_arg_336 (i32.add @@ -9280,7 +9253,7 @@ (i32.const 0) ) ) - (if + (br_if $while-out$2 (i32.le_u (tee_local $3 (i32.add @@ -9290,7 +9263,6 @@ ) (i32.const 255) ) - (br $while-out$2) ) (br $while-in$3) ) @@ -9301,11 +9273,10 @@ (i32.const 255) ) ) - (if + (br_if $do-once$0 (i32.eqz (get_local $4) ) - (br $do-once$0) ) ) (if @@ -13121,7 +13092,7 @@ (get_local $0) (get_local $0) ) - (if + (br_if $while-out$46 (i32.eq (tee_local $1 (i32.add @@ -13131,7 +13102,6 @@ ) (i32.const 32) ) - (br $while-out$46) ) (br $while-in$47) ) @@ -14919,7 +14889,7 @@ ) (i32.const 7) ) - (if + (br_if $while-out$75 (i32.ge_u (i32.add (get_local $1) @@ -14927,7 +14897,6 @@ ) (get_local $2) ) - (br $while-out$75) ) (br $while-in$76) ) @@ -17410,9 +17379,8 @@ (i32.const 8) ) ) - (if + (br_if $while-out$20 (get_local $0) - (br $while-out$20) ) (br $while-in$21) ) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index a092e87b4..3cec8a5a3 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -8462,7 +8462,7 @@ (br $while-in$3) ) ) - (if + (br_if $label$break$a (i32.lt_u (call_indirect $FUNCSIG$iiii (get_local $2) @@ -8480,7 +8480,6 @@ ) (get_local $4) ) - (br $label$break$a) ) (set_local $2 (i32.add diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index ae2d79d38..935bf4159 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -8461,7 +8461,7 @@ (br $while-in$3) ) ) - (if + (br_if $label$break$a (i32.lt_u (call_indirect $FUNCSIG$iiii (get_local $2) @@ -8479,7 +8479,6 @@ ) (get_local $4) ) - (br $label$break$a) ) (set_local $2 (i32.add -- cgit v1.2.3 From b8ff5de842769fe2c1cc7c6d626c29ac5d503572 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 24 Aug 2016 14:46:36 -0700 Subject: add asm2wasm option to import a mem init file apply memory segments only if there isn't a memory initializer (which we need for asmjs and asm2wasm modes) use wasm-opt to check recreated wasts for validity, as wasm-shell would try to execute them add testing for combined modes like asmjs,interpret-binary --- auto_update_tests.py | 4 ++++ check.py | 19 ++++++++++++------- src/js/wasm.js-post.js | 11 +++++++++-- src/tools/asm2wasm.cpp | 24 +++++++++++++++++++++++- test/emcc_O2_hello_world.fromasm | 2 ++ test/emcc_hello_world.fromasm | 2 ++ test/hello_world.fromasm | 2 ++ test/memorygrowth.fromasm | 2 ++ test/min.fromasm | 2 ++ test/two_sides.fromasm | 2 ++ test/unit.fromasm | 2 ++ 11 files changed, 62 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/auto_update_tests.py b/auto_update_tests.py index 56c0d831d..447340886 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -18,6 +18,10 @@ for asm in sorted(os.listdir('test')): if not opts: cmd += ['--no-opts'] wasm += '.no-opts' + if precise and opts: + # test mem init importing + open('a.mem', 'wb').write(asm) + cmd += ['--mem-init=a.mem'] print '..', asm, wasm print ' ', ' '.join(cmd) actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() diff --git a/check.py b/check.py index 8f5977385..42ef27aa4 100755 --- a/check.py +++ b/check.py @@ -203,7 +203,7 @@ def binary_format_check(wast, verify_final_result=True): assert os.path.exists('ab.wast') # make sure it is a valid wast - cmd = [os.path.join('bin', 'wasm-shell'), 'ab.wast'] + cmd = [os.path.join('bin', 'wasm-opt'), 'ab.wast'] print ' ', ' '.join(cmd) subprocess.check_call(cmd, stdout=subprocess.PIPE) @@ -291,6 +291,10 @@ for asm in tests: if not opts: cmd += ['--no-opts'] wasm += '.no-opts' + if precise and opts: + # test mem init importing + open('a.mem', 'wb').write(asm) + cmd += ['--mem-init=a.mem'] wasm = os.path.join('test', wasm) print '..', asm, wasm actual = run_command(cmd) @@ -676,8 +680,9 @@ if has_emcc: print '\n[ checking wasm.js methods... ]\n' - for method_init in ['interpret-asm2wasm', 'interpret-s-expr', 'asmjs', 'interpret-binary']: - for success in [1, 0]: + for method_init in ['interpret-asm2wasm', 'interpret-s-expr', 'asmjs', 'interpret-binary', 'asmjs,interpret-binary', 'interpret-binary,asmjs']: + # check success and failure for simple modes, only success for combined/fallback ones + for success in [1, 0] if ',' not in method_init else [1]: method = method_init command = ['emcc', '-o', 'a.wasm.js', '-s', 'BINARYEN=1', os.path.join('test', 'hello_world.c') ] command += ['-s', 'BINARYEN_METHOD="' + method + '"'] @@ -696,20 +701,20 @@ if has_emcc: asm = asm.replace('"almost asm"', '"use asm"; var not_in_asm = [].length + (true || { x: 5 }.x);') asm = asm.replace("'almost asm'", '"use asm"; var not_in_asm = [].length + (true || { x: 5 }.x);') with open('a.wasm.asm.js', 'w') as o: o.write(asm) - if method == 'interpret-asm2wasm': + if method.startswith('interpret-asm2wasm'): os.unlink('a.wasm.wast') # we should not need the .wast if not success: break_cashew() # we need cashew - elif method == 'interpret-s-expr': + elif method.startswith('interpret-s-expr'): os.unlink('a.wasm.asm.js') # we should not need the .asm.js if not success: os.unlink('a.wasm.wast') - elif method == 'asmjs': + elif method.startswith('asmjs'): os.unlink('a.wasm.wast') # we should not need the .wast break_cashew() # we don't use cashew, so ok to break it if not success: os.unlink('a.wasm.js') - elif method == 'interpret-binary': + elif method.startswith('interpret-binary'): os.unlink('a.wasm.wast') # we should not need the .wast os.unlink('a.wasm.asm.js') # we should not need the .asm.js if not success: diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 1c207b3f3..5a1de4c9e 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -29,6 +29,7 @@ function integrateWasmJS(Module) { // inputs var method = Module['wasmJSMethod'] || {{{ wasmJSMethod }}} || 'native-wasm,interpret-s-expr'; // by default, try native and then .wast + Module['wasmJSMethod'] = method; var wasmTextFile = Module['wasmTextFile'] || {{{ wasmTextFile }}}; var wasmBinaryFile = Module['wasmBinaryFile'] || {{{ wasmBinaryFile }}}; @@ -100,10 +101,12 @@ function integrateWasmJS(Module) { } var oldView = new Int8Array(oldBuffer); var newView = new Int8Array(newBuffer); - if ({{{ WASM_BACKEND }}}) { - // memory segments arrived in the wast, do not trample them + + // If we have a mem init file, do not trample it + if (!memoryInitializer) { oldView.set(newView.subarray(STATIC_BASE, STATIC_BASE + STATIC_BUMP), STATIC_BASE); } + newView.set(oldView); updateGlobalBuffer(newBuffer); updateGlobalBufferViews(); @@ -215,6 +218,10 @@ function integrateWasmJS(Module) { info.global = global; info.env = env; + if (!('memInitBase' in env)) { + env['memInitBase'] = STATIC_BASE; // tell the memory segments where to place themselves + } + wasmJS['providedTotalMemory'] = Module['buffer'].byteLength; // Prepare to generate wasm, using either asm2wasm or s-exprs diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index beacc884c..af2cf6f5a 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -21,6 +21,7 @@ #include "support/colors.h" #include "support/command-line.h" #include "support/file.h" +#include "wasm-builder.h" #include "wasm-printing.h" #include "asm2wasm.h" @@ -40,10 +41,14 @@ int main(int argc, const char *argv[]) { o->extra["output"] = argument; Colors::disable(); }) - .add("--mapped-globals", "-m", "Mapped globals", Options::Arguments::One, + .add("--mapped-globals", "-n", "Mapped globals", Options::Arguments::One, [](Options *o, const std::string &argument) { std::cerr << "warning: the --mapped-globals/-m option is deprecated (a mapped globals file is no longer needed as we use wasm globals)" << std::endl; }) + .add("--mem-init", "-t", "Import a memory initialization file into the output module", Options::Arguments::One, + [](Options *o, const std::string &argument) { + o->extra["mem init"] = argument; + }) .add("--total-memory", "-m", "Total memory size", Options::Arguments::One, [](Options *o, const std::string &argument) { o->extra["total memory"] = argument; @@ -91,6 +96,23 @@ int main(int argc, const char *argv[]) { Asm2WasmBuilder asm2wasm(wasm, pre.memoryGrowth, options.debug, imprecise, opts); asm2wasm.processAsm(asmjs); + // import mem init file, if provided + const auto &memInit = options.extra.find("mem init"); + if (memInit != options.extra.end()) { + auto filename = memInit->second.c_str(); + auto data(read_file>(filename, Flags::Binary, options.debug ? Flags::Debug : Flags::Release)); + // the mem init's base is imported + auto* import = new Import; + import->name = Name("memInitBase"); + import->module = Name("env"); + import->base = Name("memInitBase"); + import->kind = Import::Global; + import->globalType = i32; + wasm.addImport(import); + // create the memory segment + wasm.memory.segments.emplace_back(Builder(wasm).makeGetGlobal(import->name, import->globalType), data); + } + if (options.debug) std::cerr << "printing..." << std::endl; Output output(options.extra["output"], Flags::Text, options.debug ? Flags::Debug : Flags::Release); WasmPrinter::printModule(&wasm, output.getStream()); diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index efbb9d052..5c6c31dfa 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -1,5 +1,6 @@ (module (memory 256 256) + (data (get_global $memInitBase) "emcc_O2_hello_world.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -29,6 +30,7 @@ (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memInitBase global "env" "memInitBase" i32) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 9c533ee9d..14d0b8824 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -1,5 +1,6 @@ (module (memory 256 256) + (data (get_global $memInitBase) "emcc_hello_world.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -38,6 +39,7 @@ (import $i32s-rem "asm2wasm" "i32s-rem" (param i32 i32) (result i32)) (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memInitBase global "env" "memInitBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 675ef17ca..0aae371f0 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,5 +1,7 @@ (module (memory 256 256) + (data (get_global $memInitBase) "hello_world.asm.js") + (import $memInitBase global "env" "memInitBase" i32) (export "add" $add) (export "memory" memory) (func $add (param $0 i32) (param $1 i32) (result i32) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 3cec8a5a3..36e9590ed 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -1,5 +1,6 @@ (module (memory 256 256) + (data (get_global $memInitBase) "memorygrowth.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -25,6 +26,7 @@ (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memInitBase global "env" "memInitBase" i32) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/min.fromasm b/test/min.fromasm index 9c0d90097..9135999dd 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,6 +1,8 @@ (module (memory 256 256) + (data (get_global $memInitBase) "min.asm.js") (import $tDP global "env" "tempDoublePtr" i32) + (import $memInitBase global "env" "memInitBase" i32) (export "floats" $floats) (export "memory" memory) (func $floats (param $0 f32) (result f32) diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 9d114dc8c..0eed39325 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -1,7 +1,9 @@ (module (memory 256 256) + (data (get_global $memInitBase) "two_sides.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) + (import $memInitBase global "env" "memInitBase" i32) (export "_test" $_test) (export "memory" memory) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) diff --git a/test/unit.fromasm b/test/unit.fromasm index 049b4dc8a..530761b62 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -1,5 +1,6 @@ (module (memory 256 256) + (data (get_global $memInitBase) "unit.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -18,6 +19,7 @@ (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memInitBase global "env" "memInitBase" i32) (export "big_negative" $big_negative) (export "pick" $big_negative) (export "memory" memory) -- cgit v1.2.3 From 304fef1d997f1c43249996737ef7ce6deb961481 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 08:31:32 -0700 Subject: refactor reallocBuffer assignment location, it is not technically part of mergeMemory --- src/js/wasm.js-post.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 5a1de4c9e..05c648ed0 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -110,12 +110,6 @@ function integrateWasmJS(Module) { newView.set(oldView); updateGlobalBuffer(newBuffer); updateGlobalBufferViews(); - Module['reallocBuffer'] = function(size) { - size = Math.ceil(size / wasmPageSize) * wasmPageSize; // round up to wasm page size - var old = Module['buffer']; - exports['__growWasmMemory'](size / wasmPageSize); // tiny wasm method that just does grow_memory - return Module['buffer'] !== old ? Module['buffer'] : null; // if it was reallocated, it changed - }; } var WasmTypes = { @@ -264,6 +258,14 @@ function integrateWasmJS(Module) { // We may have a preloaded value in Module.asm, save it Module['asmPreload'] = Module['asm']; + // Memory growth integration code + Module['reallocBuffer'] = function(size) { + size = Math.ceil(size / wasmPageSize) * wasmPageSize; // round up to wasm page size + var old = Module['buffer']; + exports['__growWasmMemory'](size / wasmPageSize); // tiny wasm method that just does grow_memory + return Module['buffer'] !== old ? Module['buffer'] : null; // if it was reallocated, it changed + }; + // Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate // the wasm module at that time, and it receives imports and provides exports and so forth, the app // doesn't need to care that it is wasm or olyfilled wasm or asm.js. -- cgit v1.2.3 From 42ad2cdbe5baa32dd1b0aea143a4e45f81e8b9b5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 09:02:18 -0700 Subject: import memory #684 --- src/asm2wasm.h | 11 ++++++++ src/js/wasm.js-post.js | 7 +++++- src/wasm-js.cpp | 29 ++++++++++++++++++---- test/emcc_O2_hello_world.fromasm | 2 +- test/emcc_O2_hello_world.fromasm.imprecise | 2 +- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 2 +- test/emcc_O2_hello_world.fromasm.no-opts | 2 +- test/emcc_hello_world.fromasm | 2 +- test/emcc_hello_world.fromasm.imprecise | 2 +- test/emcc_hello_world.fromasm.imprecise.no-opts | 2 +- test/emcc_hello_world.fromasm.no-opts | 2 +- test/empty.fromasm | 2 +- test/empty.fromasm.imprecise | 2 +- test/empty.fromasm.imprecise.no-opts | 2 +- test/empty.fromasm.no-opts | 2 +- test/hello_world.fromasm | 2 +- test/hello_world.fromasm.imprecise | 2 +- test/hello_world.fromasm.imprecise.no-opts | 2 +- test/hello_world.fromasm.no-opts | 2 +- test/memorygrowth.fromasm | 2 +- test/memorygrowth.fromasm.imprecise | 2 +- test/memorygrowth.fromasm.imprecise.no-opts | 2 +- test/memorygrowth.fromasm.no-opts | 2 +- test/min.fromasm | 2 +- test/min.fromasm.imprecise | 2 +- test/min.fromasm.imprecise.no-opts | 2 +- test/min.fromasm.no-opts | 2 +- test/two_sides.fromasm | 2 +- test/two_sides.fromasm.imprecise | 2 +- test/two_sides.fromasm.imprecise.no-opts | 2 +- test/two_sides.fromasm.no-opts | 2 +- test/unit.fromasm | 2 +- test/unit.fromasm.imprecise | 2 +- test/unit.fromasm.imprecise.no-opts | 2 +- test/unit.fromasm.no-opts | 2 +- 35 files changed, 73 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index f88bf9ffc..306a953a7 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -817,11 +817,22 @@ void Asm2WasmBuilder::processAsm(Ref ast) { wasm.addExport(export_); } +#if 0 + // export memory auto memoryExport = make_unique(); memoryExport->name = MEMORY; memoryExport->value = Name::fromInt(0); memoryExport->kind = Export::Memory; wasm.addExport(memoryExport.release()); +#else + // import memory + auto memoryImport = make_unique(); + memoryImport->name = MEMORY; + memoryImport->module = ENV; + memoryImport->base = MEMORY; + memoryImport->kind = Import::Memory; + wasm.addImport(memoryImport.release()); +#endif #if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm if (udivmoddi4.is() && getTempRet0.is()) { diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 05c648ed0..dcffb1ee8 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -183,7 +183,7 @@ function integrateWasmJS(Module) { return false; } exports = instance.exports; - mergeMemory(exports.memory); + if (exports.memory) mergeMemory(exports.memory); Module["usingWasm"] = true; @@ -274,6 +274,11 @@ function integrateWasmJS(Module) { global = fixImports(global); env = fixImports(env); + // import memory + if (!env['memory']) { + env['memory'] = providedBuffer; + } + // try the methods. each should return the exports if it succeeded var exports; diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index fc27bc37a..31448d2a0 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -169,17 +169,36 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { struct JSExternalInterface : ModuleInstance::ExternalInterface { void init(Module& wasm, ModuleInstance& instance) override { - // create a new buffer here, just like native wasm support would. - EM_ASM_({ - Module['outside']['newBuffer'] = new ArrayBuffer($0); - }, wasm.memory.initial * Memory::kPageSize); + // look for imported memory + { + bool found = false; + for (auto& import : wasm.imports) { + if (import->module == ENV && import->base == MEMORY) { + assert(import->kind == Import::Memory); + // memory is imported + EM_ASM({ + Module['outside']['tempBuffer'] = Module['lookupImport']('env', 'memory'); + }); + found = true; + } + } + if (!found) { + // no memory import; create a new buffer here, just like native wasm support would. + EM_ASM_({ + Module['outside']['tempBuffer'] = Module['outside']['newBuffer'] = new ArrayBuffer($0); + }, wasm.memory.initial * Memory::kPageSize); + } + } for (auto segment : wasm.memory.segments) { EM_ASM_({ var source = Module['HEAP8'].subarray($1, $1 + $2); - var target = new Int8Array(Module['outside']['newBuffer']); + var target = new Int8Array(Module['outside']['tempBuffer']); target.set(source, $0); }, ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(), &segment.data[0], segment.data.size()); } + EM_ASM({ + Module['outside']['tempBuffer'] = null; + }); // Table support is in a JS array. If the entry is a number, it's a function pointer. If not, it's a JS method to be called directly // TODO: make them all JS methods, wrapping a dynCall where necessary? EM_ASM_({ diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 5c6c31dfa..21873f241 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -30,6 +30,7 @@ (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "_free" $_free) (export "_main" $_main) @@ -49,7 +50,6 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index b066153e3..39e95673c 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -28,6 +28,7 @@ (import $___unlock "env" "___unlock" (param i32)) (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) @@ -46,7 +47,6 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index d9be3c6ae..a5e952b4c 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -28,6 +28,7 @@ (import $___unlock "env" "___unlock" (param i32)) (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) @@ -46,7 +47,6 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 37e32d83b..303b1e723 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -29,6 +29,7 @@ (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) @@ -47,7 +48,6 @@ (export "dynCall_ii" $dynCall_ii) (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 14d0b8824..666f03482 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -39,6 +39,7 @@ (import $i32s-rem "asm2wasm" "i32s-rem" (param i32 i32) (result i32)) (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) @@ -63,7 +64,6 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index ed7b48ea5..e30167119 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -32,6 +32,7 @@ (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) (import $_sysconf "env" "_sysconf" (param i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) @@ -55,7 +56,6 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 010c02ffd..a0429b58c 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -32,6 +32,7 @@ (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) (import $_sysconf "env" "_sysconf" (param i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) @@ -55,7 +56,6 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index a5f8ac376..3c9f8123a 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -38,6 +38,7 @@ (import $i32s-rem "asm2wasm" "i32s-rem" (param i32 i32) (result i32)) (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) @@ -61,7 +62,6 @@ (export "dynCall_iiii" $dynCall_iiii) (export "dynCall_vi" $dynCall_vi) (export "___udivmoddi4" $___udivmoddi4) - (export "memory" memory) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/empty.fromasm b/test/empty.fromasm index 008ce532b..2dcb800dd 100644 --- a/test/empty.fromasm +++ b/test/empty.fromasm @@ -1,6 +1,6 @@ (module (memory 256 256) (data (get_global $memInitBase) "empty.asm.js") + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) - (export "memory" memory) ) diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise index 939cbb87c..6c3928ac1 100644 --- a/test/empty.fromasm.imprecise +++ b/test/empty.fromasm.imprecise @@ -1,4 +1,4 @@ (module (memory 256 256) - (export "memory" memory) + (import $memory memory "env" "memory") ) diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts index 939cbb87c..6c3928ac1 100644 --- a/test/empty.fromasm.imprecise.no-opts +++ b/test/empty.fromasm.imprecise.no-opts @@ -1,4 +1,4 @@ (module (memory 256 256) - (export "memory" memory) + (import $memory memory "env" "memory") ) diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts index 939cbb87c..6c3928ac1 100644 --- a/test/empty.fromasm.no-opts +++ b/test/empty.fromasm.no-opts @@ -1,4 +1,4 @@ (module (memory 256 256) - (export "memory" memory) + (import $memory memory "env" "memory") ) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 0aae371f0..cea20a687 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,9 +1,9 @@ (module (memory 256 256) (data (get_global $memInitBase) "hello_world.asm.js") + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "add" $add) - (export "memory" memory) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 675ef17ca..0438017ff 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) + (import $memory memory "env" "memory") (export "add" $add) - (export "memory" memory) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 368ffaff3..80e7688e2 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) + (import $memory memory "env" "memory") (export "add" $add) - (export "memory" memory) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 368ffaff3..80e7688e2 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) + (import $memory memory "env" "memory") (export "add" $add) - (export "memory" memory) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 36e9590ed..390f163bb 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -26,6 +26,7 @@ (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "_free" $fb) (export "_main" $Na) @@ -47,7 +48,6 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) - (export "memory" memory) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 935bf4159..fb8b5b085 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -24,6 +24,7 @@ (import $wa "env" "___syscall54" (param i32 i32) (result i32)) (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) @@ -44,7 +45,6 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) - (export "memory" memory) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 758fff869..6cdc4fd40 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -24,6 +24,7 @@ (import $wa "env" "___syscall54" (param i32 i32) (result i32)) (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) @@ -44,7 +45,6 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) - (export "memory" memory) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index b506e580c..fd1b541d1 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -25,6 +25,7 @@ (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) @@ -45,7 +46,6 @@ (export "dynCall_iiii" $lb) (export "dynCall_vi" $mb) (export "__growWasmMemory" $__growWasmMemory) - (export "memory" memory) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/min.fromasm b/test/min.fromasm index 9135999dd..1a69787ab 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -2,9 +2,9 @@ (memory 256 256) (data (get_global $memInitBase) "min.asm.js") (import $tDP global "env" "tempDoublePtr" i32) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "floats" $floats) - (export "memory" memory) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 9c0d90097..c1703c203 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,8 +1,8 @@ (module (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) + (import $memory memory "env" "memory") (export "floats" $floats) - (export "memory" memory) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 4563ef382..7ba8db448 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,8 +1,8 @@ (module (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) + (import $memory memory "env" "memory") (export "floats" $floats) - (export "memory" memory) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 4563ef382..7ba8db448 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,8 +1,8 @@ (module (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) + (import $memory memory "env" "memory") (export "floats" $floats) - (export "memory" memory) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 0eed39325..45649cba6 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -3,9 +3,9 @@ (data (get_global $memInitBase) "two_sides.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "_test" $_test) - (export "memory" memory) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index 3e982aef2..ce7b83d1f 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) + (import $memory memory "env" "memory") (export "_test" $_test) - (export "memory" memory) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index d76c31b7e..3d27fcef4 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) + (import $memory memory "env" "memory") (export "_test" $_test) - (export "memory" memory) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index e0b639049..51b871191 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -2,8 +2,8 @@ (memory 256 256) (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) + (import $memory memory "env" "memory") (export "_test" $_test) - (export "memory" memory) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/unit.fromasm b/test/unit.fromasm index 530761b62..740c6ff52 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -19,10 +19,10 @@ (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (import $memInitBase global "env" "memInitBase" i32) (export "big_negative" $big_negative) (export "pick" $big_negative) - (export "memory" memory) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index d0d98452f..e9d6e4300 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -14,9 +14,9 @@ (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) + (import $memory memory "env" "memory") (export "big_negative" $big_negative) (export "pick" $big_negative) - (export "memory" memory) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index f06912d08..ec758bf32 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -14,9 +14,9 @@ (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) + (import $memory memory "env" "memory") (export "big_negative" $big_negative) (export "pick" $exportMe) - (export "memory" memory) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 222e0fa65..546fcd7fc 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -18,9 +18,9 @@ (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) + (import $memory memory "env" "memory") (export "big_negative" $big_negative) (export "pick" $exportMe) - (export "memory" memory) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) -- cgit v1.2.3 From 28767f631cfdae86ff16ca112bc5b1855b1368c4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 10:33:09 -0700 Subject: import table --- src/asm2wasm.h | 8 ++++ src/js/wasm.js-post.js | 5 ++- src/wasm-js.cpp | 51 +++++++++++++++------- test/emcc_O2_hello_world.fromasm | 1 + test/emcc_O2_hello_world.fromasm.imprecise | 1 + test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 1 + test/emcc_O2_hello_world.fromasm.no-opts | 1 + test/emcc_hello_world.fromasm | 1 + test/emcc_hello_world.fromasm.imprecise | 1 + test/emcc_hello_world.fromasm.imprecise.no-opts | 1 + test/emcc_hello_world.fromasm.no-opts | 1 + test/empty.fromasm | 1 + test/empty.fromasm.imprecise | 1 + test/empty.fromasm.imprecise.no-opts | 1 + test/empty.fromasm.no-opts | 1 + test/hello_world.fromasm | 1 + test/hello_world.fromasm.imprecise | 1 + test/hello_world.fromasm.imprecise.no-opts | 1 + test/hello_world.fromasm.no-opts | 1 + test/memorygrowth.fromasm | 1 + test/memorygrowth.fromasm.imprecise | 1 + test/memorygrowth.fromasm.imprecise.no-opts | 1 + test/memorygrowth.fromasm.no-opts | 1 + test/min.fromasm | 1 + test/min.fromasm.imprecise | 1 + test/min.fromasm.imprecise.no-opts | 1 + test/min.fromasm.no-opts | 1 + test/two_sides.fromasm | 1 + test/two_sides.fromasm.imprecise | 1 + test/two_sides.fromasm.imprecise.no-opts | 1 + test/two_sides.fromasm.no-opts | 1 + test/unit.fromasm | 1 + test/unit.fromasm.imprecise | 1 + test/unit.fromasm.imprecise.no-opts | 1 + test/unit.fromasm.no-opts | 1 + 35 files changed, 79 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 306a953a7..e27c5d9e2 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -832,6 +832,14 @@ void Asm2WasmBuilder::processAsm(Ref ast) { memoryImport->base = MEMORY; memoryImport->kind = Import::Memory; wasm.addImport(memoryImport.release()); + + // import table + auto tableImport = make_unique(); + tableImport->name = TABLE; + tableImport->module = ENV; + tableImport->base = TABLE; + tableImport->kind = Import::Table; + wasm.addImport(tableImport.release()); #endif #if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index dcffb1ee8..d691c22f2 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -274,10 +274,13 @@ function integrateWasmJS(Module) { global = fixImports(global); env = fixImports(env); - // import memory + // import memory and table if (!env['memory']) { env['memory'] = providedBuffer; } + if (!env['table']) { + env['table'] = new Array(1024); + } // try the methods. each should return the exports if it succeeded diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 31448d2a0..7d71cec3c 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -145,14 +145,16 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { Module['asmExports'] = {}; }); for (auto& curr : module->exports) { - EM_ASM_({ - var name = Pointer_stringify($0); - Module['asmExports'][name] = function() { - Module['tempArguments'] = Array.prototype.slice.call(arguments); - Module['_call_from_js']($0); - return Module['tempReturn']; - }; - }, curr->name.str); + if (curr->kind == Export::Function) { + EM_ASM_({ + var name = Pointer_stringify($0); + Module['asmExports'][name] = function() { + Module['tempArguments'] = Array.prototype.slice.call(arguments); + Module['_call_from_js']($0); + return Module['tempReturn']; + }; + }, curr->name.str); + } } // verify imports are provided @@ -177,7 +179,7 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { assert(import->kind == Import::Memory); // memory is imported EM_ASM({ - Module['outside']['tempBuffer'] = Module['lookupImport']('env', 'memory'); + Module['asmExports']['memory'] = Module['lookupImport']('env', 'memory'); }); found = true; } @@ -185,25 +187,42 @@ extern "C" void EMSCRIPTEN_KEEPALIVE instantiate() { if (!found) { // no memory import; create a new buffer here, just like native wasm support would. EM_ASM_({ - Module['outside']['tempBuffer'] = Module['outside']['newBuffer'] = new ArrayBuffer($0); + Module['asmExports']['memory'] = Module['outside']['newBuffer'] = new ArrayBuffer($0); }, wasm.memory.initial * Memory::kPageSize); } } for (auto segment : wasm.memory.segments) { EM_ASM_({ var source = Module['HEAP8'].subarray($1, $1 + $2); - var target = new Int8Array(Module['outside']['tempBuffer']); + var target = new Int8Array(Module['asmExports']['memory']); target.set(source, $0); }, ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(), &segment.data[0], segment.data.size()); } + // look for imported table + { + bool found = false; + for (auto& import : wasm.imports) { + if (import->module == ENV && import->base == TABLE) { + assert(import->kind == Import::Table); + // table is imported + EM_ASM({ + Module['outside']['wasmTable'] = Module['lookupImport']('env', 'table'); + }); + found = true; + } + } + if (!found) { + // no table import; create a new one here, just like native wasm support would. + EM_ASM_({ + Module['outside']['wasmTable'] = new Array($0); + }, wasm.table.initial); + } + } EM_ASM({ - Module['outside']['tempBuffer'] = null; + Module['asmExports']['table'] = Module['outside']['wasmTable']; }); - // Table support is in a JS array. If the entry is a number, it's a function pointer. If not, it's a JS method to be called directly + // Emulated table support is in a JS array. If the entry is a number, it's a function pointer. If not, it's a JS method to be called directly // TODO: make them all JS methods, wrapping a dynCall where necessary? - EM_ASM_({ - Module['outside']['wasmTable'] = new Array($0); - }, wasm.table.initial); for (auto segment : wasm.table.segments) { Address offset = ConstantExpressionRunner(instance.globals).visit(segment.offset).value.geti32(); assert(offset + segment.data.size() <= wasm.table.initial); diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 21873f241..fbf527eb4 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -31,6 +31,7 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 39e95673c..3a518cf6c 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -29,6 +29,7 @@ (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index a5e952b4c..af862279a 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -29,6 +29,7 @@ (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 303b1e723..634a53659 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -30,6 +30,7 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 666f03482..036619963 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -40,6 +40,7 @@ (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index e30167119..99ae85d71 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -33,6 +33,7 @@ (import $_sysconf "env" "_sysconf" (param i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index a0429b58c..b5e740df2 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -33,6 +33,7 @@ (import $_sysconf "env" "_sysconf" (param i32) (result i32)) (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 3c9f8123a..49c0aed22 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -39,6 +39,7 @@ (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/empty.fromasm b/test/empty.fromasm index 2dcb800dd..2afc01ebf 100644 --- a/test/empty.fromasm +++ b/test/empty.fromasm @@ -2,5 +2,6 @@ (memory 256 256) (data (get_global $memInitBase) "empty.asm.js") (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) ) diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise index 6c3928ac1..f0a2ff208 100644 --- a/test/empty.fromasm.imprecise +++ b/test/empty.fromasm.imprecise @@ -1,4 +1,5 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") ) diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts index 6c3928ac1..f0a2ff208 100644 --- a/test/empty.fromasm.imprecise.no-opts +++ b/test/empty.fromasm.imprecise.no-opts @@ -1,4 +1,5 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") ) diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts index 6c3928ac1..f0a2ff208 100644 --- a/test/empty.fromasm.no-opts +++ b/test/empty.fromasm.no-opts @@ -1,4 +1,5 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") ) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index cea20a687..64839186a 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -2,6 +2,7 @@ (memory 256 256) (data (get_global $memInitBase) "hello_world.asm.js") (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 0438017ff..90eea0c3b 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,6 +1,7 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 80e7688e2..deae6ab2a 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,6 +1,7 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 80e7688e2..deae6ab2a 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,6 +1,7 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 390f163bb..ec2f13065 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -27,6 +27,7 @@ (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "_free" $fb) (export "_main" $Na) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index fb8b5b085..0ade046a3 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -25,6 +25,7 @@ (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 6cdc4fd40..e8ec51644 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -25,6 +25,7 @@ (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index fd1b541d1..a5c292652 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -26,6 +26,7 @@ (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/min.fromasm b/test/min.fromasm index 1a69787ab..907bc572e 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -3,6 +3,7 @@ (data (get_global $memInitBase) "min.asm.js") (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "floats" $floats) (func $floats (param $0 f32) (result f32) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index c1703c203..612ed2388 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -2,6 +2,7 @@ (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "floats" $floats) (func $floats (param $0 f32) (result f32) (local $1 f32) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 7ba8db448..00740ad5f 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -2,6 +2,7 @@ (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 7ba8db448..00740ad5f 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -2,6 +2,7 @@ (memory 256 256) (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 45649cba6..53831b7ec 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -4,6 +4,7 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index ce7b83d1f..cd13cea64 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,6 +1,7 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index 3d27fcef4..cce1e9b62 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,6 +1,7 @@ (module (memory 256 256) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index 51b871191..a55ccddf1 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -3,6 +3,7 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/unit.fromasm b/test/unit.fromasm index 740c6ff52..1987f990b 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -20,6 +20,7 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (import $memInitBase global "env" "memInitBase" i32) (export "big_negative" $big_negative) (export "pick" $big_negative) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index e9d6e4300..3bd3d6881 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -15,6 +15,7 @@ (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "big_negative" $big_negative) (export "pick" $big_negative) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index ec758bf32..afacf0794 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -15,6 +15,7 @@ (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 546fcd7fc..165b9df50 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -19,6 +19,7 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") + (import $table table "env" "table") (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) -- cgit v1.2.3 From fd0160dafa25699404c1603adfcf965c75115854 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 11:17:36 -0700 Subject: import memoryBase and tableBase --- src/asm2wasm.h | 23 ++++++++++++++++++++++ src/js/wasm.js-post.js | 7 +++++-- src/tools/asm2wasm.cpp | 10 +--------- test/emcc_O2_hello_world.fromasm | 5 +++-- test/emcc_O2_hello_world.fromasm.imprecise | 2 ++ test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 2 ++ test/emcc_O2_hello_world.fromasm.no-opts | 2 ++ test/emcc_hello_world.fromasm | 5 +++-- test/emcc_hello_world.fromasm.imprecise | 2 ++ test/emcc_hello_world.fromasm.imprecise.no-opts | 2 ++ test/emcc_hello_world.fromasm.no-opts | 2 ++ test/empty.fromasm | 5 +++-- test/empty.fromasm.imprecise | 2 ++ test/empty.fromasm.imprecise.no-opts | 2 ++ test/empty.fromasm.no-opts | 2 ++ test/hello_world.fromasm | 5 +++-- test/hello_world.fromasm.imprecise | 2 ++ test/hello_world.fromasm.imprecise.no-opts | 2 ++ test/hello_world.fromasm.no-opts | 2 ++ test/memorygrowth.fromasm | 5 +++-- test/memorygrowth.fromasm.imprecise | 2 ++ test/memorygrowth.fromasm.imprecise.no-opts | 2 ++ test/memorygrowth.fromasm.no-opts | 2 ++ test/min.fromasm | 5 +++-- test/min.fromasm.imprecise | 2 ++ test/min.fromasm.imprecise.no-opts | 2 ++ test/min.fromasm.no-opts | 2 ++ test/two_sides.fromasm | 5 +++-- test/two_sides.fromasm.imprecise | 2 ++ test/two_sides.fromasm.imprecise.no-opts | 2 ++ test/two_sides.fromasm.no-opts | 2 ++ test/unit.fromasm | 5 +++-- test/unit.fromasm.imprecise | 2 ++ test/unit.fromasm.imprecise.no-opts | 2 ++ test/unit.fromasm.no-opts | 2 ++ 35 files changed, 101 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index e27c5d9e2..0cb9b8dbe 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -840,6 +840,29 @@ void Asm2WasmBuilder::processAsm(Ref ast) { tableImport->base = TABLE; tableImport->kind = Import::Table; wasm.addImport(tableImport.release()); + + // Import memory offset + { + auto* import = new Import; + import->name = Name("memoryBase"); + import->module = Name("env"); + import->base = Name("memoryBase"); + import->kind = Import::Global; + import->globalType = i32; + wasm.addImport(import); + } + + // Import table offset + { + auto* import = new Import; + import->name = Name("tableBase"); + import->module = Name("env"); + import->base = Name("tableBase"); + import->kind = Import::Global; + import->globalType = i32; + wasm.addImport(import); + } + #endif #if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index d691c22f2..1c5e6b0b1 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -212,8 +212,11 @@ function integrateWasmJS(Module) { info.global = global; info.env = env; - if (!('memInitBase' in env)) { - env['memInitBase'] = STATIC_BASE; // tell the memory segments where to place themselves + if (!('memoryBase' in env)) { + env['memoryBase'] = STATIC_BASE; // tell the memory segments where to place themselves + } + if (!('tableBase' in env)) { + env['tableBase'] = 0; // tell the memory segments where to place themselves } wasmJS['providedTotalMemory'] = Module['buffer'].byteLength; diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index af2cf6f5a..031b1fd23 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -101,16 +101,8 @@ int main(int argc, const char *argv[]) { if (memInit != options.extra.end()) { auto filename = memInit->second.c_str(); auto data(read_file>(filename, Flags::Binary, options.debug ? Flags::Debug : Flags::Release)); - // the mem init's base is imported - auto* import = new Import; - import->name = Name("memInitBase"); - import->module = Name("env"); - import->base = Name("memInitBase"); - import->kind = Import::Global; - import->globalType = i32; - wasm.addImport(import); // create the memory segment - wasm.memory.segments.emplace_back(Builder(wasm).makeGetGlobal(import->name, import->globalType), data); + wasm.memory.segments.emplace_back(Builder(wasm).makeGetGlobal(Name("memoryBase"), i32), data); } if (options.debug) std::cerr << "printing..." << std::endl; diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index fbf527eb4..72023d55c 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -1,6 +1,6 @@ (module (memory 256 256) - (data (get_global $memInitBase) "emcc_O2_hello_world.asm.js") + (data (get_global $memoryBase) "emcc_O2_hello_world.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -32,7 +32,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 3a518cf6c..691e60f0a 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -30,6 +30,8 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index af862279a..6eaa96fd7 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -30,6 +30,8 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 634a53659..189de5e62 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -31,6 +31,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 036619963..49f2c0080 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -1,6 +1,6 @@ (module (memory 256 256) - (data (get_global $memInitBase) "emcc_hello_world.asm.js") + (data (get_global $memoryBase) "emcc_hello_world.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -41,7 +41,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 99ae85d71..0cf544e09 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -34,6 +34,8 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index b5e740df2..339580ad7 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -34,6 +34,8 @@ (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 49c0aed22..98f57b812 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -40,6 +40,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/empty.fromasm b/test/empty.fromasm index 2afc01ebf..b68429ccf 100644 --- a/test/empty.fromasm +++ b/test/empty.fromasm @@ -1,7 +1,8 @@ (module (memory 256 256) - (data (get_global $memInitBase) "empty.asm.js") + (data (get_global $memoryBase) "empty.asm.js") (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) ) diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise index f0a2ff208..2042278ee 100644 --- a/test/empty.fromasm.imprecise +++ b/test/empty.fromasm.imprecise @@ -2,4 +2,6 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) ) diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts index f0a2ff208..2042278ee 100644 --- a/test/empty.fromasm.imprecise.no-opts +++ b/test/empty.fromasm.imprecise.no-opts @@ -2,4 +2,6 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) ) diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts index f0a2ff208..2042278ee 100644 --- a/test/empty.fromasm.no-opts +++ b/test/empty.fromasm.no-opts @@ -2,4 +2,6 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) ) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 64839186a..1706d2a2b 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,9 +1,10 @@ (module (memory 256 256) - (data (get_global $memInitBase) "hello_world.asm.js") + (data (get_global $memoryBase) "hello_world.asm.js") (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 90eea0c3b..c69686d27 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -2,6 +2,8 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index deae6ab2a..1bd263d54 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -2,6 +2,8 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index deae6ab2a..1bd263d54 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -2,6 +2,8 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index ec2f13065..eaec42b73 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -1,6 +1,6 @@ (module (memory 256 256) - (data (get_global $memInitBase) "memorygrowth.asm.js") + (data (get_global $memoryBase) "memorygrowth.asm.js") (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -28,7 +28,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 0ade046a3..68912b28b 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -26,6 +26,8 @@ (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index e8ec51644..ac5e13f93 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -26,6 +26,8 @@ (import $ya "env" "___syscall146" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index a5c292652..4c91ef8eb 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -27,6 +27,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/min.fromasm b/test/min.fromasm index 907bc572e..9250c1693 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,10 +1,11 @@ (module (memory 256 256) - (data (get_global $memInitBase) "min.asm.js") + (data (get_global $memoryBase) "min.asm.js") (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "floats" $floats) (func $floats (param $0 f32) (result f32) (local $1 f32) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 612ed2388..9d0edd356 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -3,6 +3,8 @@ (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "floats" $floats) (func $floats (param $0 f32) (result f32) (local $1 f32) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 00740ad5f..31828a21a 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -3,6 +3,8 @@ (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 00740ad5f..31828a21a 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -3,6 +3,8 @@ (import $tDP global "env" "tempDoublePtr" i32) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index 53831b7ec..c567116ae 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -1,11 +1,12 @@ (module (memory 256 256) - (data (get_global $memInitBase) "two_sides.asm.js") + (data (get_global $memoryBase) "two_sides.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index cd13cea64..fbd3799c4 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -2,6 +2,8 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index cce1e9b62..550d747dc 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -2,6 +2,8 @@ (memory 256 256) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index a55ccddf1..4123ec856 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -4,6 +4,8 @@ (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/unit.fromasm b/test/unit.fromasm index 1987f990b..0260adb81 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -1,6 +1,6 @@ (module (memory 256 256) - (data (get_global $memInitBase) "unit.asm.js") + (data (get_global $memoryBase) "unit.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -21,7 +21,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") - (import $memInitBase global "env" "memInitBase" i32) + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "big_negative" $big_negative) (export "pick" $big_negative) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 3bd3d6881..5ebe88c6f 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -16,6 +16,8 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "big_negative" $big_negative) (export "pick" $big_negative) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index afacf0794..7fdd01aaa 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -16,6 +16,8 @@ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 165b9df50..14c4d6615 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -20,6 +20,8 @@ (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (import $memory memory "env" "memory") (import $table table "env" "table") + (import $memoryBase global "env" "memoryBase" i32) + (import $tableBase global "env" "tableBase" i32) (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) -- cgit v1.2.3 From d58adf43956c65615c9cd8d6c2f4c2a3cceff8bb Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 18:15:33 -0700 Subject: support HEAP8[x | 0| notation in asm2wasm --- src/asm2wasm.h | 4 +++- test/unit.asm.js | 5 +++++ test/unit.fromasm | 5 +++++ test/unit.fromasm.imprecise | 5 +++++ test/unit.fromasm.imprecise.no-opts | 7 +++++++ test/unit.fromasm.no-opts | 7 +++++++ 6 files changed, 32 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 0cb9b8dbe..059e51c59 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1819,7 +1819,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { // if there is a shift, we can just look through it, etc. processUnshifted = [&](Ref ptr, unsigned bytes) { auto shifts = bytesToShift(bytes); - if (ptr[0] == BINARY && ptr[1] == RSHIFT && ptr[3][0] == NUM && ptr[3][1]->getInteger() == shifts) { + // HEAP?[addr >> ?], or HEAP8[x | 0] + if ((ptr[0] == BINARY && ptr[1] == RSHIFT && ptr[3][0] == NUM && ptr[3][1]->getInteger() == shifts) || + (bytes == 1 && ptr[0] == BINARY && ptr[1] == OR && ptr[3][0] == NUM && ptr[3][1]->getInteger() == 0)) { return process(ptr[2]); // look through it } else if (ptr[0] == NUM) { // constant, apply a shift (e.g. HEAP32[1] is address 4) diff --git a/test/unit.asm.js b/test/unit.asm.js index 8f0812e29..25aed0834 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -319,6 +319,11 @@ function asm(global, env, buffer) { return 0; } + function heap8NoShift(x) { + x = x | 0; + return HEAP8[x | 0] | 0; + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 0260adb81..98202a4ec 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -575,4 +575,9 @@ ) (i32.const 0) ) + (func $heap8NoShift (param $0 i32) (result i32) + (i32.load8_s + (get_local $0) + ) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 5ebe88c6f..493ebb67e 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -556,4 +556,9 @@ ) (i32.const 0) ) + (func $heap8NoShift (param $0 i32) (result i32) + (i32.load8_s + (get_local $0) + ) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 7fdd01aaa..89a448a82 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -956,6 +956,13 @@ (i32.const 0) ) ) + (func $heap8NoShift (param $x i32) (result i32) + (return + (i32.load8_s + (get_local $x) + ) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 14c4d6615..f1253c849 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -962,6 +962,13 @@ (i32.const 0) ) ) + (func $heap8NoShift (param $x i32) (result i32) + (return + (i32.load8_s + (get_local $x) + ) + ) + ) (func $z (nop) ) -- cgit v1.2.3 From 0793f2f87ca023e1769c7e7d4c64fa16d7fec1a2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 19:20:53 -0700 Subject: Add a ReFinalize helper, and use that to properly handle asm.js imports whose return value is polymorphic --- src/asm2wasm.h | 34 ++++++++++++++----- src/ast_utils.h | 28 ++++++++++++++++ test/unit.asm.js | 6 ++++ test/unit.fromasm | 64 +++++++++++++++++++++++++++-------- test/unit.fromasm.imprecise | 64 +++++++++++++++++++++++++++-------- test/unit.fromasm.imprecise.no-opts | 66 +++++++++++++++++++++++++++++-------- test/unit.fromasm.no-opts | 66 +++++++++++++++++++++++++++++-------- 7 files changed, 263 insertions(+), 65 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 059e51c59..53fa78db4 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -224,12 +224,6 @@ private: // if we already saw this signature, verify it's the same (or else handle that) if (importedFunctionTypes.find(importName) != importedFunctionTypes.end()) { FunctionType* previous = importedFunctionTypes[importName].get(); -#if 0 - std::cout << "compare " << importName.str << "\nfirst: "; - type.print(std::cout, 0); - std::cout << "\nsecond: "; - previous.print(std::cout, 0) << ".\n"; -#endif if (*type != *previous) { // merge it in. we'll add on extra 0 parameters for ones not actually used, and upgrade types to // double where there is a conflict (which is ok since in JS, double can contain everything @@ -247,6 +241,8 @@ private: } if (previous->result == none) { previous->result = type->result; // use a more concrete type + } else if (previous->result != type->result) { + previous->result = f64; // overloaded return type, make it a double } } } else { @@ -752,7 +748,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { void visitCall(Call* curr) { assert(getModule()->checkFunction(curr->target) ? true : (std::cerr << curr->target << '\n', false)); - curr->type = getModule()->getFunction(curr->target)->result; + auto result = getModule()->getFunction(curr->target)->result; + if (curr->type != result) { + curr->type = result; + } } void visitCallImport(CallImport* curr) { @@ -776,9 +775,25 @@ void Asm2WasmBuilder::processAsm(Ref ast) { } } } - - curr->type = getModule()->getImport(curr->target)->functionType->result; + auto importResult = getModule()->getImport(curr->target)->functionType->result; + if (curr->type != importResult) { + if (importResult == f64) { + // we use a JS f64 value which is the most general, and convert to it + switch (curr->type) { + case i32: replaceCurrent(parent->builder.makeUnary(TruncSFloat64ToInt32, curr)); break; + case f32: replaceCurrent(parent->builder.makeUnary(DemoteFloat64, curr)); break; + case none: replaceCurrent(parent->builder.makeDrop(curr)); break; + default: WASM_UNREACHABLE(); + } + } else { + assert(curr->type == none); + // we don't want a return value here, but the import does provide one + replaceCurrent(parent->builder.makeDrop(curr)); + } + curr->type = importResult; + } } + void visitCallIndirect(CallIndirect* curr) { // we already call into target = something + offset, where offset is a callImport with the name of the table. replace that with the table offset auto add = curr->target->cast(); @@ -789,6 +804,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { }; PassRunner passRunner(&wasm); passRunner.add(this); + passRunner.add(); // FinalizeCalls changes call types, need to percolate passRunner.add(); // FinalizeCalls may cause us to require additional drops if (optimize) { passRunner.add("vacuum"); // autodrop can add some garbage diff --git a/src/ast_utils.h b/src/ast_utils.h index 0bb0a821e..9b2ff10cd 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -821,6 +821,34 @@ struct AutoDrop : public WalkerPass>> { + void visitBlock(Block *curr) { curr->finalize(); } + void visitIf(If *curr) { curr->finalize(); } + void visitLoop(Loop *curr) { curr->finalize(); } + void visitBreak(Break *curr) { curr->finalize(); } + void visitSwitch(Switch *curr) { curr->finalize(); } + void visitCall(Call *curr) { curr->finalize(); } + void visitCallImport(CallImport *curr) { curr->finalize(); } + void visitCallIndirect(CallIndirect *curr) { curr->finalize(); } + void visitGetLocal(GetLocal *curr) { curr->finalize(); } + void visitSetLocal(SetLocal *curr) { curr->finalize(); } + void visitGetGlobal(GetGlobal *curr) { curr->finalize(); } + void visitSetGlobal(SetGlobal *curr) { curr->finalize(); } + void visitLoad(Load *curr) { curr->finalize(); } + void visitStore(Store *curr) { curr->finalize(); } + void visitConst(Const *curr) { curr->finalize(); } + void visitUnary(Unary *curr) { curr->finalize(); } + void visitBinary(Binary *curr) { curr->finalize(); } + void visitSelect(Select *curr) { curr->finalize(); } + void visitDrop(Drop *curr) { curr->finalize(); } + void visitReturn(Return *curr) { curr->finalize(); } + void visitHost(Host *curr) { curr->finalize(); } + void visitNop(Nop *curr) { curr->finalize(); } + void visitUnreachable(Unreachable *curr) { curr->finalize(); } +}; + } // namespace wasm #endif // wasm_ast_utils_h diff --git a/test/unit.asm.js b/test/unit.asm.js index 25aed0834..e76ae1ef9 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -324,6 +324,12 @@ function asm(global, env, buffer) { return HEAP8[x | 0] | 0; } + function conditionalTypeFun() { + var x = 0, y = +0; + x = 1 ? abort(5) | 0 : 2; + y = 3 ? +abort(7) : 4.5; + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 98202a4ec..a3fbf0add 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -7,13 +7,13 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$dd (func (param f64) (result f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64)) + (import $abort "env" "abort" (param f64) (result f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) @@ -319,23 +319,33 @@ (nop) ) (func $aborts - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.convert_s/i32 - (i32.const 55) + (drop + (call_import $abort + (f64.convert_s/i32 + (i32.const 55) + ) ) ) - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.const 12.34) + (drop + (call_import $abort + (f64.const 12.34) + ) ) - (call_import $abort - (f64.promote/f32 - (f32.const 56.779998779296875) + (drop + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) ) @@ -580,4 +590,30 @@ (get_local $0) ) ) + (func $conditionalTypeFun + (drop + (if + (i32.const 1) + (i32.trunc_s/f64 + (call_import $abort + (f64.convert_s/i32 + (i32.const 5) + ) + ) + ) + (i32.const 2) + ) + ) + (drop + (if + (i32.const 3) + (call_import $abort + (f64.convert_s/i32 + (i32.const 7) + ) + ) + (f64.const 4.5) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 493ebb67e..46de1092f 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -4,13 +4,13 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$dd (func (param f64) (result f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64)) + (import $abort "env" "abort" (param f64) (result f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) @@ -300,23 +300,33 @@ (nop) ) (func $aborts - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.convert_s/i32 - (i32.const 55) + (drop + (call_import $abort + (f64.convert_s/i32 + (i32.const 55) + ) ) ) - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.const 12.34) + (drop + (call_import $abort + (f64.const 12.34) + ) ) - (call_import $abort - (f64.promote/f32 - (f32.const 56.779998779296875) + (drop + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) ) @@ -561,4 +571,30 @@ (get_local $0) ) ) + (func $conditionalTypeFun + (drop + (if + (i32.const 1) + (i32.trunc_s/f64 + (call_import $abort + (f64.convert_s/i32 + (i32.const 5) + ) + ) + ) + (i32.const 2) + ) + ) + (drop + (if + (i32.const 3) + (call_import $abort + (f64.convert_s/i32 + (i32.const 7) + ) + ) + (f64.const 4.5) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 89a448a82..3f82776e5 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -4,13 +4,13 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$dd (func (param f64) (result f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64)) + (import $abort "env" "abort" (param f64) (result f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) @@ -543,23 +543,33 @@ ) ) (func $aborts - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.convert_s/i32 - (i32.const 55) + (drop + (call_import $abort + (f64.convert_s/i32 + (i32.const 55) + ) ) ) - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.const 12.34) + (drop + (call_import $abort + (f64.const 12.34) + ) ) - (call_import $abort - (f64.promote/f32 - (f32.const 56.779998779296875) + (drop + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) ) @@ -963,6 +973,34 @@ ) ) ) + (func $conditionalTypeFun + (local $x i32) + (local $y f64) + (set_local $x + (if + (i32.const 1) + (i32.trunc_s/f64 + (call_import $abort + (f64.convert_s/i32 + (i32.const 5) + ) + ) + ) + (i32.const 2) + ) + ) + (set_local $y + (if + (i32.const 3) + (call_import $abort + (f64.convert_s/i32 + (i32.const 7) + ) + ) + (f64.const 4.5) + ) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index f1253c849..c55a309e6 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -6,13 +6,13 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$dd (func (param f64) (result f64))) (import $t global "global" "NaN" f64) (import $u global "global" "Infinity" f64) (import $tempDoublePtr global "env" "tempDoublePtr" i32) (import $n global "env" "gb" i32) (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64)) + (import $abort "env" "abort" (param f64) (result f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) @@ -549,23 +549,33 @@ ) ) (func $aborts - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.convert_s/i32 - (i32.const 55) + (drop + (call_import $abort + (f64.convert_s/i32 + (i32.const 55) + ) ) ) - (call_import $abort - (f64.const 0) + (drop + (call_import $abort + (f64.const 0) + ) ) - (call_import $abort - (f64.const 12.34) + (drop + (call_import $abort + (f64.const 12.34) + ) ) - (call_import $abort - (f64.promote/f32 - (f32.const 56.779998779296875) + (drop + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) ) @@ -969,6 +979,34 @@ ) ) ) + (func $conditionalTypeFun + (local $x i32) + (local $y f64) + (set_local $x + (if + (i32.const 1) + (i32.trunc_s/f64 + (call_import $abort + (f64.convert_s/i32 + (i32.const 5) + ) + ) + ) + (i32.const 2) + ) + ) + (set_local $y + (if + (i32.const 3) + (call_import $abort + (f64.convert_s/i32 + (i32.const 7) + ) + ) + (f64.const 4.5) + ) + ) + ) (func $z (nop) ) -- cgit v1.2.3 From e62f54d9d38e8f6b999d5f18f052424b7d603b6b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 31 Aug 2016 16:53:12 -0700 Subject: new import syntax in spec repo --- src/passes/Print.cpp | 36 +++++------- src/wasm-s-parser.h | 35 ++++++++--- test/emcc_O2_hello_world.fromasm | 52 ++++++++--------- test/emcc_O2_hello_world.fromasm.imprecise | 50 ++++++++-------- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 50 ++++++++-------- test/emcc_O2_hello_world.fromasm.no-opts | 52 ++++++++--------- test/emcc_hello_world.fromasm | 68 +++++++++++----------- test/emcc_hello_world.fromasm.imprecise | 58 +++++++++--------- test/emcc_hello_world.fromasm.imprecise.no-opts | 58 +++++++++--------- test/emcc_hello_world.fromasm.no-opts | 68 +++++++++++----------- test/empty.fromasm | 8 +-- test/empty.fromasm.imprecise | 8 +-- test/empty.fromasm.imprecise.no-opts | 8 +-- test/empty.fromasm.no-opts | 8 +-- test/example/c-api-kitchen-sink.txt | 14 ++--- test/example/c-api-kitchen-sink.txt.txt | 6 +- test/example/relooper-fuzz.txt | 4 +- test/example/relooper-fuzz1.txt | 4 +- test/hello_world.fromasm | 8 +-- test/hello_world.fromasm.imprecise | 8 +-- test/hello_world.fromasm.imprecise.no-opts | 8 +-- test/hello_world.fromasm.no-opts | 8 +-- test/memorygrowth.fromasm | 46 +++++++-------- test/memorygrowth.fromasm.imprecise | 44 +++++++------- test/memorygrowth.fromasm.imprecise.no-opts | 44 +++++++------- test/memorygrowth.fromasm.no-opts | 46 +++++++-------- test/min.fromasm | 10 ++-- test/min.fromasm.imprecise | 10 ++-- test/min.fromasm.imprecise.no-opts | 10 ++-- test/min.fromasm.no-opts | 10 ++-- test/passes/coalesce-locals-learning.txt | 2 +- test/passes/coalesce-locals.txt | 2 +- test/passes/duplicate-function-elimination.txt | 8 +-- test/passes/simplify-locals.txt | 8 +-- test/passes/vacuum.txt | 2 +- test/two_sides.fromasm | 10 ++-- test/two_sides.fromasm.imprecise | 8 +-- test/two_sides.fromasm.imprecise.no-opts | 8 +-- test/two_sides.fromasm.no-opts | 10 ++-- test/unit.fromasm | 30 +++++----- test/unit.fromasm.imprecise | 26 ++++----- test/unit.fromasm.imprecise.no-opts | 26 ++++----- test/unit.fromasm.no-opts | 30 +++++----- test/unit.wast | 6 +- test/unit.wast.fromBinary | 6 +- 45 files changed, 515 insertions(+), 506 deletions(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 0071ede38..d25b64886 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -514,11 +514,9 @@ struct PrintSExpression : public Visitor { printMinorOpening(o, "unreachable") << ')'; } // Module-level visitors - void visitFunctionType(FunctionType *curr, bool full=false) { - if (full) { - printOpening(o, "type") << ' '; - printName(curr->name) << " (func"; - } + void visitFunctionType(FunctionType *curr, Name* internalName = nullptr) { + o << "(func"; + if (internalName) o << ' ' << *internalName; if (curr->params.size() > 0) { o << maybeSpace; printMinorOpening(o, "param"); @@ -531,27 +529,17 @@ struct PrintSExpression : public Visitor { o << maybeSpace; printMinorOpening(o, "result ") << printWasmType(curr->result) << ')'; } - if (full) { - o << "))"; - } + o << ")"; } void visitImport(Import *curr) { printOpening(o, "import "); - printName(curr->name) << ' '; - switch (curr->kind) { - case Export::Function: break; - case Export::Table: o << "table "; break; - case Export::Memory: o << "memory "; break; - case Export::Global: o << "global "; break; - default: WASM_UNREACHABLE(); - } printText(o, curr->module.str) << ' '; - printText(o, curr->base.str); + printText(o, curr->base.str) << ' '; switch (curr->kind) { - case Export::Function: if (curr->functionType) visitFunctionType(curr->functionType); break; - case Export::Table: break; - case Export::Memory: break; - case Export::Global: o << ' ' << printWasmType(curr->globalType); break; + case Export::Function: if (curr->functionType) visitFunctionType(curr->functionType, &curr->name); break; + case Export::Table: o << "(table " << curr->name << ")"; break; + case Export::Memory: o << "(memory " << curr->name << ")"; break; + case Export::Global: o << "(global " << curr->name << ' ' << printWasmType(curr->globalType) << ")"; break; default: WASM_UNREACHABLE(); } o << ')'; @@ -666,8 +654,10 @@ struct PrintSExpression : public Visitor { } for (auto& child : curr->functionTypes) { doIndent(o, indent); - visitFunctionType(child.get(), true); - o << maybeNewLine; + printOpening(o, "type") << ' '; + printName(child->name) << ' '; + visitFunctionType(child.get()); + o << ")" << maybeNewLine; } for (auto& child : curr->imports) { doIndent(o, indent); diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 65335c1be..3ac900213 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1429,8 +1429,24 @@ private: void parseImport(Element& s) { std::unique_ptr im = make_unique(); size_t i = 1; + bool newStyle = s.size() == 4 && s[3]->isList(); // (import "env" "STACKTOP" (global $stackTop i32)) + if (newStyle) { + if ((*s[3])[0]->str() == FUNC) { + im->kind = Import::Function; + } else if ((*s[3])[0]->str() == MEMORY) { + im->kind = Import::Memory; + } else if ((*s[3])[0]->str() == TABLE) { + im->kind = Import::Table; + } else if ((*s[3])[0]->str() == GLOBAL) { + im->kind = Import::Global; + } else { + newStyle = false; // either (param..) or (result..) + } + } if (s.size() > 3 && s[3]->isStr()) { im->name = s[i++]->str(); + } else if (newStyle) { + im->name = (*s[3])[1]->str(); } else { im->name = Name::fromInt(importCounter); } @@ -1438,24 +1454,27 @@ private: if (!s[i]->quoted()) { if (s[i]->str() == MEMORY) { im->kind = Import::Memory; - } else if (s[2]->str() == TABLE) { + } else if (s[i]->str() == TABLE) { im->kind = Import::Table; - } else if (s[2]->str() == GLOBAL) { + } else if (s[i]->str() == GLOBAL) { im->kind = Import::Global; } else { WASM_UNREACHABLE(); } i++; - } else { + } else if (!newStyle) { im->kind = Import::Function; } im->module = s[i++]->str(); if (!s[i]->isStr()) throw ParseException("no name for import"); im->base = s[i++]->str(); + // parse internals + Element& inner = newStyle ? *s[3] : s; + Index j = newStyle ? 2 : i; if (im->kind == Import::Function) { std::unique_ptr type = make_unique(); - if (s.size() > i) { - Element& params = *s[i]; + if (inner.size() > j) { + Element& params = *inner[j]; IString id = params[0]->str(); if (id == PARAM) { for (size_t i = 1; i < params.size(); i++) { @@ -1470,15 +1489,15 @@ private: } else { throw ParseException("bad import element"); } - if (s.size() > i+1) { - Element& result = *s[i+1]; + if (inner.size() > j+1) { + Element& result = *inner[j+1]; assert(result[0]->str() == RESULT); type->result = stringToWasmType(result[1]->str()); } } im->functionType = ensureFunctionType(getSig(type.get()), &wasm); } else if (im->kind == Import::Global) { - im->globalType = stringToWasmType(s[i]->str()); + im->globalType = stringToWasmType(inner[j]->str()); } wasm.addImport(im.release()); } diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 72023d55c..853b1c229 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -8,32 +8,32 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___lock "env" "___lock" (param i32)) - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_abort "env" "_abort") - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 691e60f0a..07ca5226e 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -7,31 +7,31 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___lock "env" "___lock" (param i32)) - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_abort "env" "_abort") - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 6eaa96fd7..a57637426 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -7,31 +7,31 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___lock "env" "___lock" (param i32)) - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_abort "env" "_abort") - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 189de5e62..47aee9101 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -7,32 +7,32 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___lock "env" "___lock" (param i32)) - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_abort "env" "_abort") - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $_free) (export "_main" $_main) (export "_memset" $_memset) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 49f2c0080..f9f94a67c 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -9,40 +9,40 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $cttz_i8 global "env" "cttz_i8" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort") - (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) - (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) - (import $nullFunc_vi "env" "nullFunc_vi" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $___lock "env" "___lock" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_abort "env" "_abort") - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $i32s-div "asm2wasm" "i32s-div" (param i32 i32) (result i32)) - (import $i32s-rem "asm2wasm" "i32s-rem" (param i32 i32) (result i32)) - (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "env" "cttz_i8" (global $cttz_i8 i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort)) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "asm2wasm" "i32s-div" (func $i32s-div (param i32 i32) (result i32))) + (import "asm2wasm" "i32s-rem" (func $i32s-rem (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-rem" (func $i32u-rem (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 0cf544e09..9a76257c6 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -7,35 +7,35 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $cttz_i8 global "env" "cttz_i8" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort") - (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) - (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) - (import $nullFunc_vi "env" "nullFunc_vi" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $___lock "env" "___lock" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_abort "env" "_abort") - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "env" "cttz_i8" (global $cttz_i8 i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort)) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 339580ad7..4fa91d0de 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -7,35 +7,35 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $cttz_i8 global "env" "cttz_i8" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort") - (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) - (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) - (import $nullFunc_vi "env" "nullFunc_vi" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $___lock "env" "___lock" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_abort "env" "_abort") - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "env" "cttz_i8" (global $cttz_i8 i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort)) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 98f57b812..7cde2410e 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -8,40 +8,40 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import $STACKTOP global "env" "STACKTOP" i32) - (import $STACK_MAX global "env" "STACK_MAX" i32) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $ABORT global "env" "ABORT" i32) - (import $cttz_i8 global "env" "cttz_i8" i32) - (import $nan global "global" "NaN" f64) - (import $inf global "global" "Infinity" f64) - (import $abort "env" "abort") - (import $nullFunc_ii "env" "nullFunc_ii" (param i32)) - (import $nullFunc_iiii "env" "nullFunc_iiii" (param i32)) - (import $nullFunc_vi "env" "nullFunc_vi" (param i32)) - (import $_pthread_cleanup_pop "env" "_pthread_cleanup_pop" (param i32)) - (import $___lock "env" "___lock" (param i32)) - (import $_pthread_self "env" "_pthread_self" (result i32)) - (import $_abort "env" "_abort") - (import $___syscall6 "env" "___syscall6" (param i32 i32) (result i32)) - (import $_sbrk "env" "_sbrk" (param i32) (result i32)) - (import $_time "env" "_time" (param i32) (result i32)) - (import $_emscripten_memcpy_big "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $___syscall54 "env" "___syscall54" (param i32 i32) (result i32)) - (import $___unlock "env" "___unlock" (param i32)) - (import $___syscall140 "env" "___syscall140" (param i32 i32) (result i32)) - (import $_pthread_cleanup_push "env" "_pthread_cleanup_push" (param i32 i32)) - (import $_sysconf "env" "_sysconf" (param i32) (result i32)) - (import $___syscall146 "env" "___syscall146" (param i32 i32) (result i32)) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $i32s-div "asm2wasm" "i32s-div" (param i32 i32) (result i32)) - (import $i32s-rem "asm2wasm" "i32s-rem" (param i32 i32) (result i32)) - (import $i32u-rem "asm2wasm" "i32u-rem" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $STACKTOP i32)) + (import "env" "STACK_MAX" (global $STACK_MAX i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "ABORT" (global $ABORT i32)) + (import "env" "cttz_i8" (global $cttz_i8 i32)) + (import "global" "NaN" (global $nan f64)) + (import "global" "Infinity" (global $inf f64)) + (import "env" "abort" (func $abort)) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "_pthread_cleanup_pop" (func $_pthread_cleanup_pop (param i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "_pthread_self" (func $_pthread_self (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $_sbrk (param i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "_pthread_cleanup_push" (func $_pthread_cleanup_push (param i32 i32))) + (import "env" "_sysconf" (func $_sysconf (param i32) (result i32))) + (import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32))) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "asm2wasm" "i32s-div" (func $i32s-div (param i32 i32) (result i32))) + (import "asm2wasm" "i32s-rem" (func $i32s-rem (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-rem" (func $i32u-rem (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_i64Subtract" $_i64Subtract) (export "_free" $_free) (export "_main" $_main) diff --git a/test/empty.fromasm b/test/empty.fromasm index b68429ccf..67c1135d4 100644 --- a/test/empty.fromasm +++ b/test/empty.fromasm @@ -1,8 +1,8 @@ (module (memory 256 256) (data (get_global $memoryBase) "empty.asm.js") - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) ) diff --git a/test/empty.fromasm.imprecise b/test/empty.fromasm.imprecise index 2042278ee..5fbd4b5f8 100644 --- a/test/empty.fromasm.imprecise +++ b/test/empty.fromasm.imprecise @@ -1,7 +1,7 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) ) diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts index 2042278ee..5fbd4b5f8 100644 --- a/test/empty.fromasm.imprecise.no-opts +++ b/test/empty.fromasm.imprecise.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) ) diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts index 2042278ee..5fbd4b5f8 100644 --- a/test/empty.fromasm.no-opts +++ b/test/empty.fromasm.no-opts @@ -1,7 +1,7 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) ) diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index a49a8abcc..d272301a9 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -14,7 +14,7 @@ BinaryenFloat64: 4 (type $fiF (func (param i32 f64) (result f32))) (type $v (func)) (type $3 (func)) - (import $an-imported "module" "base" (param i32 f64) (result f32)) + (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (export "kitchen_sinker" "$kitchen()sinker") (export "mem" memory) (table 1 1 anyfunc) @@ -536,7 +536,7 @@ raw: (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (local $0 i32) (call_import $check @@ -1023,7 +1023,7 @@ optimized: (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (call_import $check (i32.const 1337) @@ -1244,7 +1244,7 @@ module loaded from binary form: (start $starter) (type $vi (func (param i32))) (type $v (func)) - (import $print-i32 "spectest" "print" (param i32)) + (import "spectest" "print" (func $print-i32 (param i32))) (func $starter (type $v) (call_import $print-i32 (i32.const 1234) @@ -1605,7 +1605,7 @@ int main() { (type $fiF (func (param i32 f64) (result f32))) (type $v (func)) (type $3 (func)) - (import $an-imported "module" "base" (param i32 f64) (result f32)) + (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (export "kitchen_sinker" "$kitchen()sinker") (export "mem" memory) (table 1 1 anyfunc) @@ -2587,7 +2587,7 @@ raw: (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (local $0 i32) (call_import $check @@ -3078,7 +3078,7 @@ optimized: (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (call_import $check (i32.const 1337) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index cf9177060..5acac8e51 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -9,7 +9,7 @@ (type $fiF (func (param i32 f64) (result f32))) (type $v (func)) (type $3 (func)) - (import $an-imported "module" "base" (param i32 f64) (result f32)) + (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (export "kitchen_sinker" "$kitchen()sinker") (export "mem" memory) (table 1 1 anyfunc) @@ -530,7 +530,7 @@ (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (local $0 i32) (call_import $check @@ -1016,7 +1016,7 @@ (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) - (import $check "module" "check" (param i32)) + (import "module" "check" (func $check (param i32))) (func $just-one-block (type $v) (call_import $check (i32.const 1337) diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index 730106cf9..09b6ef8cb 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -4,7 +4,7 @@ (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) - (import $print "spectest" "print" (param i32)) + (import "spectest" "print" (func $print (param i32))) (export "mem" memory) (func $check (type $i) (result i32) (if @@ -297,7 +297,7 @@ (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) - (import $print "spectest" "print" (param i32)) + (import "spectest" "print" (func $print (param i32))) (export "mem" memory) (func $check (type $i) (result i32) (if diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index f219e9f96..9fbaae5f0 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -4,7 +4,7 @@ (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) - (import $print "spectest" "print" (param i32)) + (import "spectest" "print" (func $print (param i32))) (export "mem" memory) (func $check (type $i) (result i32) (if @@ -273,7 +273,7 @@ (type $i (func (result i32))) (type $v (func)) (type $vi (func (param i32))) - (import $print "spectest" "print" (param i32)) + (import "spectest" "print" (func $print (param i32))) (export "mem" memory) (func $check (type $i) (result i32) (if diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 1706d2a2b..9c3c21bd6 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,10 +1,10 @@ (module (memory 256 256) (data (get_global $memoryBase) "hello_world.asm.js") - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index c69686d27..8c81998c0 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,9 +1,9 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "add" $add) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 1bd263d54..8ee9fb664 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,9 +1,9 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 1bd263d54..8ee9fb664 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,9 +1,9 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "add" $add) (func $add (param $x i32) (param $y i32) (result i32) (return diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index eaec42b73..eedace359 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -7,29 +7,29 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $r global "env" "STACKTOP" i32) - (import $s global "env" "STACK_MAX" i32) - (import $t global "env" "tempDoublePtr" i32) - (import $u global "env" "ABORT" i32) - (import $z global "global" "NaN" f64) - (import $A global "global" "Infinity" f64) - (import $ja "env" "abort" (param i32)) - (import $oa "env" "_pthread_cleanup_pop" (param i32)) - (import $pa "env" "___lock" (param i32)) - (import $qa "env" "_abort") - (import $ra "env" "_pthread_cleanup_push" (param i32 i32)) - (import $sa "env" "___syscall6" (param i32 i32) (result i32)) - (import $ta "env" "_sbrk" (param i32) (result i32)) - (import $ua "env" "___syscall140" (param i32 i32) (result i32)) - (import $va "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $wa "env" "___syscall54" (param i32 i32) (result i32)) - (import $xa "env" "___unlock" (param i32)) - (import $ya "env" "___syscall146" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $r i32)) + (import "env" "STACK_MAX" (global $s i32)) + (import "env" "tempDoublePtr" (global $t i32)) + (import "env" "ABORT" (global $u i32)) + (import "global" "NaN" (global $z f64)) + (import "global" "Infinity" (global $A f64)) + (import "env" "abort" (func $ja (param i32))) + (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) + (import "env" "___lock" (func $pa (param i32))) + (import "env" "_abort" (func $qa)) + (import "env" "_pthread_cleanup_push" (func $ra (param i32 i32))) + (import "env" "___syscall6" (func $sa (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $ta (param i32) (result i32))) + (import "env" "___syscall140" (func $ua (param i32 i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $va (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $wa (param i32 i32) (result i32))) + (import "env" "___unlock" (func $xa (param i32))) + (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 68912b28b..14911b9c2 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -6,28 +6,28 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import $r global "env" "STACKTOP" i32) - (import $s global "env" "STACK_MAX" i32) - (import $t global "env" "tempDoublePtr" i32) - (import $u global "env" "ABORT" i32) - (import $z global "global" "NaN" f64) - (import $A global "global" "Infinity" f64) - (import $ja "env" "abort" (param i32)) - (import $oa "env" "_pthread_cleanup_pop" (param i32)) - (import $pa "env" "___lock" (param i32)) - (import $qa "env" "_abort") - (import $ra "env" "_pthread_cleanup_push" (param i32 i32)) - (import $sa "env" "___syscall6" (param i32 i32) (result i32)) - (import $ta "env" "_sbrk" (param i32) (result i32)) - (import $ua "env" "___syscall140" (param i32 i32) (result i32)) - (import $va "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $wa "env" "___syscall54" (param i32 i32) (result i32)) - (import $xa "env" "___unlock" (param i32)) - (import $ya "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $r i32)) + (import "env" "STACK_MAX" (global $s i32)) + (import "env" "tempDoublePtr" (global $t i32)) + (import "env" "ABORT" (global $u i32)) + (import "global" "NaN" (global $z f64)) + (import "global" "Infinity" (global $A f64)) + (import "env" "abort" (func $ja (param i32))) + (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) + (import "env" "___lock" (func $pa (param i32))) + (import "env" "_abort" (func $qa)) + (import "env" "_pthread_cleanup_push" (func $ra (param i32 i32))) + (import "env" "___syscall6" (func $sa (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $ta (param i32) (result i32))) + (import "env" "___syscall140" (func $ua (param i32 i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $va (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $wa (param i32 i32) (result i32))) + (import "env" "___unlock" (func $xa (param i32))) + (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index ac5e13f93..8ee5fc20d 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -6,28 +6,28 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import $r global "env" "STACKTOP" i32) - (import $s global "env" "STACK_MAX" i32) - (import $t global "env" "tempDoublePtr" i32) - (import $u global "env" "ABORT" i32) - (import $z global "global" "NaN" f64) - (import $A global "global" "Infinity" f64) - (import $ja "env" "abort" (param i32)) - (import $oa "env" "_pthread_cleanup_pop" (param i32)) - (import $pa "env" "___lock" (param i32)) - (import $qa "env" "_abort") - (import $ra "env" "_pthread_cleanup_push" (param i32 i32)) - (import $sa "env" "___syscall6" (param i32 i32) (result i32)) - (import $ta "env" "_sbrk" (param i32) (result i32)) - (import $ua "env" "___syscall140" (param i32 i32) (result i32)) - (import $va "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $wa "env" "___syscall54" (param i32 i32) (result i32)) - (import $xa "env" "___unlock" (param i32)) - (import $ya "env" "___syscall146" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $r i32)) + (import "env" "STACK_MAX" (global $s i32)) + (import "env" "tempDoublePtr" (global $t i32)) + (import "env" "ABORT" (global $u i32)) + (import "global" "NaN" (global $z f64)) + (import "global" "Infinity" (global $A f64)) + (import "env" "abort" (func $ja (param i32))) + (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) + (import "env" "___lock" (func $pa (param i32))) + (import "env" "_abort" (func $qa)) + (import "env" "_pthread_cleanup_push" (func $ra (param i32 i32))) + (import "env" "___syscall6" (func $sa (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $ta (param i32) (result i32))) + (import "env" "___syscall140" (func $ua (param i32 i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $va (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $wa (param i32 i32) (result i32))) + (import "env" "___unlock" (func $xa (param i32))) + (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 4c91ef8eb..91fae3ccf 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -6,29 +6,29 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import $r global "env" "STACKTOP" i32) - (import $s global "env" "STACK_MAX" i32) - (import $t global "env" "tempDoublePtr" i32) - (import $u global "env" "ABORT" i32) - (import $z global "global" "NaN" f64) - (import $A global "global" "Infinity" f64) - (import $ja "env" "abort" (param i32)) - (import $oa "env" "_pthread_cleanup_pop" (param i32)) - (import $pa "env" "___lock" (param i32)) - (import $qa "env" "_abort") - (import $ra "env" "_pthread_cleanup_push" (param i32 i32)) - (import $sa "env" "___syscall6" (param i32 i32) (result i32)) - (import $ta "env" "_sbrk" (param i32) (result i32)) - (import $ua "env" "___syscall140" (param i32 i32) (result i32)) - (import $va "env" "_emscripten_memcpy_big" (param i32 i32 i32) (result i32)) - (import $wa "env" "___syscall54" (param i32 i32) (result i32)) - (import $xa "env" "___unlock" (param i32)) - (import $ya "env" "___syscall146" (param i32 i32) (result i32)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "STACKTOP" (global $r i32)) + (import "env" "STACK_MAX" (global $s i32)) + (import "env" "tempDoublePtr" (global $t i32)) + (import "env" "ABORT" (global $u i32)) + (import "global" "NaN" (global $z f64)) + (import "global" "Infinity" (global $A f64)) + (import "env" "abort" (func $ja (param i32))) + (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) + (import "env" "___lock" (func $pa (param i32))) + (import "env" "_abort" (func $qa)) + (import "env" "_pthread_cleanup_push" (func $ra (param i32 i32))) + (import "env" "___syscall6" (func $sa (param i32 i32) (result i32))) + (import "env" "_sbrk" (func $ta (param i32) (result i32))) + (import "env" "___syscall140" (func $ua (param i32 i32) (result i32))) + (import "env" "_emscripten_memcpy_big" (func $va (param i32 i32 i32) (result i32))) + (import "env" "___syscall54" (func $wa (param i32 i32) (result i32))) + (import "env" "___unlock" (func $xa (param i32))) + (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) diff --git a/test/min.fromasm b/test/min.fromasm index 9250c1693..1aa1e9405 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,11 +1,11 @@ (module (memory 256 256) (data (get_global $memoryBase) "min.asm.js") - (import $tDP global "env" "tempDoublePtr" i32) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "tempDoublePtr" (global $tDP i32)) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "floats" $floats) (func $floats (param $0 f32) (result f32) (local $1 f32) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 9d0edd356..094a713a7 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,10 +1,10 @@ (module (memory 256 256) - (import $tDP global "env" "tempDoublePtr" i32) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "tempDoublePtr" (global $tDP i32)) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "floats" $floats) (func $floats (param $0 f32) (result f32) (local $1 f32) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 31828a21a..2bc20abbb 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,10 +1,10 @@ (module (memory 256 256) - (import $tDP global "env" "tempDoublePtr" i32) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "tempDoublePtr" (global $tDP i32)) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 31828a21a..2bc20abbb 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,10 +1,10 @@ (module (memory 256 256) - (import $tDP global "env" "tempDoublePtr" i32) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "tempDoublePtr" (global $tDP i32)) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "floats" $floats) (func $floats (param $f f32) (result f32) (local $t f32) diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt index a9039e4d8..f5622d097 100644 --- a/test/passes/coalesce-locals-learning.txt +++ b/test/passes/coalesce-locals-learning.txt @@ -5,7 +5,7 @@ (type $2 (func)) (type $3 (func (param i32 f32))) (type $4 (func (param i32))) - (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32)) + (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32))) (func $nothing-to-do (type $2) (local $0 i32) (nop) diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index 3a038ca27..3836cfadb 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -5,7 +5,7 @@ (type $2 (func)) (type $3 (func (param i32 f32))) (type $4 (func (param i32))) - (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32)) + (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32))) (func $nothing-to-do (type $2) (local $0 i32) (nop) diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index c37c41fe3..881a265e9 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -367,8 +367,8 @@ (module (memory 0) (type $FUNCSIG$v (func)) - (import $i "env" "i") - (import $i "env" "j") + (import "env" "i" (func $i)) + (import "env" "j" (func $i)) (func $erase (type $FUNCSIG$v) (call_import $i) ) @@ -376,8 +376,8 @@ (module (memory 0) (type $FUNCSIG$v (func)) - (import $i "env" "i") - (import $j "env" "j") + (import "env" "i" (func $i)) + (import "env" "j" (func $j)) (func $keep2 (type $FUNCSIG$v) (call_import $i) ) diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index ee4418953..72bd7aa12 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -8,10 +8,10 @@ (type $5 (func (param i32) (result i32))) (type $6 (func (param i32 i32 i32 i32 i32 i32))) (type $7 (func (param i32 i32))) - (import $waka "env" "waka") - (import $waka_int "env" "waka_int" (result i32)) - (import $_i64Subtract "env" "i64sub" (param i32 i32 i32 i32) (result i32)) - (import $___udivmoddi4 "env" "moddi" (param i32 i32 i32 i32 i32) (result i32)) + (import "env" "waka" (func $waka)) + (import "env" "waka_int" (func $waka_int (result i32))) + (import "env" "i64sub" (func $_i64Subtract (param i32 i32 i32 i32) (result i32))) + (import "env" "moddi" (func $___udivmoddi4 (param i32 i32 i32 i32 i32) (result i32))) (func $b0-yes (type $4) (param $i1 i32) (local $x i32) (local $y i32) diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index 678c18cfa..1adcc3e6f 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -6,7 +6,7 @@ (type $3 (func (result i32))) (type $4 (func (param i32 f64 i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import $int "env" "int" (result i32)) + (import "env" "int" (func $int (result i32))) (func $b (type $0) (nop) ) diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index c567116ae..d53021c11 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -2,11 +2,11 @@ (memory 256 256) (data (get_global $memoryBase) "two_sides.asm.js") (type $FUNCSIG$id (func (param f64) (result i32))) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index fbd3799c4..d664567b4 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,9 +1,9 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_test" $_test) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index 550d747dc..d6ada31f6 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,9 +1,9 @@ (module (memory 256 256) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index 4123ec856..b10f96c69 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -1,11 +1,11 @@ (module (memory 256 256) (type $FUNCSIG$id (func (param f64) (result i32))) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "_test" $_test) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) diff --git a/test/unit.fromasm b/test/unit.fromasm index a3fbf0add..0a051cf5a 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -8,21 +8,21 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import $t global "global" "NaN" f64) - (import $u global "global" "Infinity" f64) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $n global "env" "gb" i32) - (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64) (result f64)) - (import $print "env" "print" (param i32)) - (import $h "env" "h" (param i32)) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "global" "NaN" (global $t f64)) + (import "global" "Infinity" (global $u f64)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "gb" (global $n i32)) + (import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32))) + (import "env" "abort" (func $abort (param f64) (result f64))) + (import "env" "print" (func $print (param i32))) + (import "env" "h" (func $h (param i32))) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "big_negative" $big_negative) (export "pick" $big_negative) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 46de1092f..2240135c3 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -5,19 +5,19 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import $t global "global" "NaN" f64) - (import $u global "global" "Infinity" f64) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $n global "env" "gb" i32) - (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64) (result f64)) - (import $print "env" "print" (param i32)) - (import $h "env" "h" (param i32)) - (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "global" "NaN" (global $t f64)) + (import "global" "Infinity" (global $u f64)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "gb" (global $n i32)) + (import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32))) + (import "env" "abort" (func $abort (param f64) (result f64))) + (import "env" "print" (func $print (param i32))) + (import "env" "h" (func $h (param i32))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "big_negative" $big_negative) (export "pick" $big_negative) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 3f82776e5..f78c96637 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -5,19 +5,19 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import $t global "global" "NaN" f64) - (import $u global "global" "Infinity" f64) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $n global "env" "gb" i32) - (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64) (result f64)) - (import $print "env" "print" (param i32)) - (import $h "env" "h" (param i32)) - (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "global" "NaN" (global $t f64)) + (import "global" "Infinity" (global $u f64)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "gb" (global $n i32)) + (import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32))) + (import "env" "abort" (func $abort (param f64) (result f64))) + (import "env" "print" (func $print (param i32))) + (import "env" "h" (func $h (param i32))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index c55a309e6..e1e0c5e02 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -7,21 +7,21 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import $t global "global" "NaN" f64) - (import $u global "global" "Infinity" f64) - (import $tempDoublePtr global "env" "tempDoublePtr" i32) - (import $n global "env" "gb" i32) - (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32)) - (import $abort "env" "abort" (param f64) (result f64)) - (import $print "env" "print" (param i32)) - (import $h "env" "h" (param i32)) - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) - (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) - (import $memory memory "env" "memory") - (import $table table "env" "table") - (import $memoryBase global "env" "memoryBase" i32) - (import $tableBase global "env" "tableBase" i32) + (import "global" "NaN" (global $t f64)) + (import "global" "Infinity" (global $u f64)) + (import "env" "tempDoublePtr" (global $tempDoublePtr i32)) + (import "env" "gb" (global $n i32)) + (import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32))) + (import "env" "abort" (func $abort (param f64) (result f64))) + (import "env" "print" (func $print (param i32))) + (import "env" "h" (func $h (param i32))) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) + (import "asm2wasm" "i32u-div" (func $i32u-div (param i32 i32) (result i32))) + (import "env" "memory" (memory $memory)) + (import "env" "table" (table $table)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) (export "big_negative" $big_negative) (export "pick" $exportMe) (global $Int i32 (i32.const 0)) diff --git a/test/unit.wast b/test/unit.wast index ca0e811a9..748b62dab 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -9,9 +9,9 @@ (type $5 (func (result i32))) (type $6 (func (param i32) (result i32))) (type $7 (func (param f64) (result f64))) - (import $_emscripten_asm_const_vi "env" "_emscripten_asm_const_vi") - (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) + (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) (export "big_negative" $big_negative) (table 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 0e681de27..ad0f0786a 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -9,9 +9,9 @@ (type $5 (func (result i32))) (type $6 (func (param i32) (result i32))) (type $7 (func (param f64) (result f64))) - (import $import$0 "env" "_emscripten_asm_const_vi") - (import $import$1 "asm2wasm" "f64-to-int" (param f64) (result i32)) - (import $import$2 "asm2wasm" "f64-rem" (param f64 f64) (result f64)) + (import "env" "_emscripten_asm_const_vi" (func $import$0)) + (import "asm2wasm" "f64-to-int" (func $import$1 (param f64) (result i32))) + (import "asm2wasm" "f64-rem" (func $import$2 (param f64 f64) (result f64))) (export "big_negative" $big_negative) (table 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) -- cgit v1.2.3 From 6b216592116cdf23738df4aebabe7c6d759674e6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 2 Sep 2016 12:21:24 -0700 Subject: new export syntax in spec repo --- src/passes/Print.cpp | 39 ++++++++++-------- src/wasm-s-parser.h | 23 +++++++++-- src/wasm.h | 14 +++++-- test/emcc_O2_hello_world.fromasm | 36 ++++++++--------- test/emcc_O2_hello_world.fromasm.imprecise | 36 ++++++++--------- test/emcc_O2_hello_world.fromasm.imprecise.no-opts | 36 ++++++++--------- test/emcc_O2_hello_world.fromasm.no-opts | 36 ++++++++--------- test/emcc_hello_world.fromasm | 46 +++++++++++----------- test/emcc_hello_world.fromasm.imprecise | 46 +++++++++++----------- test/emcc_hello_world.fromasm.imprecise.no-opts | 46 +++++++++++----------- test/emcc_hello_world.fromasm.no-opts | 46 +++++++++++----------- test/example/c-api-kitchen-sink.txt | 8 ++-- test/example/c-api-kitchen-sink.txt.txt | 4 +- test/example/relooper-fuzz.txt | 4 +- test/example/relooper-fuzz1.txt | 4 +- test/hello_world.fromasm | 2 +- test/hello_world.fromasm.imprecise | 2 +- test/hello_world.fromasm.imprecise.no-opts | 2 +- test/hello_world.fromasm.no-opts | 2 +- test/hello_world.wast | 2 +- test/hello_world.wast.fromBinary | 2 +- test/memorygrowth.fromasm | 40 +++++++++---------- test/memorygrowth.fromasm.imprecise | 40 +++++++++---------- test/memorygrowth.fromasm.imprecise.no-opts | 40 +++++++++---------- test/memorygrowth.fromasm.no-opts | 40 +++++++++---------- test/min.fromasm | 2 +- test/min.fromasm.imprecise | 2 +- test/min.fromasm.imprecise.no-opts | 2 +- test/min.fromasm.no-opts | 2 +- test/min.wast | 2 +- test/min.wast.fromBinary | 2 +- test/passes/duplicate-function-elimination.txt | 4 +- test/passes/remove-unused-functions.txt | 2 +- test/two_sides.fromasm | 2 +- test/two_sides.fromasm.imprecise | 2 +- test/two_sides.fromasm.imprecise.no-opts | 2 +- test/two_sides.fromasm.no-opts | 2 +- test/unit.fromasm | 4 +- test/unit.fromasm.imprecise | 4 +- test/unit.fromasm.imprecise.no-opts | 4 +- test/unit.fromasm.no-opts | 4 +- test/unit.wast | 2 +- test/unit.wast.fromBinary | 2 +- 43 files changed, 336 insertions(+), 306 deletions(-) (limited to 'src') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index d25b64886..43ddc954c 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -546,19 +546,21 @@ struct PrintSExpression : public Visitor { } void visitExport(Export *curr) { printOpening(o, "export "); - printText(o, curr->name.str) << ' '; + printText(o, curr->name.str) << " ("; switch (curr->kind) { - case Export::Function: printName(curr->value); break; - case Export::Table: o << "table"; break; - case Export::Memory: o << "memory"; break; - case Export::Global: o << "global "; printName(curr->value); break; + case Export::Function: o << "func"; break; + case Export::Table: o << "table"; break; + case Export::Memory: o << "memory"; break; + case Export::Global: o << "global"; break; default: WASM_UNREACHABLE(); } - o << ')'; + o << ' '; + printName(curr->value) << "))"; } void visitGlobal(Global *curr) { printOpening(o, "global "); - printName(curr->name) << ' ' << printWasmType(curr->type) << ' '; + printName(curr->name) << ' '; + o << printWasmType(curr->type) << ' '; visit(curr->init); o << ')'; } @@ -598,7 +600,8 @@ struct PrintSExpression : public Visitor { decIndent(); } void visitTable(Table *curr) { - printOpening(o, "table") << ' ' << curr->initial; + printOpening(o, "table") << ' '; + o << curr->initial; if (curr->max && curr->max != Table::kMaxSize) o << ' ' << curr->max; o << " anyfunc)\n"; doIndent(o, indent); @@ -612,15 +615,12 @@ struct PrintSExpression : public Visitor { o << ')'; } } - void visitModule(Module *curr) { - currModule = curr; - printOpening(o, "module", true); - incIndent(); - doIndent(o, indent); - printOpening(o, "memory") << ' ' << curr->memory.initial; - if (curr->memory.max && curr->memory.max != Memory::kMaxSize) o << ' ' << curr->memory.max; + void visitMemory(Memory* curr) { + printOpening(o, "memory") << ' '; + o << curr->initial; + if (curr->max && curr->max != Memory::kMaxSize) o << ' ' << curr->max; o << ")\n"; - for (auto segment : curr->memory.segments) { + for (auto segment : curr->segments) { doIndent(o, indent); printOpening(o, "data ", true); visit(segment.offset); @@ -647,6 +647,13 @@ struct PrintSExpression : public Visitor { } o << "\")\n"; } + } + void visitModule(Module *curr) { + currModule = curr; + printOpening(o, "module", true); + incIndent(); + doIndent(o, indent); + visitMemory(&curr->memory); if (curr->start.is()) { doIndent(o, indent); printOpening(o, "start") << ' ' << curr->start << ')'; diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 3ac900213..c328f3e29 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1402,8 +1402,26 @@ private: void parseExport(Element& s) { std::unique_ptr ex = make_unique(); - if (!s[2]->dollared() && !std::isdigit(s[2]->str()[0])) { - ex->name = s[1]->str(); + ex->name = s[1]->str(); + if (s[2]->isList()) { + auto& inner = *s[2]; + if (inner[0]->str() == FUNC) { + ex->value = inner[1]->str(); + ex->kind = Export::Function; + } else if (inner[0]->str() == MEMORY) { + if (!hasMemory) throw ParseException("memory exported but no memory"); + ex->value = Name::fromInt(0); + ex->kind = Export::Memory; + } else if (inner[0]->str() == TABLE) { + ex->value = Name::fromInt(0); + ex->kind = Export::Table; + } else if (inner[0]->str() == GLOBAL) { + ex->value = inner[1]->str(); + ex->kind = Export::Table; + } else { + WASM_UNREACHABLE(); + } + } else if (!s[2]->dollared() && !std::isdigit(s[2]->str()[0])) { if (s[2]->str() == MEMORY) { if (!hasMemory) throw ParseException("memory exported but no memory"); ex->value = Name::fromInt(0); @@ -1419,7 +1437,6 @@ private: } } else { // function - ex->name = s[1]->str(); ex->value = s[2]->str(); ex->kind = Export::Function; } diff --git a/src/wasm.h b/src/wasm.h index 1cf00cc36..d6bdfe91f 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1454,7 +1454,7 @@ public: Global = 3, }; - Name name; // exported name + Name name; // exported name - note that this is the key, as the internal name is non-unique (can have multiple exports for an internal, also over kinds) Name value; // internal name Kind kind; }; @@ -1474,10 +1474,13 @@ public: } }; + Name name; Address initial, max; std::vector segments; - Table() : initial(0), max(kMaxSize) {} + Table() : initial(0), max(kMaxSize) { + name = Name::fromInt(0); + } }; class Memory { @@ -1499,10 +1502,13 @@ public: } }; + Name name; Address initial, max; // sizes are in pages std::vector segments; - Memory() : initial(0), max(kMaxSize) {} + Memory() : initial(0), max(kMaxSize) { + name = Name::fromInt(0); + } }; class Global { @@ -1531,7 +1537,7 @@ private: // TODO: add a build option where Names are just indices, and then these methods are not needed std::map functionTypesMap; std::map importsMap; - std::map exportsMap; + std::map exportsMap; // exports map is by the *exported* name, which is unique std::map functionsMap; std::map globalsMap; diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 853b1c229..c3ebe3d64 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -34,24 +34,24 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $_free) - (export "_main" $_main) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 07ca5226e..fbcc3c46e 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -32,24 +32,24 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $_free) - (export "_main" $_main) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index a57637426..b125481a7 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -32,24 +32,24 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $_free) - (export "_main" $_main) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 47aee9101..4acb5bc87 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -33,24 +33,24 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $_free) - (export "_main" $_main) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index f9f94a67c..7cb00db19 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -43,29 +43,29 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_i64Subtract" $_i64Subtract) - (export "_free" $_free) - (export "_main" $_main) - (export "_i64Add" $_i64Add) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_bitshift64Lshr" $_bitshift64Lshr) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "_bitshift64Shl" $_bitshift64Shl) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) - (export "___udivmoddi4" $___udivmoddi4) + (export "_i64Subtract" (func $_i64Subtract)) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_i64Add" (func $_i64Add)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_bitshift64Lshr" (func $_bitshift64Lshr)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "_bitshift64Shl" (func $_bitshift64Shl)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "___udivmoddi4" (func $___udivmoddi4)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 9a76257c6..c97524f7b 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -36,29 +36,29 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_i64Subtract" $_i64Subtract) - (export "_free" $_free) - (export "_main" $_main) - (export "_i64Add" $_i64Add) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_bitshift64Lshr" $_bitshift64Lshr) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "_bitshift64Shl" $_bitshift64Shl) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) - (export "___udivmoddi4" $___udivmoddi4) + (export "_i64Subtract" (func $_i64Subtract)) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_i64Add" (func $_i64Add)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_bitshift64Lshr" (func $_bitshift64Lshr)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "_bitshift64Shl" (func $_bitshift64Shl)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "___udivmoddi4" (func $___udivmoddi4)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 4fa91d0de..45f19f21c 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -36,29 +36,29 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_i64Subtract" $_i64Subtract) - (export "_free" $_free) - (export "_main" $_main) - (export "_i64Add" $_i64Add) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_bitshift64Lshr" $_bitshift64Lshr) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "_bitshift64Shl" $_bitshift64Shl) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) - (export "___udivmoddi4" $___udivmoddi4) + (export "_i64Subtract" (func $_i64Subtract)) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_i64Add" (func $_i64Add)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_bitshift64Lshr" (func $_bitshift64Lshr)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "_bitshift64Shl" (func $_bitshift64Shl)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "___udivmoddi4" (func $___udivmoddi4)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 7cde2410e..ea2bb8801 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -42,29 +42,29 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_i64Subtract" $_i64Subtract) - (export "_free" $_free) - (export "_main" $_main) - (export "_i64Add" $_i64Add) - (export "_memset" $_memset) - (export "_malloc" $_malloc) - (export "_memcpy" $_memcpy) - (export "_bitshift64Lshr" $_bitshift64Lshr) - (export "_fflush" $_fflush) - (export "___errno_location" $___errno_location) - (export "_bitshift64Shl" $_bitshift64Shl) - (export "runPostSets" $runPostSets) - (export "stackAlloc" $stackAlloc) - (export "stackSave" $stackSave) - (export "stackRestore" $stackRestore) - (export "establishStackSpace" $establishStackSpace) - (export "setThrew" $setThrew) - (export "setTempRet0" $setTempRet0) - (export "getTempRet0" $getTempRet0) - (export "dynCall_ii" $dynCall_ii) - (export "dynCall_iiii" $dynCall_iiii) - (export "dynCall_vi" $dynCall_vi) - (export "___udivmoddi4" $___udivmoddi4) + (export "_i64Subtract" (func $_i64Subtract)) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_i64Add" (func $_i64Add)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_bitshift64Lshr" (func $_bitshift64Lshr)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "_bitshift64Shl" (func $_bitshift64Shl)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "___udivmoddi4" (func $___udivmoddi4)) (global $__THREW__ i32 (i32.const 0)) (global $threwValue i32 (i32.const 0)) (global $setjmpId i32 (i32.const 0)) diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index d272301a9..f4bfa19e7 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -15,8 +15,8 @@ BinaryenFloat64: 4 (type $v (func)) (type $3 (func)) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) - (export "kitchen_sinker" "$kitchen()sinker") - (export "mem" memory) + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "mem" (memory $0)) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) @@ -1606,8 +1606,8 @@ int main() { (type $v (func)) (type $3 (func)) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) - (export "kitchen_sinker" "$kitchen()sinker") - (export "mem" memory) + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "mem" (memory $0)) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 5acac8e51..d564ce7ca 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -10,8 +10,8 @@ (type $v (func)) (type $3 (func)) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) - (export "kitchen_sinker" "$kitchen()sinker") - (export "mem" memory) + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "mem" (memory $0)) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index 09b6ef8cb..151360306 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -5,7 +5,7 @@ (type $v (func)) (type $vi (func (param i32))) (import "spectest" "print" (func $print (param i32))) - (export "mem" memory) + (export "mem" (memory $0)) (func $check (type $i) (result i32) (if (i32.eq @@ -298,7 +298,7 @@ (type $v (func)) (type $vi (func (param i32))) (import "spectest" "print" (func $print (param i32))) - (export "mem" memory) + (export "mem" (memory $0)) (func $check (type $i) (result i32) (if (i32.eq diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index 9fbaae5f0..be8130228 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -5,7 +5,7 @@ (type $v (func)) (type $vi (func (param i32))) (import "spectest" "print" (func $print (param i32))) - (export "mem" memory) + (export "mem" (memory $0)) (func $check (type $i) (result i32) (if (i32.eq @@ -274,7 +274,7 @@ (type $v (func)) (type $vi (func (param i32))) (import "spectest" "print" (func $print (param i32))) - (export "mem" memory) + (export "mem" (memory $0)) (func $check (type $i) (result i32) (if (i32.eq diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 9c3c21bd6..23aba7d9d 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -5,7 +5,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "add" $add) + (export "add" (func $add)) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 8c81998c0..6bfc4bf68 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -4,7 +4,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "add" $add) + (export "add" (func $add)) (func $add (param $0 i32) (param $1 i32) (result i32) (i32.add (get_local $0) diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 8ee9fb664..31ce2e573 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -4,7 +4,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "add" $add) + (export "add" (func $add)) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 8ee9fb664..31ce2e573 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -4,7 +4,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "add" $add) + (export "add" (func $add)) (func $add (param $x i32) (param $y i32) (result i32) (return (i32.add diff --git a/test/hello_world.wast b/test/hello_world.wast index 915c4a99a..16f0ddc3a 100644 --- a/test/hello_world.wast +++ b/test/hello_world.wast @@ -1,7 +1,7 @@ (module (memory 256 256) (type $0 (func (param i32 i32) (result i32))) - (export "add" $add) + (export "add" (func $add)) (func $add (type $0) (param $x i32) (param $y i32) (result i32) (i32.add (get_local $x) diff --git a/test/hello_world.wast.fromBinary b/test/hello_world.wast.fromBinary index 77a0fee04..0f9f42902 100644 --- a/test/hello_world.wast.fromBinary +++ b/test/hello_world.wast.fromBinary @@ -1,7 +1,7 @@ (module (memory 256 256) (type $0 (func (param i32 i32) (result i32))) - (export "add" $add) + (export "add" (func $add)) (func $add (type $0) (param $var$0 i32) (param $var$1 i32) (result i32) (i32.add (get_local $var$0) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index eedace359..c0cce359a 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -30,26 +30,26 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $fb) - (export "_main" $Na) - (export "_pthread_self" $ib) - (export "_memset" $hb) - (export "_malloc" $eb) - (export "_memcpy" $jb) - (export "_fflush" $_a) - (export "___errno_location" $Qa) - (export "runPostSets" $gb) - (export "stackAlloc" $Ea) - (export "stackSave" $Fa) - (export "stackRestore" $Ga) - (export "establishStackSpace" $Ha) - (export "setThrew" $Ia) - (export "setTempRet0" $La) - (export "getTempRet0" $Ma) - (export "dynCall_ii" $kb) - (export "dynCall_iiii" $lb) - (export "dynCall_vi" $mb) - (export "__growWasmMemory" $__growWasmMemory) + (export "_free" (func $fb)) + (export "_main" (func $Na)) + (export "_pthread_self" (func $ib)) + (export "_memset" (func $hb)) + (export "_malloc" (func $eb)) + (export "_memcpy" (func $jb)) + (export "_fflush" (func $_a)) + (export "___errno_location" (func $Qa)) + (export "runPostSets" (func $gb)) + (export "stackAlloc" (func $Ea)) + (export "stackSave" (func $Fa)) + (export "stackRestore" (func $Ga)) + (export "establishStackSpace" (func $Ha)) + (export "setThrew" (func $Ia)) + (export "setTempRet0" (func $La)) + (export "getTempRet0" (func $Ma)) + (export "dynCall_ii" (func $kb)) + (export "dynCall_iiii" (func $lb)) + (export "dynCall_vi" (func $mb)) + (export "__growWasmMemory" (func $__growWasmMemory)) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 14911b9c2..aea127692 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -28,26 +28,26 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $fb) - (export "_main" $Na) - (export "_pthread_self" $ib) - (export "_memset" $hb) - (export "_malloc" $eb) - (export "_memcpy" $jb) - (export "_fflush" $_a) - (export "___errno_location" $Qa) - (export "runPostSets" $gb) - (export "stackAlloc" $Ea) - (export "stackSave" $Fa) - (export "stackRestore" $Ga) - (export "establishStackSpace" $Ha) - (export "setThrew" $Ia) - (export "setTempRet0" $La) - (export "getTempRet0" $Ma) - (export "dynCall_ii" $kb) - (export "dynCall_iiii" $lb) - (export "dynCall_vi" $mb) - (export "__growWasmMemory" $__growWasmMemory) + (export "_free" (func $fb)) + (export "_main" (func $Na)) + (export "_pthread_self" (func $ib)) + (export "_memset" (func $hb)) + (export "_malloc" (func $eb)) + (export "_memcpy" (func $jb)) + (export "_fflush" (func $_a)) + (export "___errno_location" (func $Qa)) + (export "runPostSets" (func $gb)) + (export "stackAlloc" (func $Ea)) + (export "stackSave" (func $Fa)) + (export "stackRestore" (func $Ga)) + (export "establishStackSpace" (func $Ha)) + (export "setThrew" (func $Ia)) + (export "setTempRet0" (func $La)) + (export "getTempRet0" (func $Ma)) + (export "dynCall_ii" (func $kb)) + (export "dynCall_iiii" (func $lb)) + (export "dynCall_vi" (func $mb)) + (export "__growWasmMemory" (func $__growWasmMemory)) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 8ee5fc20d..347eb4392 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -28,26 +28,26 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $fb) - (export "_main" $Na) - (export "_pthread_self" $ib) - (export "_memset" $hb) - (export "_malloc" $eb) - (export "_memcpy" $jb) - (export "_fflush" $_a) - (export "___errno_location" $Qa) - (export "runPostSets" $gb) - (export "stackAlloc" $Ea) - (export "stackSave" $Fa) - (export "stackRestore" $Ga) - (export "establishStackSpace" $Ha) - (export "setThrew" $Ia) - (export "setTempRet0" $La) - (export "getTempRet0" $Ma) - (export "dynCall_ii" $kb) - (export "dynCall_iiii" $lb) - (export "dynCall_vi" $mb) - (export "__growWasmMemory" $__growWasmMemory) + (export "_free" (func $fb)) + (export "_main" (func $Na)) + (export "_pthread_self" (func $ib)) + (export "_memset" (func $hb)) + (export "_malloc" (func $eb)) + (export "_memcpy" (func $jb)) + (export "_fflush" (func $_a)) + (export "___errno_location" (func $Qa)) + (export "runPostSets" (func $gb)) + (export "stackAlloc" (func $Ea)) + (export "stackSave" (func $Fa)) + (export "stackRestore" (func $Ga)) + (export "establishStackSpace" (func $Ha)) + (export "setThrew" (func $Ia)) + (export "setTempRet0" (func $La)) + (export "getTempRet0" (func $Ma)) + (export "dynCall_ii" (func $kb)) + (export "dynCall_iiii" (func $lb)) + (export "dynCall_vi" (func $mb)) + (export "__growWasmMemory" (func $__growWasmMemory)) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 91fae3ccf..9415b19e5 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -29,26 +29,26 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_free" $fb) - (export "_main" $Na) - (export "_pthread_self" $ib) - (export "_memset" $hb) - (export "_malloc" $eb) - (export "_memcpy" $jb) - (export "_fflush" $_a) - (export "___errno_location" $Qa) - (export "runPostSets" $gb) - (export "stackAlloc" $Ea) - (export "stackSave" $Fa) - (export "stackRestore" $Ga) - (export "establishStackSpace" $Ha) - (export "setThrew" $Ia) - (export "setTempRet0" $La) - (export "getTempRet0" $Ma) - (export "dynCall_ii" $kb) - (export "dynCall_iiii" $lb) - (export "dynCall_vi" $mb) - (export "__growWasmMemory" $__growWasmMemory) + (export "_free" (func $fb)) + (export "_main" (func $Na)) + (export "_pthread_self" (func $ib)) + (export "_memset" (func $hb)) + (export "_malloc" (func $eb)) + (export "_memcpy" (func $jb)) + (export "_fflush" (func $_a)) + (export "___errno_location" (func $Qa)) + (export "runPostSets" (func $gb)) + (export "stackAlloc" (func $Ea)) + (export "stackSave" (func $Fa)) + (export "stackRestore" (func $Ga)) + (export "establishStackSpace" (func $Ha)) + (export "setThrew" (func $Ia)) + (export "setTempRet0" (func $La)) + (export "getTempRet0" (func $Ma)) + (export "dynCall_ii" (func $kb)) + (export "dynCall_iiii" (func $lb)) + (export "dynCall_vi" (func $mb)) + (export "__growWasmMemory" (func $__growWasmMemory)) (global $v i32 (i32.const 0)) (global $w i32 (i32.const 0)) (global $x i32 (i32.const 0)) diff --git a/test/min.fromasm b/test/min.fromasm index 1aa1e9405..54380a4ec 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -6,7 +6,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 094a713a7..b07aba04e 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -5,7 +5,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (param $0 f32) (result f32) (local $1 f32) (f32.add diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 2bc20abbb..dd89a9eed 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -5,7 +5,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index 2bc20abbb..dd89a9eed 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -5,7 +5,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (param $f f32) (result f32) (local $t f32) (return diff --git a/test/min.wast b/test/min.wast index 4702215a9..e5472fb77 100644 --- a/test/min.wast +++ b/test/min.wast @@ -4,7 +4,7 @@ (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) (type $3 (func (param i32 i32 i32) (result i32))) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (type $0) (param $f f32) (result f32) (local $t f32) (f32.add diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary index 7750086aa..33515c61c 100644 --- a/test/min.wast.fromBinary +++ b/test/min.wast.fromBinary @@ -4,7 +4,7 @@ (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) (type $3 (func (param i32 i32 i32) (result i32))) - (export "floats" $floats) + (export "floats" (func $floats)) (func $floats (type $0) (param $var$0 f32) (result f32) (local $var$1 f32) (f32.add diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index 881a265e9..e043300c4 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -44,8 +44,8 @@ (memory 0) (start $keep2) (type $0 (func)) - (export "keep2" $keep2) - (export "other" $keep2) + (export "keep2" (func $keep2)) + (export "other" (func $keep2)) (table 3 3 anyfunc) (elem (i32.const 0) $keep2 $keep2 $caller) (func $keep2 (type $0) diff --git a/test/passes/remove-unused-functions.txt b/test/passes/remove-unused-functions.txt index cd819d347..1bd30e866 100644 --- a/test/passes/remove-unused-functions.txt +++ b/test/passes/remove-unused-functions.txt @@ -2,7 +2,7 @@ (memory 0) (start $start) (type $0 (func)) - (export "exported" $exported) + (export "exported" (func $exported)) (table 1 1 anyfunc) (elem (i32.const 0) $called_indirect) (func $start (type $0) diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index d53021c11..6d8e2a14b 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -7,7 +7,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_test" $_test) + (export "_test" (func $_test)) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index d664567b4..1578c86da 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -4,7 +4,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_test" $_test) + (export "_test" (func $_test)) (func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) (if diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index d6ada31f6..a8a338489 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -4,7 +4,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_test" $_test) + (export "_test" (func $_test)) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index b10f96c69..1011976b6 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -6,7 +6,7 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_test" $_test) + (export "_test" (func $_test)) (func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32) (local $d6 f64) (if diff --git a/test/unit.fromasm b/test/unit.fromasm index 0a051cf5a..33dd153af 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -23,8 +23,8 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "big_negative" $big_negative) - (export "pick" $big_negative) + (export "big_negative" (func $big_negative)) + (export "pick" (func $big_negative)) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 2240135c3..35b8b1768 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -18,8 +18,8 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "big_negative" $big_negative) - (export "pick" $big_negative) + (export "big_negative" (func $big_negative)) + (export "pick" (func $big_negative)) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index f78c96637..c41075df0 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -18,8 +18,8 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "big_negative" $big_negative) - (export "pick" $exportMe) + (export "big_negative" (func $big_negative)) + (export "pick" (func $exportMe)) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index e1e0c5e02..2162d9ed7 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -22,8 +22,8 @@ (import "env" "table" (table $table)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "big_negative" $big_negative) - (export "pick" $exportMe) + (export "big_negative" (func $big_negative)) + (export "pick" (func $exportMe)) (global $Int i32 (i32.const 0)) (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) diff --git a/test/unit.wast b/test/unit.wast index 748b62dab..2df02df44 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -12,7 +12,7 @@ (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (export "big_negative" $big_negative) + (export "big_negative" (func $big_negative)) (table 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative (type $FUNCSIG$v) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index ad0f0786a..4a311f41a 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -12,7 +12,7 @@ (import "env" "_emscripten_asm_const_vi" (func $import$0)) (import "asm2wasm" "f64-to-int" (func $import$1 (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $import$2 (param f64 f64) (result f64))) - (export "big_negative" $big_negative) + (export "big_negative" (func $big_negative)) (table 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative (type $1) -- cgit v1.2.3 From a07797f1b1264e60912a8c18cb673b829ae0d1a5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 2 Sep 2016 15:54:21 -0700 Subject: additional parsing support for new spec things --- src/wasm-s-parser.h | 96 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index c328f3e29..3d57c5ada 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -67,8 +67,8 @@ public: bool isList() { return isList_; } bool isStr() { return !isList_; } - bool dollared() { return dollared_; } - bool quoted() { return quoted_; } + bool dollared() { return isStr() && dollared_; } + bool quoted() { return isStr() && quoted_; } size_t line, col; @@ -428,6 +428,13 @@ private: break; } } + if (i < s.size() && s[i]->isList()) { + auto& inner = *s[i]; + if (inner.size() > 0 && inner[0]->str() == EXPORT) { + exportName = inner[1]->str(); + i++; + } + } return i; } @@ -1341,16 +1348,29 @@ private: void parseMemory(Element& s) { hasMemory = true; - - if (s[1]->isList()) { - // (memory (data ..)) format - parseData(*s[1]); - wasm.memory.initial = wasm.memory.segments[0].data.size(); - return; + Index i = 1; + if (s[i]->dollared()) { + wasm.memory.name = s[i++]->str(); + } + if (s[i]->isList()) { + auto& inner = *s[i]; + if (inner[0]->str() == EXPORT) { + auto ex = make_unique(); + ex->name = inner[1]->str(); + ex->value = wasm.memory.name; + ex->kind = Export::Memory; + wasm.addExport(ex.release()); + i++; + } else { + assert(inner.size() > 0 ? inner[0]->str() != IMPORT : true); + // (memory (data ..)) format + parseData(*s[i]); + wasm.memory.initial = wasm.memory.segments[0].data.size(); + return; + } } - wasm.memory.initial = atoi(s[1]->c_str()); - if (s.size() == 2) return; - size_t i = 2; + wasm.memory.initial = atoi(s[i++]->c_str()); + if (i == s.size()) return; if (s[i]->isStr()) { uint64_t max = atoll(s[i]->c_str()); if (max > Memory::kMaxSize) throw ParseException("total memory must be <= 4GB"); @@ -1522,12 +1542,25 @@ private: void parseGlobal(Element& s) { std::unique_ptr global = make_unique(); size_t i = 1; - if (s.size() == 4) { + if (s[i]->dollared()) { global->name = s[i++]->str(); } else { global->name = Name::fromInt(globalCounter); } globalCounter++; + if (s[i]->isList()) { + auto& inner = *s[i]; + if (inner[0]->str() == EXPORT) { + auto ex = make_unique(); + ex->name = inner[1]->str(); + ex->value = global->name; + ex->kind = Export::Global; + wasm.addExport(ex.release()); + i++; + } else { + WASM_UNREACHABLE(); + } + } global->type = stringToWasmType(s[i++]->str()); global->init = parseExpression(s[i++]); assert(i == s.size()); @@ -1538,31 +1571,50 @@ private: void parseTable(Element& s) { seenTable = true; - - if (s.size() == 1) return; // empty table in old notation - if (!s[1]->dollared()) { - if (s[1]->str() == ANYFUNC) { + Index i = 1; + if (i == s.size()) return; // empty table in old notation +#if 0 // TODO: new table notation + if (s[i]->dollared()) { + wasm.table.name = s[i++]->str(); + } +#endif + if (i == s.size()) return; + if (s[i]->isList()) { + auto& inner = *s[i]; + if (inner[0]->str() == EXPORT) { + auto ex = make_unique(); + ex->name = inner[1]->str(); + ex->value = wasm.table.name; + ex->kind = Export::Table; + wasm.addExport(ex.release()); + i++; + } else { + WASM_UNREACHABLE(); + } + } + if (i == s.size()) return; + if (!s[i]->dollared()) { + if (s[i]->str() == ANYFUNC) { // (table type (elem ..)) - parseElem(*s[2]); + parseElem(*s[i + 1]); wasm.table.initial = wasm.table.max = wasm.table.segments[0].data.size(); return; } // first element isn't dollared, and isn't anyfunc. this could be old syntax for (table 0 1) which means function 0 and 1, or it could be (table initial max? type), look for type if (s[s.size() - 1]->str() == ANYFUNC) { // (table initial max? type) - wasm.table.initial = atoi(s[1]->c_str()); - wasm.table.max = atoi(s[2]->c_str()); + wasm.table.initial = atoi(s[i]->c_str()); + wasm.table.max = atoi(s[i + 1]->c_str()); return; } } // old notation (table func1 func2 ..) - parseElem(s); + parseElem(s, i); wasm.table.initial = wasm.table.max = wasm.table.segments[0].data.size(); } - void parseElem(Element& s) { + void parseElem(Element& s, Index i = 1) { if (!seenTable) throw ParseException("elem without table", s.line, s.col); - Index i = 1; Expression* offset; if (s[i]->isList()) { // there is an init expression -- cgit v1.2.3 From 52b0fe21ad36ef0e81193d4418916dbec7352fa4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 2 Sep 2016 17:42:34 -0700 Subject: new validation checks for upcoming spec tests --- src/wasm-s-parser.h | 3 +- src/wasm-validator.h | 36 ++++++++++++++++--- test/example/c-api-kitchen-sink.c | 2 +- test/example/c-api-kitchen-sink.txt | 6 ++-- test/example/c-api-kitchen-sink.txt.txt | 2 +- test/passes/duplicate-function-elimination.txt | 44 +++++++++++------------ test/passes/duplicate-function-elimination.wast | 48 ++++++++++++------------- 7 files changed, 85 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 3d57c5ada..9abdea744 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1402,9 +1402,10 @@ private: } void parseData(Element& s) { + if (!hasMemory) throw ParseException("data but no memory"); Index i = 1; Expression* offset; - if (s[i]->isList()) { + if (i < s.size() && s[i]->isList()) { // there is an init expression offset = parseExpression(s[i++]); } else { diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 92ae24688..58a30f9a3 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -197,11 +197,11 @@ public: } } void visitLoad(Load *curr) { - validateAlignment(curr->align); + validateAlignment(curr->align, curr->type, curr->bytes); shouldBeEqualOrFirstIsUnreachable(curr->ptr->type, i32, curr, "load pointer type must be i32"); } void visitStore(Store *curr) { - validateAlignment(curr->align); + validateAlignment(curr->align, curr->type, curr->bytes); shouldBeEqualOrFirstIsUnreachable(curr->ptr->type, i32, curr, "store pointer type must be i32"); shouldBeUnequal(curr->value->type, none, curr, "store value type must not be none"); shouldBeEqualOrFirstIsUnreachable(curr->value->type, curr->valueType, curr, "store value type must match"); @@ -351,12 +351,26 @@ public: } bool isConstant(Expression* curr) { - return curr->is(); + return curr->is() || curr->is(); } void visitMemory(Memory *curr) { shouldBeFalse(curr->initial > curr->max, "memory", "memory max >= initial"); shouldBeTrue(curr->max <= Memory::kMaxSize, "memory", "max memory must be <= 4GB"); + Index mustBeGreaterOrEqual = 0; + for (auto& segment : curr->segments) { + if (!shouldBeEqual(segment.offset->type, i32, segment.offset, "segment offset should be i32")) continue; + shouldBeTrue(isConstant(segment.offset), segment.offset, "segment offset should be constant"); + Index size = segment.data.size(); + shouldBeTrue(size <= curr->initial * Memory::kPageSize, segment.data.size(), "segment size should fit in memory"); + if (segment.offset->is()) { + Index start = segment.offset->cast()->value.geti32(); + Index end = start + size; + shouldBeTrue(end <= curr->initial * Memory::kPageSize, segment.data.size(), "segment size should fit in memory"); + shouldBeTrue(start >= mustBeGreaterOrEqual, segment.data.size(), "segment size should fit in memory"); + mustBeGreaterOrEqual = end; + } + } } void visitTable(Table* curr) { for (auto& segment : curr->segments) { @@ -476,7 +490,7 @@ private: return true; } - void validateAlignment(size_t align) { + void validateAlignment(size_t align, WasmType type, Index bytes) { switch (align) { case 1: case 2: @@ -488,6 +502,20 @@ private: break; } } + shouldBeTrue(align <= bytes, align, "alignment must not exceed natural"); + switch (type) { + case i32: + case f32: { + shouldBeTrue(align <= 4, align, "alignment must not exceed natural"); + break; + } + case i64: + case f64: { + shouldBeTrue(align <= 8, align, "alignment must not exceed natural"); + break; + } + default: {} + } } }; diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index f60b62785..77e7f0b05 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -209,7 +209,7 @@ void test_core() { BinaryenSetLocal(module, 0, makeInt32(module, 101)), BinaryenDrop(module, BinaryenTeeLocal(module, 0, makeInt32(module, 102))), BinaryenLoad(module, 4, 0, 0, 0, BinaryenInt32(), makeInt32(module, 1)), - BinaryenLoad(module, 1, 1, 2, 4, BinaryenInt64(), makeInt32(module, 8)), + BinaryenLoad(module, 2, 1, 2, 1, BinaryenInt64(), makeInt32(module, 8)), BinaryenLoad(module, 4, 0, 0, 0, BinaryenFloat32(), makeInt32(module, 2)), BinaryenLoad(module, 8, 0, 2, 8, BinaryenFloat64(), makeInt32(module, 9)), BinaryenStore(module, 4, 0, 0, temp13, temp14, BinaryenInt32()), diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index f4bfa19e7..6544f9f33 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -486,7 +486,7 @@ BinaryenFloat64: 4 ) ) (drop - (i64.load8_s offset=2 align=4 + (i64.load16_s offset=2 align=1 (i32.const 8) ) ) @@ -1528,7 +1528,7 @@ int main() { expressions[228] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[229] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[228]); expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[231] = BinaryenLoad(the_module, 1, 1, 2, 4, 2, expressions[230]); + expressions[231] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[230]); expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); expressions[233] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[232]); expressions[234] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); @@ -2077,7 +2077,7 @@ int main() { ) ) (drop - (i64.load8_s offset=2 align=4 + (i64.load16_s offset=2 align=1 (i32.const 8) ) ) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index d564ce7ca..b37814f89 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -481,7 +481,7 @@ ) ) (drop - (i64.load8_s offset=2 align=4 + (i64.load16_s offset=2 align=1 (i32.const 8) ) ) diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index e043300c4..c49f7fd6f 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -507,7 +507,7 @@ ) ) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 0) ) ) @@ -518,14 +518,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load16_s offset=3 + (i32.load offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 0) ) ) @@ -536,14 +536,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s offset=3 + (i32.load16_s offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=1 (i32.const 0) ) ) @@ -554,14 +554,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s align=2 + (i32.load16_s (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 0) ) ) @@ -572,14 +572,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 1) ) ) @@ -590,14 +590,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_u offset=3 align=2 + (i32.load16_u offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 (i32.const 0) ) ) @@ -611,7 +611,7 @@ (i32.const 0) (i32.const 100) ) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) @@ -621,13 +621,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store16 offset=3 + (i32.store offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) @@ -637,13 +637,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=1 (i32.const 0) (i32.const 100) ) @@ -653,13 +653,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 align=2 + (i32.store16 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) @@ -669,13 +669,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 1) (i32.const 100) ) @@ -685,13 +685,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 (i32.const 0) (i32.const 101) ) diff --git a/test/passes/duplicate-function-elimination.wast b/test/passes/duplicate-function-elimination.wast index 843e812f9..f72ef542e 100644 --- a/test/passes/duplicate-function-elimination.wast +++ b/test/passes/duplicate-function-elimination.wast @@ -593,7 +593,7 @@ ) ) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) @@ -605,7 +605,7 @@ ) ) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) @@ -616,14 +616,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load16_s offset=3 + (i32.load offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) @@ -634,14 +634,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s offset=3 + (i32.load16_s offset=3 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=1 (i32.const 0) ) ) @@ -652,14 +652,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s align=2 + (i32.load16_s align=2 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) @@ -670,14 +670,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 1) ) ) @@ -688,14 +688,14 @@ (type $0 (func)) (func $keep2 (type $0) (drop - (i32.load8_u offset=3 align=2 + (i32.load16_u offset=3 align=2 (i32.const 0) ) ) ) (func $other (type $0) (drop - (i32.load8_s offset=3 align=2 + (i32.load16_s offset=3 align=2 (i32.const 0) ) ) @@ -709,7 +709,7 @@ (i32.const 0) (i32.const 100) ) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) @@ -719,7 +719,7 @@ (i32.const 0) (i32.const 100) ) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) @@ -729,13 +729,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store16 offset=3 + (i32.store32 offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) @@ -745,13 +745,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 + (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=1 (i32.const 0) (i32.const 100) ) @@ -761,13 +761,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 align=2 + (i32.store16 align=2 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) @@ -777,13 +777,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 1) (i32.const 100) ) @@ -793,13 +793,13 @@ (memory 10) (type $0 (func)) (func $keep2 (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 100) ) ) (func $other (type $0) - (i32.store8 offset=3 align=2 + (i32.store16 offset=3 align=2 (i32.const 0) (i32.const 101) ) -- cgit v1.2.3 From b116d3a45854f9c92e98c5526c1d6bccd3d9cfbe Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 7 Sep 2016 10:01:32 -0700 Subject: if we don't recognize the platform in colors.h, just do nothing for colors --- src/support/colors.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/support/colors.h b/src/support/colors.h index d81ecbc16..fb5267ce1 100644 --- a/src/support/colors.h +++ b/src/support/colors.h @@ -42,6 +42,15 @@ inline void grey(std::ostream& stream) { outputColorCode(stream, 0x08); } inline void green(std::ostream& stream) { outputColorCode(stream, 0x02); } inline void blue(std::ostream& stream) { outputColorCode(stream, 0x09); } inline void bold(std::ostream& stream) { /* Do nothing */ } +#else +inline void normal(std::ostream& stream) {} +inline void red(std::ostream& stream) {} +inline void magenta(std::ostream& stream) {} +inline void orange(std::ostream& stream) {} +inline void grey(std::ostream& stream) {} +inline void green(std::ostream& stream) {} +inline void blue(std::ostream& stream) {} +inline void bold(std::ostream& stream) {} #endif }; -- cgit v1.2.3